|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=677638 |
|
5 --> |
|
6 <head> |
|
7 <meta charset="utf-8"> |
|
8 <title>Test for Bug 677638 - pref</title> |
|
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
11 </head> |
|
12 <body> |
|
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=677638">Mozilla Bug 677638</a> |
|
14 <div id="content"></div> |
|
15 <pre id="test"> |
|
16 </pre> |
|
17 <script type="application/javascript"> |
|
18 |
|
19 function runTest(what) { |
|
20 var status; |
|
21 try { |
|
22 status = MessageChannel; |
|
23 ok(what, "Should MessageChannel exist?"); |
|
24 } catch(e) { |
|
25 ok(!what, "Should MessageChannel exist?"); |
|
26 } |
|
27 } |
|
28 |
|
29 SimpleTest.waitForExplicitFinish(); |
|
30 |
|
31 runTest(false); |
|
32 SpecialPowers.pushPrefEnv({"set": [["dom.messageChannel.enabled", true]]}, |
|
33 function() { runTest(true); SimpleTest.finish(); }); |
|
34 </script> |
|
35 </body> |
|
36 </html> |