blob: a85122abd7f8a0947df5bbe4fdc6cb9c809e5dcd [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
<body onload="test()">
<div id="console"></div>
<iframe src="resources/frame.html"></iframe>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
}
function test()
{
var s = document.createElement("script");
s.addEventListener("beforeload", function() {
var s = document.body.removeChild(document.getElementsByTagName("script")[2]);
document.getElementsByTagName("iframe")[0].contentDocument.body.appendChild(s);
testPassed("");
}, false);
s.addEventListener("error", function() {
testFailed("error event should not fire.");
}, false);
s.addEventListener("load", function() {
testFailed("script should not be loaded");
}, false);
s.src = "external.js";
document.body.appendChild(s);
}
</script>
</body>
</html>