5 if (window.layoutTestController) {
6 layoutTestController.dumpAsText();
7 layoutTestController.waitUntilDone();
10 window.onmessage = function(evt)
12 if (evt.data != "done") {
13 alert("Unexpected message: " + evt.data);
14 layoutTestController.notifyDone();
18 alert("Child window's history object after attempt to clear: " + window.frames[0].history);
19 layoutTestController.notifyDone();
22 function setHistoryLength()
24 alert("Child window's history object before attempt to clear: " + window.frames[0].history);
25 window.frames[0].postMessage("setHistoryLength", "*");
30 <body onload="setHistoryLength();">
31 <iframe id='testFrame' src="http://localhost:8000/history/resources/cross-origin-replaces-history-object-child-iframe.html"></iframe>