Keep around a pre-warmed process when doing process swap on navigation
[WebKit.git] / LayoutTests / fast / events / beforeunload-alert-no-user-interaction.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/js-test-pre.js"></script>
5 <script>
6 description("Tests that the beforeunload alert is not shown when the user did not interact with the page. You should NOT see a 'CONFIRM NAVIGATION' message at the top.");
7 jsTestIsAsync = true;
8
9 onload = function() {
10     const testFrame = document.getElementById("testFrame");
11     testFrame.contentWindow.onbeforeunload = function(e) {
12         return "FAIL: a beforeunload alert was shown even though the user did not interact with the page.";
13     };
14     setTimeout(function() {
15         testFrame.src = "about:blank";
16         setTimeout(finishJSTest, 0);
17     }, 0);
18 };
19 </script>
20 <iframe id="testFrame" src="resources/onclick.html"></iframe>
21 <script src="../../resources/js-test-post.js"></script>
22 </body>
23 </html>