[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / LayoutTests / plugins / reloadplugins-and-pages.html
1 <html>
2 <body>
3 <embed id="plg" type="application/x-webkit-test-netscape"></embed>
4 <p>Test for NPN_RelaodPlugin in which reloadOpenPages is true. You should see two alerts, indicating that the page was loaded twice.</p>
5 <div id='res'>FAILURE</div>
6 <script>
7     alert("Page was loaded");
8     callReload = true;
9     if (window.sessionStorage) {
10         if (window.sessionStorage.reloadPluginsAndPagesCalled) {
11             callReload = false;
12         } else {
13             window.sessionStorage.reloadPluginsAndPagesCalled = 1;
14         }
15     }
16
17     if (window.layoutTestController)
18         layoutTestController.dumpAsText();
19     
20     if (callReload) {
21         try {
22             if (window.layoutTestController)
23                 layoutTestController.waitUntilDone();
24             document.getElementById('plg').reloadPluginsAndPages();
25         } catch (ex) {
26             alert("Exception: " + ex.description + ". Test plugin was not found");
27         }
28     } else {
29         document.getElementById('res').innerHTML="SUCCESS";
30         if (window.layoutTestController)
31             layoutTestController.notifyDone();
32     }
33 </script>
34 </body>
35 </html>