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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/onunload-clears-onbeforeunload.html

Issue 2741513002: [Merge M-57] Add a warning for the deprecation of content-initiated data URL navigations (Closed)
Patch Set: Created 3 years, 9 months 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
1 <html> 1 <html>
2 2
3 <head> 3 <head>
4 <script> 4 <script>
5 5
6 if (window.testRunner) { 6 if (window.testRunner) {
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 testRunner.waitUntilDone(); 8 testRunner.waitUntilDone();
9 } 9 }
10 10
11 window.addEventListener('beforeunload', before, false); 11 window.addEventListener('beforeunload', before, false);
12 window.onunload = unload; 12 window.onunload = unload;
13 13
14 function before() 14 function before()
15 { 15 {
16 alert( "before unload"); 16 alert( "before unload");
17 } 17 }
18 18
19 function unload() 19 function unload()
20 { 20 {
21 alert( "unload" ); 21 alert( "unload" );
22 window.removeEventListener('beforeunload', before, false); 22 window.removeEventListener('beforeunload', before, false);
23 } 23 }
24 24
25 function load() 25 function load()
26 { 26 {
27 location = "data:text/html,If you didn't hit an assert you PASS.<script>if ( window.testRunner) testRunner.notifyDone(); </" + "script>"; 27 location = "resources/onunload-clears-onbeforeunload-success.html";
28 } 28 }
29 29
30 </script> 30 </script>
31 </head> 31 </head>
32 32
33 <body onload="load()"> 33 <body onload="load()">
34 start document 34 start document
35 </body> 35 </body>
36 36
37 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698