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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/pageshow-pagehide-on-back-uncached.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 <p>Test pageshow/pagehide event behavior when navigating back to an uncached pag e.</p> 1 <p>Test pageshow/pagehide event behavior when navigating back to an uncached pag e.</p>
2 <script> 2 <script>
3 if (window.testRunner) { 3 if (window.testRunner) {
4 testRunner.dumpAsText(); 4 testRunner.dumpAsText();
5 testRunner.waitUntilDone(); 5 testRunner.waitUntilDone();
6 } 6 }
7 7
8 window.onload = function(evt) { 8 window.onload = function(evt) {
9 alert("window.onload"); 9 alert("window.onload");
10 if (window.name == 'pageshow/pagehide') { 10 if (window.name == 'pageshow/pagehide') {
11 // Returned back. 11 // Returned back.
12 window.name = ""; 12 window.name = "";
13 window.onpagehide = null; 13 window.onpagehide = null;
14 setTimeout(function() { if (window.testRunner) testRunner.notifyDone(); }, 10); 14 setTimeout(function() { if (window.testRunner) testRunner.notifyDone(); }, 10);
15 } else { 15 } else {
16 window.name = "pageshow/pagehide"; 16 window.name = "pageshow/pagehide";
17 setTimeout('window.location = "data:text/html,<script>history.back();</s cr" + "ipt>"', 0); 17 setTimeout('window.location = "../../resources/back.html"', 0);
18 } 18 }
19 } 19 }
20 20
21 window.onunload = function() {} // prevent caching 21 window.onunload = function() {} // prevent caching
22 22
23 window.onpageshow = function(evt) { 23 window.onpageshow = function(evt) {
24 alert("window.onpageshow" + ", target = " + evt.target + ", persisted = " + evt.persisted); 24 alert("window.onpageshow" + ", target = " + evt.target + ", persisted = " + evt.persisted);
25 } 25 }
26 26
27 window.onpagehide = function(evt) { 27 window.onpagehide = function(evt) {
28 alert("window.onpagehide" + ", target = " + evt.target + ", persisted = " + evt.persisted); 28 alert("window.onpagehide" + ", target = " + evt.target + ", persisted = " + evt.persisted);
29 } 29 }
30 30
31 </script> 31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698