|
1 <html> |
|
2 <head> |
|
3 <title>NPAPI Cookie Tests</title> |
|
4 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
5 <script type="application/javascript" src="utils.js"></script> |
|
6 |
|
7 <link rel="stylesheet" type="text/css" |
|
8 href="/tests/SimpleTest/test.css" /> |
|
9 </head> |
|
10 |
|
11 <body onload="runTests()"> |
|
12 <script class="testbody" type="application/javascript"> |
|
13 SimpleTest.waitForExplicitFinish(); |
|
14 setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED); |
|
15 |
|
16 function runTests() { |
|
17 var pluginElement = document.getElementById("plugin1"); |
|
18 var c = 0; |
|
19 var foundSetColor = false; |
|
20 for (var n in pluginElement) { |
|
21 ++c; |
|
22 ok(n in pluginElement, "Enumerated property which doesn't exist?"); |
|
23 if (n == 'setColor') |
|
24 foundSetColor = true; |
|
25 } |
|
26 ok(c > 0, "Should have enumerated some properties"); |
|
27 ok(foundSetColor, "Should have enumerated .setColor"); |
|
28 SimpleTest.finish(); |
|
29 } |
|
30 </script> |
|
31 |
|
32 <p id="display"></p> |
|
33 |
|
34 <embed id="plugin1" type="application/x-test" width="400" height="400"></embed> |
|
35 </body> |
|
36 </html> |