content/xul/document/test/test_bug335375.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 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
     4 <?xul-overlay href="overlay1_bug335375.xul"?>
     5 <?xul-overlay href="overlay2_bug335375.xul"?>
     6 <!--
     7 https://bugzilla.mozilla.org/show_bug.cgi?id=335375
     8 -->
     9 <window title="Mozilla Bug 335375"
    10         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    11         onload="RunTest();">
    13   <script type="application/javascript"
    14           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>      
    16   <script type="application/javascript">
    17     <![CDATA[
    18       SimpleTest.waitForExplicitFinish();
    20       function RunTest()
    21       {
    22         var cmd = document.getElementById("cmd_test");
    23         var button = document.getElementById("button_test");
    25         is(cmd.getAttribute("accesskey"), "C",
    26            "checking command has an accesskey");
    27         is(button.getAttribute("accesskey"), cmd.getAttribute("accesskey"),
    28            "checking command and button have the same accesskey");
    30         cmd.setAttribute("accesskey", "D");
    31         is(button.getAttribute("accesskey"), "D",
    32            "checking button has inherited new accesskey from command");
    34         SimpleTest.finish();
    35       }
    36     ]]>
    37   </script>
    39   <body xmlns="http://www.w3.org/1999/xhtml">
    40     <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=335375"
    41        target="_blank">Mozilla Bug 335375</a>
    42     <p id="display"></p>
    43     <div id="content" style="display: none"></div>
    44     <pre id="test"></pre>
    45   </body>
    47   <commandset id="test_commandset"/>
    48   <toolbarbutton id="button_test"/>
    50 </window>

mercurial