dom/xbl/test/test_bug944407.xul

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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"/>
    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>
    17   <!-- test code goes here -->
    18   <script type="application/javascript">
    19   <![CDATA[
    21   /** Test for XBL bindings with script disabled. **/
    22   SimpleTest.waitForExplicitFinish();
    23   const Cu = Components.utils;
    24   Cu.import('resource://gre/modules/Services.jsm');
    26   function go() {
    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   }
    36   function finish() {
    37     SimpleTest.finish();
    38   }
    40   addLoadEvent(go);
    41   ]]>
    42   </script>
    43   <iframe id='ifr' />
    44 </window>

mercurial