[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / LayoutTests / fast / events / popup-blocked-from-history-reload.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script>
5 if (window.layoutTestController) {
6     layoutTestController.dumpAsText();
7     layoutTestController.setCanOpenWindows();
8     layoutTestController.setPopupBlockingEnabled(true);
9     layoutTestController.setCloseRemainingWindowsWhenComplete(true);
10     layoutTestController.waitUntilDone();
11     // Record current window count.
12     window.windowCount = window.layoutTestController.windowCount();
13 }
14 function testDone() {
15     if (window.layoutTestController && window.layoutTestController.windowCount() == window.windowCount)
16         document.getElementById("console").innerText = "PASSED";
17     // Close the test.
18     layoutTestController.notifyDone();
19 }
20 </script>
21 </head>
22 <body">
23 History reload can only navigate the page in the self frame, no matter what target frame is defined in base tag and no new window can be created. This is a test case for bug https://bugs.webkit.org/show_bug.cgi?id=45369.
24 <div id="loadCount"></div>
25 <div id="console">FAILED</div>
26 <script>
27 if (!sessionStorage.loadCount)
28    sessionStorage.loadCount = 1;
29 else
30    sessionStorage.loadCount = parseInt(sessionStorage.loadCount, 10) + 1;
31 document.getElementById("loadCount").innerText = "load count : " + sessionStorage.loadCount;
32 if (2 == sessionStorage.loadCount)
33     testDone();
34 else
35     history.go();
36 </script>
37 </body>
38 </html>
39