Use testRunner instead of layoutTestController in tests still found to be using layou...
[WebKit-https.git] / LayoutTests / http / tests / navigation / onload-navigation-iframe.html
1 <html>
2 <head>
3 <script type="text/javascript">
4
5 function runTest()
6 {
7     if (window.testRunner) {
8         testRunner.dumpBackForwardList();
9         testRunner.dumpAsText();
10         testRunner.waitUntilDone();
11     }
12
13     var form = document.getElementById("myForm");
14     var divElm = document.createElement("div");
15     
16     var iframe = document.createElement("iframe");
17     iframe.name = "myFrame";
18     iframe.id = "myFrame";
19     iframe.onload = frameLoaded;
20     divElm.appendChild(iframe);
21
22     document.getElementsByTagName("body").item(0).appendChild(divElm);
23     
24     form.submit();
25 }
26
27 function frameLoaded()
28 {
29     if (document.getElementById("myFrame").contentDocument.URL === "about:blank")
30         return;
31     if (window.testRunner)
32         testRunner.notifyDone();
33 }
34
35 </script>
36 </head>
37 <body onload="runTest();">
38 <form id="myForm" target="myFrame" action="resources/blank.txt" method="get">
39 </form>
40 In this case, Safari and Firefox don't add a history item. 
41 </body>
42 </html>