toolkit/content/tests/chrome/test_bug382990.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 <!--
     5 https://bugzilla.mozilla.org/show_bug.cgi?id=382990
     6 -->
     7 <window title="Mozilla Bug 382990"
     8   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     9         onload="startThisTest()">
    10   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
    11   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
    13   <!-- test results are displayed in the html:body -->
    14   <body xmlns="http://www.w3.org/1999/xhtml">
    15   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=382990"
    16      target="_blank">Mozilla Bug 382990</a>
    17   </body>
    19     <tree id="testTree" height="200px">
    20         <treecols>
    21             <treecol flex="1" label="Name" id="name"/>
    22         </treecols>
    23         <treechildren>
    24             <treeitem><treerow><treecell label="a"/></treerow></treeitem>
    25             <treeitem><treerow><treecell label="z"/></treerow></treeitem>
    26         </treechildren>
    27     </tree>
    29   <!-- test code goes here -->
    30   <script type="application/javascript"><![CDATA[
    31     /** Test for Bug 382990 **/
    33     SimpleTest.waitForExplicitFinish();
    34     function startThisTest()
    35     {
    36         var treeElem = document.getElementById("testTree");
    37         treeElem.view.selection.select(0);
    38         treeElem.focus();
    39         synthesizeKey("z", {ctrlKey: true});
    40         ok(!treeElem.view.selection.isSelected(1), "Tree selection should not change for key events with ctrl pressed.");
    41         SimpleTest.finish();
    42     }
    43   ]]></script>
    44 </window>

mercurial