Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=771202 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <meta charset="utf-8"> |
michael@0 | 8 | <title>Test for Bug 771202</title> |
michael@0 | 9 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | <script type="application/javascript" src="utils.js"></script> |
michael@0 | 11 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 12 | </head> |
michael@0 | 13 | <body> |
michael@0 | 14 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=771202">Mozilla Bug 771202</a> |
michael@0 | 15 | <pre id="test"> |
michael@0 | 16 | <script type="application/javascript"> |
michael@0 | 17 | |
michael@0 | 18 | /** Test for recreating spliced plugin prototype chains after tranplant. **/ |
michael@0 | 19 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 20 | setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED); |
michael@0 | 21 | |
michael@0 | 22 | function go() { |
michael@0 | 23 | // Set things up. |
michael@0 | 24 | var win = document.getElementById('ifr').contentWindow; |
michael@0 | 25 | var plugin = win.document.getElementById('pluginElement'); |
michael@0 | 26 | var testValue = plugin.getObjectValue(); |
michael@0 | 27 | |
michael@0 | 28 | function checkPlugin() { |
michael@0 | 29 | dump("About to call checkObjectValue\n"); |
michael@0 | 30 | ok(plugin.checkObjectValue(testValue), 'Plugin proto should work correctly'); |
michael@0 | 31 | } |
michael@0 | 32 | // First, check things before transplanting. |
michael@0 | 33 | checkPlugin(); |
michael@0 | 34 | |
michael@0 | 35 | // Adopt the plugin and retest. |
michael@0 | 36 | document.body.appendChild(plugin); |
michael@0 | 37 | checkPlugin(); |
michael@0 | 38 | |
michael@0 | 39 | // All done. |
michael@0 | 40 | SimpleTest.finish(); |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | </script> |
michael@0 | 44 | </pre> |
michael@0 | 45 | |
michael@0 | 46 | <iframe id="ifr" onload="go();" src="file_bug771202.html"> |
michael@0 | 47 | </body> |
michael@0 | 48 | </html> |