<!DOCTYPE html>
<script>
    if (window.testRunner) {
        testRunner.dumpAsText();
        testRunner.waitUntilDone();
    }

    // One iframe's popstate handler removes another iframe from the
    // document during a history navigation that affects both frames. The
    // history navigation loads a different document in the other frame.
    window.onload = function () {
        frames[0].history.pushState("first", "first");
        frames[0].onpopstate = function () {
            document.body.innerHTML = "TEST PASSED";
            if (window.testRunner)
                testRunner.notifyDone();
        };
        document.querySelectorAll("iframe")[1].onload = function () {
            setTimeout("history.go(-2);", 10);
        };
        setTimeout(function () {
            frames[1].location.href = "resources/empty-subframe.html?new";
        }, 10);
    }
</script>

<body>
    NOT TESTED
    <iframe src="resources/empty-subframe.html"></iframe>
    <iframe src="resources/empty-subframe.html"></iframe>
</body>
