1 <head> 2 <script> 3 4 var pageHasLoaded = false; 5 var frameHasLoaded = false; 6 7 function gc() 8 { 9 if (window.GCController) 10 return GCController.collect(); 11 12 for (var i = 0; i < 10000; i++) 13 var s = new String(""); 14 } 15 16 function pageLoaded() 17 { 18 if (window.layoutTestController) 19 layoutTestController.waitUntilDone(); 20 21 pageHasLoaded = true; 22 if (pageHasLoaded && frameHasLoaded) 23 runTest(); 24 } 25 26 function frameLoaded() 27 { 28 frameHasLoaded = true; 29 if (pageHasLoaded && frameHasLoaded) 30 runTest(); 31 } 32 33 function runTest() 34 { 35 if (window.layoutTestController) 36 layoutTestController.dumpAsText(); 37 38 var frame = document.getElementById("frame"); 39 frame.setAttribute("onload", "frameLoadedAgain()"); 40 frame.setAttribute("src", "about:blank"); 41 } 42 43 function frameLoadedAgain() 44 { 45 gc(); 46 document.getElementById("result").firstChild.data = "TEST PASSED - Unless an assertion or crash happens soon."; 47 if (window.layoutTestController) 48 layoutTestController.notifyDone(); 49 } 50 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> 57