toolkit/content/tests/chrome/test_bug471776.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"?>
     3 <!-- This Source Code Form is subject to the terms of the Mozilla Public
     4    - License, v. 2.0. If a copy of the MPL was not distributed with this
     5    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
     8 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
     9 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
    11 <window title="Textbox with placeholder undo test" width="500" height="600"
    12         onload="doTest();"
    13         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    14   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    15   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
    17   <hbox>
    18     <textbox id="t1" placeholder="empty"/>
    19   </hbox>
    21   <!-- test results are displayed in the html:body -->
    22   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;">
    23     <p id="display">
    24     </p>
    25     <div id="content" style="display: none">
    26     </div>
    27     <pre id="test">
    28     </pre>
    29   </body>
    31   <!-- test code goes here -->
    32   <script type="application/javascript"><![CDATA[
    33     SimpleTest.waitForExplicitFinish();
    35     function doTest() {
    36       var t1 = $("t1");
    37       t1.focus();
    38       var t1Enabled = {};
    39       var t1CanUndo = {};
    40       t1.editor.canUndo(t1Enabled, t1CanUndo);
    41       ok(!t1CanUndo.value, "undo correctly disabled when no user edits");
    42       SimpleTest.finish();
    43     }
    45   ]]></script>
    47 </window>

mercurial