OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p id="description"></p> | 7 <p id="description"></p> |
8 <pre id="console"></pre> | 8 <pre id="console"></pre> |
9 | 9 |
10 <script> | 10 <script> |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 if (location.hash.indexOf('wentBack') == -1) { | 26 if (location.hash.indexOf('wentBack') == -1) { |
27 // Run else code path after going back. | 27 // Run else code path after going back. |
28 location.hash = 'wentBack'; | 28 location.hash = 'wentBack'; |
29 | 29 |
30 setFrameSrc(); | 30 setFrameSrc(); |
31 | 31 |
32 // Navigate forward and back to create forward navigation entry. | 32 // Navigate forward and back to create forward navigation entry. |
33 // Must be done outside the load handler to generate history entry. | 33 // Must be done outside the load handler to generate history entry. |
34 window.setTimeout(function() { | 34 window.setTimeout(function() { |
35 location.href = 'data:text/html,<body onload="history.back()">Mu
st not see this text!!!</body>'; | 35 location.href = 'resources/back-on-load.html'; |
36 }, 0); | 36 }, 0); |
37 } else { | 37 } else { |
38 window.setTimeout(setFrameSrcAndfinishTest, 100); | 38 window.setTimeout(setFrameSrcAndfinishTest, 100); |
39 } | 39 } |
40 } | 40 } |
41 | 41 |
42 function setFrameSrc() { | 42 function setFrameSrc() { |
43 document.querySelector('iframe').src = 'about:blank/#identifier'; | 43 document.querySelector('iframe').src = 'about:blank/#identifier'; |
44 } | 44 } |
45 | 45 |
46 function setFrameSrcAndfinishTest() { | 46 function setFrameSrcAndfinishTest() { |
47 document.querySelector('iframe').src = 'about:blank/#identifier'; | 47 document.querySelector('iframe').src = 'about:blank/#identifier'; |
48 testRunner.dumpBackForwardList(); | 48 testRunner.dumpBackForwardList(); |
49 finishJSTest(); | 49 finishJSTest(); |
50 } | 50 } |
51 </script> | 51 </script> |
52 </body> | 52 </body> |
53 </html> | 53 </html> |
OLD | NEW |