$("test15").src = "data:text/javascript,test15aRan = true;";
$("test15").appendChild(document.createTextNode("test15bRan = true"));
$("test15").removeAttribute("src");
is(test15aRan, false, "Not yet 15a!");
is(test15bRan, false, "Not yet 15b!");
</script>
<script type="text/javascript">
// Follow up on some of those
$("test6").appendChild(document.createTextNode("test6Ran = true"));
is(test6Ran, false, "Should have run already 6!");
$("test7").appendChild(document.createTextNode("test7Ran = true"));
is(test7Ran, true, "Should be 7!");
$("test8").insertBefore(document.createTextNode("test8Ran = true"),
$("test8").firstChild);
is(test8Ran, true, "Should be 8!");
$("test9").firstChild.data = "test9Ran = true";
is(test9Ran, true, "Should be 9!");
</script>
<script type="text/javascript">
function done() {
is(test1Ran, true, "Should have run!");
is(test3Ran, false, "Already executed test3 script once");
is(test4Ran, false, "Should have executed whitespace-only script already");
is(test5Ran, false, "Should have executed once the whitespace node was added");
is(test6Ran, false, "Should have executed once the whitespace node was added 2");
is(test10Ran, false, "Has an src; inline part shouldn't run");
is(test11Ran, true, "Script with src should have run");
is(test12Ran, true, "Setting src should execute script");
is(test13Ran, true, "Setting src attribute should execute script");
is(test14aRan, true, "src attribute takes precedence over inline content");
is(test14bRan, false, "src attribute takes precedence over inline content 2");
is(test15aRan, true, "src attribute load should have started before the attribute got removed");
is(test15bRan, false, "src attribute still got executed, so this shouldn't have been");
SimpleTest.finish();
}