blob: 06564344c89fd78e8e28c8b0e723d3ed85d3476b [file] [log] [blame]
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
var maxEventLoopRuns = 50;
function helperLoaded () {
if (!maxEventLoopRuns) {
if (helper.location == "http://127.0.0.1:8000/contentextensions/resources/block-everything-unless-domain-helper.html")
console.log("PASS - blocked the load");
else
console.log("FAIL - loaded blocked URL");
testRunner.notifyDone();
} else {
setTimeout(helperLoaded, 1);
maxEventLoopRuns--;
}
}
var helper = window.open("resources/block-everything-unless-domain-helper.html");
if (helper)
helper.addEventListener('load', helperLoaded);
else {
console.log("opening window failed");
testRunner.notifyDone();
}
</script>