2 if (window
.testRunner
) {
3 testRunner
.dumpAsText();
4 testRunner
.setCanOpenWindows();
5 testRunner
.waitUntilDone();
8 // This is a test that replaceState called on an inner frame does not modify
9 // the history state of the top frame. The test asserts that the inner frame
10 // remains the inner frame and is not promoted to become the top frame during
11 // history traversal (on navigating back).
15 function notifyDone(result
) {
19 document
.body
.innerText
= result
;
21 if (window
.testRunner
)
22 testRunner
.notifyDone();
25 function windowLoaded() {
26 // Allow load processing to complete before we start navigating again, so
27 // that navigating to navigate-back.html creates a new history item.
28 setTimeout(function() {
29 testWin
.frames
[0].history
.replaceState(null, null);
30 testWin
.location
= "resources/navigate-back.html";
35 testWin
= open("resources/replacestate-in-iframe-window.html");