Wed, 31 Dec 2014 06:09:35 +0100
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=644768
5 -->
6 <head>
7 <title>Test for Bug 644768</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=644768">Mozilla Bug 644768</a>
15 <p id="display"></p>
16 <div id="content">
17 <!-- test text is
18 == زادروزها ==
19 * [[۱۳۰۷]]
20 -->
21 <textarea id="testInput" dir="rtl" cols="80" rows="25">
23 == زادروزها ==
24 * [[۱۳۰۷]]</textarea>
25 </div>
26 <pre id="test">
27 <script class="testbody" type="text/javascript">
29 /** Test for Bug 644768 **/
31 SimpleTest.waitForExplicitFinish();
33 function test() {
34 var textInput = $("testInput");
35 var s1, s2, equal, str1, str2;
37 textInput.focus();
38 s1 = snapshotWindow(window);
40 synthesizeKey("VK_UP", { });
41 synthesizeKey("VK_UP", { });
42 synthesizeKey("VK_UP", { });
43 synthesizeKey("VK_DELETE", { });
44 synthesizeKey("VK_RETURN", { });
45 s2 = snapshotWindow(window);
47 [equal, str1, str2] = compareSnapshots(s1, s2, true);
48 ok(equal, "newline before bidi text shouldn't change direction: expected " +
49 str1 + " but got " + str2);
51 SimpleTest.finish();
52 }
54 </script>
55 </pre>
56 </body>
57 </html>