blob: fb0e0d50258360d13ebe246a207ee1cccba02a45 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
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');
</script>
</body>
</html>