dom/plugins/test/mochitest/test_defaultValue.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/plugins/test/mochitest/test_defaultValue.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,38 @@
     1.4 +<html>
     1.5 +  <head>
     1.6 +    <title>NPObject [[DefaultValue]] implementation</title>
     1.7 +
     1.8 +    <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.9 +    <script type="text/javascript" src="utils.js"></script>
    1.10 +    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.11 +  </head>
    1.12 +
    1.13 +  <body onload="run()">
    1.14 +
    1.15 +    <script class="testbody" type="application/javascript">
    1.16 +      SimpleTest.waitForExplicitFinish();
    1.17 +      setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
    1.18 +
    1.19 +      function run() {
    1.20 +        var plugin = document.getElementById("plugin");
    1.21 +        var pluginProto = Object.getPrototypeOf(plugin);
    1.22 +
    1.23 +        plugin.propertyAndMethod = {};
    1.24 +        plugin.propertyAndMethod + "baz";
    1.25 +        ok(true, "|plugin.propertyAndMethod + \"baz\"| shouldn't assert");
    1.26 +        pluginProto.propertyAndMethod = {};
    1.27 +        pluginProto.propertyAndMethod + "quux";
    1.28 +        ok(true, "|pluginProto.propertyAndMethod + \"quux\"| shouldn't assert");
    1.29 +
    1.30 +        plugin + "foo";
    1.31 +        ok(true, "|plugin + \"foo\"| shouldn't assert");
    1.32 +        pluginProto + "bar";
    1.33 +        ok(true, "|pluginProto + \"bar\"| shouldn't assert");
    1.34 +
    1.35 +        SimpleTest.finish();
    1.36 +      }
    1.37 +    </script>
    1.38 +
    1.39 +    <embed id="plugin" type="application/x-test" wmode="window"></embed>
    1.40 +  </body>
    1.41 +</html>

mercurial