Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <html>
2 <head>
3 <title>NPObject [[DefaultValue]] implementation</title>
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>
10 <body onload="run()">
12 <script class="testbody" type="application/javascript">
13 SimpleTest.waitForExplicitFinish();
14 setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
16 function run() {
17 var plugin = document.getElementById("plugin");
18 var pluginProto = Object.getPrototypeOf(plugin);
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");
27 plugin + "foo";
28 ok(true, "|plugin + \"foo\"| shouldn't assert");
29 pluginProto + "bar";
30 ok(true, "|pluginProto + \"bar\"| shouldn't assert");
32 SimpleTest.finish();
33 }
34 </script>
36 <embed id="plugin" type="application/x-test" wmode="window"></embed>
37 </body>
38 </html>