e6e542a7998b05ee48e2aaa2deafbfccd4361e1a
[WebKit-https.git] / LayoutTests / fast / events / pagehide-xhr-open.html
1 <html>
2 <script src="../js/resources/js-test-pre.js"></script>
3 <body>
4
5 <iframe src="resources/subframe-xmlhttprequest.html" id="a-frame"></iframe> <iframe src="resources/suspend-subframe-2.html" id="b-frame"></iframe>
6
7 <script type="text/javascript">
8 description('Tries to trigger an assert in xmlhttprequest during pagehide.');
9
10 if (window.testRunner)
11     testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
12
13
14 onpageshow = function(event)
15 {
16     if (event.persisted) {
17         console.log('Restored page from page cache.');
18         if (!window.wasFinishJSTestCalled)
19             finishJSTest();
20     }
21 }
22
23 onload = function()
24 {
25     setTimeout(function() {
26         location.href = 'resources/pagehide-timeout-go-back.html';
27     }, 0);
28 }
29 var successfullyParsed = true;
30 var jsTestIsAsync = true;
31 </script>
32 <script src="../js/resources/js-test-post.js"></script>
33 </body>
34 </html>