OLD | NEW |
---|---|
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 if (window.testRunner) { | 4 if (window.testRunner) { |
5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
6 testRunner.waitUntilDone(); | 6 testRunner.waitUntilDone(); |
7 } | 7 } |
8 | 8 |
9 function log(a) | 9 function log(a) |
10 { | 10 { |
11 document.getElementById("results").innerHTML += a + "<br>"; | 11 document.getElementById("results").innerHTML += a + "<br>"; |
12 } | 12 } |
13 | 13 |
14 function test() | 14 function test() |
15 { | 15 { |
16 var plugin = document.createElement('embed'); | 16 var plugin = document.createElement('embed'); |
17 plugin.setAttribute("type", "application/x-webkit-test-netscape"); | 17 plugin.setAttribute("type", "application/x-blink-deprecated-test-plugin"); |
18 plugin.setAttribute("onNew", "loadedFirst()"); | 18 plugin.setAttribute("onNew", "loadedFirst()"); |
19 document.getElementById("plugins").appendChild(plugin); | 19 document.getElementById("plugins").appendChild(plugin); |
20 } | 20 } |
21 | 21 |
22 function done() | 22 function done() |
23 { | 23 { |
24 if (window.testRunner) | 24 if (window.testRunner) |
25 testRunner.notifyDone(); | 25 testRunner.notifyDone(); |
26 } | 26 } |
27 | 27 |
28 function loadedFirst() | 28 function loadedFirst() |
29 { | 29 { |
30 log("PASS: first plugin loaded"); | 30 log("PASS: first plugin loaded"); |
31 if (window.testRunner && testRunner.setPluginsAllowed) | 31 if (window.testRunner && testRunner.setPluginsAllowed) |
32 testRunner.setPluginsAllowed(false); | 32 testRunner.setPluginsAllowed(false); |
33 else | 33 else |
34 log("This test requires testRunner.setPluginsAllowed, so it be can't run in a browser."); | 34 log("This test requires testRunner.setPluginsAllowed, so it be can't run in a browser."); |
35 | 35 |
36 var plugin = document.createElement('embed'); | 36 var plugin = document.createElement('embed'); |
37 plugin.setAttribute("type", "application/x-webkit-test-netscape"); | 37 plugin.setAttribute("type", "application/x-blink-deprecated-test-plugin"); |
dcheng
2016/03/22 18:03:05
Similar to the sandboxed plugins, I think this is
piman
2016/03/23 05:30:24
As discussed, we can use the "regular" plugin and
| |
38 plugin.setAttribute("onNew", "loadedSecond()"); | 38 plugin.setAttribute("onNew", "loadedSecond()"); |
39 document.getElementById("plugins").appendChild(plugin); | 39 document.getElementById("plugins").appendChild(plugin); |
40 window.setTimeout(done, 5); | 40 window.setTimeout(done, 5); |
41 } | 41 } |
42 | 42 |
43 function loadedSecond() | 43 function loadedSecond() |
44 { | 44 { |
45 log("FAIL: second plugin loaded"); | 45 log("FAIL: second plugin loaded"); |
46 } | 46 } |
47 </script> | 47 </script> |
48 </head> | 48 </head> |
49 <body onload="test()"> | 49 <body onload="test()"> |
50 <div id="plugins"> | 50 <div id="plugins"> |
51 </div> | 51 </div> |
52 <div id="results"></div> | 52 <div id="results"></div> |
53 </body> | 53 </body> |
54 </html> | 54 </html> |
OLD | NEW |