<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="../../resources/js-test.js"></script> | |
<script> | |
if (window.testRunner) | |
testRunner.dumpFrameLoadCallbacks(); | |
jsTestIsAsync = true; | |
</script> | |
</head> | |
<body> | |
<script> | |
description("Tests that we do not redirect to an invalid URL initiated by JavaScript. This test PASSED if you see an entry in the dumped frame load callbacks of the form: "willPerformClientRedirectToURL: http://A=a%B=b" followed by "didCancelClientRedirectForFrame"."); | |
var caughtException = false; | |
onload = function() { | |
try { | |
window.location.href = "http://A=a%B=b"; | |
} catch (e) { | |
caughtException = true; | |
} | |
shouldBe("caughtException", "true"); | |
finishJSTest(); | |
} | |
</script> | |
</body> | |
</html> |