blob: 0891c8e570c302b6ebe620fd0675cb34213b0b53 [file] [log] [blame]
description("Exceptions thrown in javascript URLs should not propagate to the main script.")
var subframe = document.createElement("iframe");
document.body.appendChild(subframe);
var caughtException = false;
// Runtime exception.
try {
subframe.src = 'javascript:throw 42';
} catch(e) {
caughtException = true;
}
shouldBeFalse('caughtException');
// Compile-time exception.
try {
subframe.src = 'javascript:<html></html>';
} catch(e) {
caughtException = true;
}
shouldBeFalse('caughtException');