Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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>