toolkit/content/tests/chrome/window_preferences_commandretarget.xul

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <?xml version="1.0"?>
     2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     3 <!--
     4   XUL Widget Test for preferences window. This particular test ensures that
     5   a checkbox with a command attribute properly updates even though the command
     6   event gets retargeted.
     7 -->
     8 <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     9             title="preferences window"
    10             windowtype="test:preferences"
    11             buttons="accept,cancel"
    12             onload="RunTest(window.arguments)">
    13   <script type="application/javascript">
    14   <![CDATA[
    15     function RunTest(aArgs)
    16     {
    17       aArgs[0](this);
    18       document.documentElement.cancelDialog();
    19     }
    20   ]]>
    21   </script>
    23   <prefpane id="sample_pane" label="Sample Prefpane">
    24     <preferences id="sample_preferences">
    25       <preference id="tests.static_preference_bool"
    26                   name="tests.static_preference_bool"
    27                   type="bool"/>
    28     </preferences>
    30     <commandset>
    31       <command id="cmd_test" preference="tests.static_preference_bool"/>
    32     </commandset>
    34     <checkbox id="checkbox" label="Enable Option" preference="tests.static_preference_bool" command="cmd_test"/>
    35   </prefpane>
    36 </prefwindow>

mercurial