haikuwebkit/LayoutTests/fast/loader/window-open-to-invalid-url-...

23 lines
712 B
HTML

<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpFrameLoadCallbacks();
testRunner.setCanOpenWindows();
}
jsTestIsAsync = true;
</script>
</head>
<body>
<script>
description("Tests that we do not open a new window to an invalid URL. This test PASSED if you see an entry in the dumped frame load callbacks of the form: &quot;willPerformClientRedirectToURL: http://A=a%B=b&quot; followed by &quot;didCancelClientRedirectForFrame&quot;.");
onload = function() {
win = window.open("http://A=a%B=b", "_top");
shouldBecomeEqual("win.testRunner.didCancelClientRedirect", "true", finishJSTest);
};
</script>
</body>
</html>