dom/plugins/test/mochitest/test_bug771202.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 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=771202
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 771202</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <script type="application/javascript" src="utils.js"></script>
    11   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    12 </head>
    13 <body>
    14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=771202">Mozilla Bug 771202</a>
    15 <pre id="test">
    16 <script type="application/javascript">
    18 /** Test for recreating spliced plugin prototype chains after tranplant. **/
    19 SimpleTest.waitForExplicitFinish();
    20 setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
    22 function go() {
    23   // Set things up.
    24   var win = document.getElementById('ifr').contentWindow;
    25   var plugin = win.document.getElementById('pluginElement');
    26   var testValue = plugin.getObjectValue();
    28   function checkPlugin() {
    29       dump("About to call checkObjectValue\n");
    30       ok(plugin.checkObjectValue(testValue), 'Plugin proto should work correctly');
    31   }
    32   // First, check things before transplanting.
    33   checkPlugin();
    35   // Adopt the plugin and retest.
    36   document.body.appendChild(plugin);
    37   checkPlugin();
    39   // All done.
    40   SimpleTest.finish();
    41 }
    43 </script>
    44 </pre>
    46 <iframe id="ifr" onload="go();" src="file_bug771202.html">
    47 </body>
    48 </html>

mercurial