dom/plugins/test/mochitest/test_multipleinstanceobjects.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/plugins/test/mochitest/test_multipleinstanceobjects.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,24 @@
     1.4 +<head>
     1.5 +  <title>NPNV*NPObject accessibility tests</title>
     1.6 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.7 +  <script type="application/javascript" src="utils.js"></script>
     1.8 +
     1.9 +<body onload="runTests()">
    1.10 +  <script class="testbody" type="application/javascript">
    1.11 +  SimpleTest.waitForExplicitFinish();
    1.12 +  setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
    1.13 +
    1.14 +  function runTests() {
    1.15 +    var p1 = document.getElementById('plugin1');
    1.16 +    var p2 = document.getElementById('plugin2');
    1.17 +
    1.18 +    var o = p1.getObjectValue();
    1.19 +    ok(p1.checkObjectValue(o), "Plugin objects passed to the same instance are identical.");
    1.20 +    ok(!p2.checkObjectValue(o), "Plugin objects passed to another instance are double-wrapped.");
    1.21 +
    1.22 +    SimpleTest.finish();
    1.23 +  }
    1.24 +  </script>
    1.25 +
    1.26 +  <embed id="plugin1" type="application/x-test" width="400" height="400"></embed>
    1.27 +  <embed id="plugin2" type="application/x-test" width="400" height="400"></embed>

mercurial