layout/base/tests/test_bug332655-1.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=332655
     5 -->
     6 <head>
     7   <title>Test for Bug 332655</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=332655">Mozilla Bug 332655</a>
    15 <p id="display"></p>
    16 <div id="content">
    17 <input type="text" id="testInput">
    18 </div>
    19 <pre id="test">
    20 <script class="testbody" type="text/javascript">
    22 /** Test for Bug 332655 **/
    24 SimpleTest.waitForExplicitFinish();
    26 function test() {
    27   var textInput = $("testInput");
    28   var s1, s2, s3, equal, str1, str2;
    30   textInput.focus();
    31   synthesizeKey("a", { });
    32   synthesizeKey("b", { });
    33   synthesizeKey(" ", { });
    34   synthesizeKey("\u05d0", { });
    35   synthesizeKey("\u05d1", { });
    36   s1 = snapshotWindow(window);
    38   synthesizeKey(" ", { });
    39   s2 = snapshotWindow(window);
    41   [equal, str1, str2] = compareSnapshots(s1, s2, true);
    42   ok(equal, "space after LTR + RTL shouldn't change direction: expected " +
    43      str1 + " but got " + str2);
    45   synthesizeKey("VK_BACK_SPACE", { });
    46   s3 = snapshotWindow(window);
    48   [equal, str1, str2] = compareSnapshots(s1, s3, true);
    49   ok(equal, "backspace should restore the status quo: expected " + str1 + 
    50      " but got " + str2);
    52   SimpleTest.finish();
    53 }
    55 </script>
    56 </pre>
    57 </body>
    58 </html>

mercurial