REGRESSION (r230843): Flash doesn't work; Produces blue box on page
[WebKit.git] / LayoutTests / http / tests / plugins / plugin-allow-then-reload.html
1 <html>
2 <body>
3 <script>
4 function doTest()
5 {
6     if (!window.testRunner || !window.internals) {
7         document.body.innerHTML = "FAIL: requires internals API";
8         return;
9     }
10     if (!window.localStorage.step) {
11         testRunner.waitUntilDone();
12         testRunner.dumpAsText();
13
14         window.localStorage.step = 1;
15         window.localStorage.step0Value = window.internals.pluginCount();
16
17         testRunner.setBlockAllPlugins(true);
18
19         window.location.reload();
20         return;
21     }
22     if (window.localStorage.step == 1) {
23         window.localStorage.step = 2;
24         window.localStorage.step1Value = window.internals.pluginCount();
25
26         testRunner.setBlockAllPlugins(false);
27
28         window.location.reload();
29         return;
30     }
31     window.localStorage.step2Value = window.internals.pluginCount();
32     var test1 = window.localStorage.step0Value > window.localStorage.step1Value;
33     var test2 = window.localStorage.step2Value > window.localStorage.step1Value;
34
35     var message = "number of plugins decreased after blocking: " + (test1 ? "PASS" : "FAIL");
36     message += "<br>";
37     message += "number of plugins increased after allowing: " + (test2 ? "PASS" : "FAIL");
38     message += "<br>";
39     message += test1 && test2 ? "PASS" : "FAIL";
40     document.body.innerHTML = message;
41
42     testRunner.notifyDone();
43 }
44 doTest();
45 </script>
46 </body>
47 </html>