| OLD | NEW |
| (Empty) |
| 1 <head> | |
| 2 <script> | |
| 3 if (window.testRunner) { | |
| 4 testRunner.dumpAsText(); | |
| 5 testRunner.waitUntilDone(); | |
| 6 } | |
| 7 | |
| 8 var started = false; | |
| 9 var executed = false; | |
| 10 var canPass = false; | |
| 11 | |
| 12 function test() | |
| 13 { | |
| 14 var cachingElement = document.getElementById("cache-script"); | |
| 15 var script = document.createElement("script"); | |
| 16 script.src = cachingElement.src; | |
| 17 started = true; | |
| 18 document.body.appendChild(script); | |
| 19 if (executed) | |
| 20 document.getElementById("result").innerText = "FAIL: Script exec
uted synchronously beneath appendChild()"; | |
| 21 else | |
| 22 canPass = true; | |
| 23 | |
| 24 if (window.testRunner) | |
| 25 testRunner.setCacheModel(0); // WebCacheModelDocumentViewer | |
| 26 } | |
| 27 </script> | |
| 28 </head> | |
| 29 <body> | |
| 30 <div id="result">FAIL: Test did not run</div> | |
| 31 <!-- loads the script into the cache, then begins the test --> | |
| 32 <script id="cache-script" onload="setTimeout(test, 0)" src="resources/nested
-execution.js"></script> | |
| 33 </body> | |
| OLD | NEW |