blob: dfd74b9f5bdeef83544734019575d92ba73b3051 [file] [log] [blame]
<head>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
var started = false;
var executed = false;
var canPass = false;
function test()
{
var cachingElement = document.getElementById("cache-script");
var script = document.createElement("script");
script.src = cachingElement.src;
started = true;
document.body.appendChild(script);
if (executed)
document.getElementById("result").innerText = "FAIL: Script executed synchronously beneath appendChild()";
else
canPass = true;
if (window.layoutTestController)
layoutTestController.setCacheModel(0); // WebCacheModelDocumentViewer
}
</script>
</head>
<body>
<div id="result">FAIL: Test did not run</div>
<!-- loads the script into the cache, then begins the test -->
<script id="cache-script" onload="setTimeout(test, 0)" src="resources/nested-execution.js"></script>
</body>