Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Unified Diff: third_party/WebKit/LayoutTests/fast/events/javascript-uri-navigation-blocked-in-unload-handler.html

Issue 1451123002: Block javascript: document navigations during page dismissal events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added e-mail to AUTHORS Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/LayoutTests/fast/events/javascript-uri-navigation-blocked-in-unload-handler-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698