|
1 <html> |
|
2 <head> |
|
3 <title>NPObject [[DefaultValue]] implementation</title> |
|
4 |
|
5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
6 <script type="text/javascript" src="utils.js"></script> |
|
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
8 </head> |
|
9 |
|
10 <body onload="run()"> |
|
11 |
|
12 <script class="testbody" type="application/javascript"> |
|
13 SimpleTest.waitForExplicitFinish(); |
|
14 setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED); |
|
15 |
|
16 function run() { |
|
17 var plugin = document.getElementById("plugin"); |
|
18 var pluginProto = Object.getPrototypeOf(plugin); |
|
19 |
|
20 plugin.propertyAndMethod = {}; |
|
21 plugin.propertyAndMethod + "baz"; |
|
22 ok(true, "|plugin.propertyAndMethod + \"baz\"| shouldn't assert"); |
|
23 pluginProto.propertyAndMethod = {}; |
|
24 pluginProto.propertyAndMethod + "quux"; |
|
25 ok(true, "|pluginProto.propertyAndMethod + \"quux\"| shouldn't assert"); |
|
26 |
|
27 plugin + "foo"; |
|
28 ok(true, "|plugin + \"foo\"| shouldn't assert"); |
|
29 pluginProto + "bar"; |
|
30 ok(true, "|pluginProto + \"bar\"| shouldn't assert"); |
|
31 |
|
32 SimpleTest.finish(); |
|
33 } |
|
34 </script> |
|
35 |
|
36 <embed id="plugin" type="application/x-test" wmode="window"></embed> |
|
37 </body> |
|
38 </html> |