editor/libeditor/base/tests/test_bug514156.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=514156
     5 -->
     6 <head>
     7   <title>Test for Bug 514156</title>
     8   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
    10   <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    11   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    12 </head>
    13 <body onload="test()">
    14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=514156">Mozilla Bug 514156</a>
    15 <p id="display"></p>
    16 <div id="content">
    17 <input type="text" id="input1">
    18 <input type="text" id="input2">
    19 </div>
    20 <pre id="test">
    21 <script class="testbody" type="text/javascript">
    23 /** Test for Bug 514156 **/
    25 SimpleTest.waitForExplicitFinish();
    27 function test() {
    28   var input1 = $("input1");
    29   input1.focus();
    30   synthesizeKey("\u200e", { });
    31   synthesizeKey("\u05d0", { });
    32   synthesizeKey("\u05d1", { });
    33   is(escape(input1.value), escape("\u200e\u05d0\u05d1"), "non-spacing character and direction change shouldn't change content");
    35   var input2 = $("input2");
    36   input2.focus();
    37   synthesizeKey("\u05b6", { });
    38   synthesizeKey("a", { });
    39   synthesizeKey("b", { });
    40   synthesizeKey("c", { });
    41   is(escape(input2.value), escape("\u05b6abc"), "non-spacing character and direction change shouldn't change content");
    43   SimpleTest.finish();
    44 }
    46 </script>
    47 </pre>
    48 </body>
    49 </html>

mercurial