Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / NodeList / adoptNode-node-list-cache.html
blob2402e8903f7b56598d35a09d850d476036a5485f
1 <head>
2 <script>
4 var pageHasLoaded = false;
5 var frameHasLoaded = false;
7 function gc()
9 if (window.GCController)
10 return GCController.collect();
12 for (var i = 0; i < 10000; i++)
13 var s = new String("");
16 function pageLoaded()
18 if (window.testRunner)
19 testRunner.waitUntilDone();
21 pageHasLoaded = true;
22 if (pageHasLoaded && frameHasLoaded)
23 runTest();
26 function frameLoaded()
28 frameHasLoaded = true;
29 if (pageHasLoaded && frameHasLoaded)
30 runTest();
33 function runTest()
35 if (window.testRunner)
36 testRunner.dumpAsText();
38 var frame = document.getElementById("frame");
39 frame.setAttribute("onload", "frameLoadedAgain()");
40 frame.setAttribute("src", "about:blank");
43 function frameLoadedAgain()
45 gc();
46 document.getElementById("result").firstChild.data = "TEST PASSED - Unless an assertion or crash happens soon.";
47 if (window.testRunner)
48 testRunner.notifyDone();
51 </script>
52 </head>
53 <body onload="pageLoaded()">
54 <iframe id="frame" src="resources/adoptNode-node-list-cache-subframe.html" onload="frameLoaded()"></iframe>
55 <div id="result">TEST DID NOT RUN YET</div>
56 </body>