|
1 <?xml version="1.0"?> |
|
2 <?xml-stylesheet type="text/css" href="chrome://global/skin"?> |
|
3 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?> |
|
4 <!-- |
|
5 https://bugzilla.mozilla.org/show_bug.cgi?id=944407 |
|
6 --> |
|
7 <window title="Mozilla Bug 944407" |
|
8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
|
9 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> |
|
10 |
|
11 <!-- test results are displayed in the html:body --> |
|
12 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
13 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=944407" |
|
14 target="_blank">Mozilla Bug 944407</a> |
|
15 </body> |
|
16 |
|
17 <!-- test code goes here --> |
|
18 <script type="application/javascript"> |
|
19 <![CDATA[ |
|
20 |
|
21 /** Test for XBL bindings with script disabled. **/ |
|
22 SimpleTest.waitForExplicitFinish(); |
|
23 const Cu = Components.utils; |
|
24 Cu.import('resource://gre/modules/Services.jsm'); |
|
25 |
|
26 function go() { |
|
27 |
|
28 // Disable javascript, and load the frame. |
|
29 function loadFrame() { |
|
30 ok(!Services.prefs.getBoolPref('javascript.enabled'), "Javascript should be disabled"); |
|
31 $('ifr').setAttribute('src', 'http://mochi.test:8888/tests/dom/xbl/test/file_bug944407.html'); |
|
32 } |
|
33 SpecialPowers.pushPrefEnv({ set: [['javascript.enabled', false]] }, loadFrame); |
|
34 } |
|
35 |
|
36 function finish() { |
|
37 SimpleTest.finish(); |
|
38 } |
|
39 |
|
40 addLoadEvent(go); |
|
41 ]]> |
|
42 </script> |
|
43 <iframe id='ifr' /> |
|
44 </window> |