Index: third_party/WebKit/LayoutTests/fast/events/javascript-uri-navigation-blocked-in-unload-handler.html |
diff --git a/third_party/WebKit/LayoutTests/fast/events/javascript-uri-navigation-blocked-in-unload-handler.html b/third_party/WebKit/LayoutTests/fast/events/javascript-uri-navigation-blocked-in-unload-handler.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b09105e020758d553913f471f71a06a07a4b1818 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/events/javascript-uri-navigation-blocked-in-unload-handler.html |
@@ -0,0 +1,29 @@ |
+<html> |
+<head> |
+<title>Ensure that javascript: document navigations are blocked during onunload.</title> |
+</head> |
+<body> |
+<pre id="console"></pre> |
+<script> |
+if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+} |
+ |
+function log(msg) { |
+ document.getElementById("console").appendChild(document.createTextNode(msg + "\n")); |
+} |
+ |
+var i = document.body.appendChild(document.createElement('iframe')); |
+i.contentWindow.onunload = function() { |
+ i.src = "javascript:top.log('PASS: script executed');" + |
+ "'<script>top.log(\\'FAIL: document navigation not aborted\\');<" + |
+ "/script>'"; |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+} |
+ |
+i.src = "data:text/html,test"; |
+</script> |
+</body> |
+</html> |