|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=660404 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 660404</title> |
|
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
10 </head> |
|
11 <body> |
|
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=660404">Mozilla Bug 660404</a> |
|
13 <p id="display"></p> |
|
14 <div id="content" style="display: none"> |
|
15 |
|
16 </div> |
|
17 <pre id="test"> |
|
18 <script type="application/javascript"> |
|
19 |
|
20 /** Test for Bug 660404 **/ |
|
21 SimpleTest.waitForExplicitFinish(); |
|
22 |
|
23 var w; |
|
24 |
|
25 function continueTest() { |
|
26 // Do this async so the load event can finish firing |
|
27 SimpleTest.executeSoon(function() { |
|
28 w.onpagehide = function(ev) { |
|
29 is(ev.persisted, true, "Should be bfcached when navigating to multipart"); |
|
30 } |
|
31 w.location.href = "file_bug660404"; |
|
32 }); |
|
33 } |
|
34 |
|
35 function finishTest() { |
|
36 is(w.document.documentElement.textContent, "opener.finishTest();"); |
|
37 is(w.document.documentElement.innerHTML, "<head><script>opener.finishTest();</"+"script></head>"); |
|
38 w.close(); |
|
39 SimpleTest.finish(); |
|
40 } |
|
41 |
|
42 // Have to open a new window, since there's no bfcache in subframes |
|
43 w = window.open("data:text/html,<script>window.onload = function() { opener.continueTest(); }</"+"script>"); |
|
44 |
|
45 </script> |
|
46 </pre> |
|
47 </body> |
|
48 </html> |