4 https://bugzilla.mozilla.org/show_bug.cgi?id=1186696
8 <title>Test for Bug
1186696</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
11 <script type=
"application/javascript">
12 /* global TestInterfaceJS */
13 /** Test for Bug
1186696 **/
14 SimpleTest.waitForExplicitFinish();
17 var values = [ function() {},
5, null, undefined,
"some string", {} ];
19 while (values.length) {
20 var value = values.pop();
21 var t = new TestInterfaceJS();
22 t.onsomething = value;
23 var gottenValue = t.onsomething;
24 if (typeof value ==
"object" || typeof value ==
"function") {
25 is(gottenValue, value,
"Should get back the object-or-null we put in");
27 is(gottenValue, null,
"Should get back null");
34 SpecialPowers.pushPrefEnv({set: [[
"dom.expose_test_interfaces", true]]},
39 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1186696">Mozilla Bug
1186696</a>
41 <div id=
"content" style=
"display: none">