toolkit/content/tests/chrome/window_preferences3.xul

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 <?xml version="1.0"?>
     2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     3 <!--
     4   XUL Widget Test for preferences window
     5 -->
     6 <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     7             title="preferences window"
     8             windowtype="test:preferences3"
     9             buttons="accept,cancel"
    10             onload="RunTest(window.arguments)"
    11             type="child"
    12 >
    13   <script type="application/javascript">
    14   <![CDATA[
    15     function RunTest(aArgs)
    16     {
    17       // run test
    18       aArgs[0].test(this);
    19       // close dialog
    20       document.documentElement[aArgs[0].accept ? "acceptDialog" : "cancelDialog"]();
    21     }
    22   ]]>
    23   </script>
    25   <prefpane id="sample_pane" label="Sample Prefpane">
    26     <preferences id="sample_preferences">
    27       <!-- one of each type known to <preferences>.valueFromPreferences -->
    28       <preference id  ="tests.static_preference_int"
    29                   name="tests.static_preference_int"
    30                   type="int"/>
    31       <preference id  ="tests.static_preference_bool"
    32                   name="tests.static_preference_bool"
    33                   type="bool"/>
    34       <preference id  ="tests.static_preference_string"
    35                   name="tests.static_preference_string"
    36                   type="string"/>
    37       <preference id  ="tests.static_preference_wstring"
    38                   name="tests.static_preference_wstring"
    39                   type="wstring"/>
    40       <preference id  ="tests.static_preference_unichar"
    41                   name="tests.static_preference_unichar"
    42                   type="unichar"/>
    43       <preference id  ="tests.static_preference_file"
    44                   name="tests.static_preference_file"
    45                   type="file"/>
    46     </preferences>
    48     <!-- one element for each preference type above -->
    49     <hbox>
    50       <label flex="1" value="int"/>
    51       <textbox id="static_element_int"     preference="tests.static_preference_int"/>
    52     </hbox>
    53     <hbox>
    54       <label flex="1" value="bool"/>
    55       <checkbox id="static_element_bool"   preference="tests.static_preference_bool"/>
    56     </hbox>
    57     <hbox>
    58       <label flex="1" value="string"/>
    59       <textbox id="static_element_string"  preference="tests.static_preference_string"/>
    60     </hbox>
    61     <hbox>
    62       <label flex="1" value="wstring"/>
    63       <textbox id="static_element_wstring" preference="tests.static_preference_wstring"/>
    64     </hbox>
    65     <hbox>
    66       <label flex="1" value="unichar"/>
    67       <textbox id="static_element_unichar" preference="tests.static_preference_unichar"/>
    68     </hbox>
    69     <hbox>
    70       <label flex="1" value="file"/>
    71       <textbox id="static_element_file"    preference="tests.static_preference_file"/>
    72     </hbox>
    73   </prefpane>
    74 </prefwindow>

mercurial