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.
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Test whether windowless plugins receive correct visible/invisible notifications.</title>
5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
6 <script type="text/javascript" src="utils.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
9 <body>
10 <script type="text/javascript">
11 setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
12 </script>
14 <p id="display"></p>
16 <embed id="theplugin" type="application/x-test"></embed>
18 <script type="application/javascript">
19 function MyFunc(arg) {
20 is(arg, "hi", "Argument passed to constructor function");
21 this.localProp = 'local';
22 }
23 MyFunc.prototype.protoProp = 't';
25 var theplugin = document.getElementById('theplugin');
27 ok(theplugin.constructObject(Array) instanceof Array, "Constructed Array");
28 var o = theplugin.constructObject(MyFunc, "hi");
29 ok(o instanceof MyFunc, "Constructed MyFunc");
30 is(o.localProp, 'local', "this property correct");
31 is(o.protoProp, 't', "prototype property correct");
32 </script>