Use testRunner instead of layoutTestController in tests still found to be using layou...
[WebKit-https.git] / LayoutTests / http / tests / misc / script-no-store.html
1 <body>
2 <script>
3 var count = 0;
4
5 if (window.testRunner) {
6     testRunner.dumpAsText();
7     testRunner.waitUntilDone();
8 }
9
10 function addRandom()
11 {
12     var script = document.createElement("script");
13     script.setAttribute("src", "resources/random-no-store.php");
14     document.body.appendChild(script);
15 }
16 ++count;
17 addRandom();
18
19 setInterval(function() {
20     if (count == 1 && document.getElementsByTagName("p").length == 1) {
21         ++count;
22         addRandom();
23     } else if (document.getElementsByTagName("p").length == 2) {
24         document.write(document.getElementsByTagName("p")[0].innerHTML == document.getElementsByTagName("p")[1].innerHTML ? 
25             "FAIL<br>" : "PASS<br>");
26         if (window.testRunner)
27             testRunner.notifyDone();
28     }
29 }, 10);
30 </script>