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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <title>Ensure that javascript: document navigations are blocked during onunload. </title>
4 </head>
5 <body>
6 <pre id="console"></pre>
7 <script>
8 if (window.testRunner) {
9 testRunner.dumpAsText();
10 testRunner.waitUntilDone();
11 }
12
13 function log(msg) {
14 document.getElementById("console").appendChild(document.createTextNode(msg + "\n"));
15 }
16
17 var i = document.body.appendChild(document.createElement('iframe'));
18 i.contentWindow.onunload = function() {
19 i.src = "javascript:top.log('PASS: script executed');" +
20 "'<script>top.log(\\'FAIL: document navigation not aborted\\');<" +
21 "/script>'";
22 if (window.testRunner)
23 testRunner.notifyDone();
24 }
25
26 i.src = "data:text/html,test";
27 </script>
28 </body>
29 </html>
OLDNEW
« 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