dom/plugins/test/mochitest/test_npn_asynccall.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <html>
     2 <head>
     3   <title>NPN_AsyncCallback Tests</title>
     4   <script type="text/javascript" 
     5           src="/tests/SimpleTest/SimpleTest.js"></script>
     6   <script type="text/javascript" src="utils.js"></script>
     7   <link rel="stylesheet" type="text/css" 
     8         href="/tests/SimpleTest/test.css" />
     9 </head>
    10 <body onload="runTests()">
    11   <script class="testbody" type="application/javascript">
    13   SimpleTest.waitForExplicitFinish();
    14   setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
    16   function asyncTestsComplete(result) {
    17     ok(result, "asyncCallback tests completed");
    18     SimpleTest.finish();
    19   }
    21   function runTests() {
    22     var plugin = document.getElementById("plugin1");
    23     plugin.asyncCallbackTest("asyncTestsComplete");
    24   }
    25   </script>
    27   <p id="display"></p>
    29   <embed id="plugin1" type="application/x-test" width="400" height="100">
    30   </embed>
    32  </body>
    33  </html>

mercurial