editor/libeditor/html/tests/test_bug550434.html

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 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=550434
     5 -->
     6 <head>
     7   <title>Test for Bug 550434</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    10   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    11 </head>
    12 <body>
    13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=550434">Mozilla Bug 550434</a>
    14 <p id="display"></p>
    15 <div id="content">
    16   <div id="editor" contenteditable="true"
    17        style="height: 250px; height: 200px; border: 4px solid red; outline: none;"></div>
    18 </div>
    19 <pre id="test">
    20 <script type="application/javascript">
    22 /** Test for Bug 550434 **/
    24 SimpleTest.waitForExplicitFinish();
    25 SimpleTest.waitForFocus(function() {
    26   var ed = document.getElementById("editor");
    28   // Simulate click twice
    29   synthesizeMouse(ed, 10, 10, {});
    30   synthesizeMouse(ed, 50, 50, {});
    31   setTimeout(function() {
    32   synthesizeKey("x", {});
    34   is(ed.innerHTML, "x", "Editor should work after being clicked twice");
    35   SimpleTest.finish();
    36   }, 0);
    37 });
    39 </script>
    40 </pre>
    41 </body>
    42 </html>

mercurial