<script> | |
if (window.testRunner) { | |
testRunner.dumpAsText(); | |
testRunner.waitUntilDone(); | |
} | |
var s = document.createElement('script'); | |
s.src = "should-be-blocked.js"; | |
s.onerror = function () { | |
if (window.testRunner) { | |
console.log("onerror was correctly called on the next runloop cycle."); | |
testRunner.notifyDone(); | |
} | |
}; | |
document.getElementsByTagName('head')[0].appendChild(s); | |
console.log("Done executing script. Waiting for onerror callback."); | |
</script> |