no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / layout / base / tests / test_bug644768.html
blob396fccb5d0273c15864c5953bef43772234dae50
1 <!-- This Source Code Form is subject to the terms of the Mozilla Public
2 - License, v. 2.0. If a copy of the MPL was not distributed with this
3 - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5 <!DOCTYPE html>
6 <html>
7 <!--
8 https://bugzilla.mozilla.org/show_bug.cgi?id=644768
9 -->
10 <head>
11 <title>Test for Bug 644768</title>
12 <script src="/tests/SimpleTest/SimpleTest.js"></script>
13 <script src="/tests/SimpleTest/WindowSnapshot.js"></script>
14 <script src="/tests/SimpleTest/EventUtils.js"></script>
15 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
16 </head>
17 <body onload="test()">
18 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=644768">Mozilla Bug 644768</a>
19 <p id="display"></p>
20 <div id="content">
21 <!-- test text is
22 == زادروزها ==
23 * [[۱۳۰۷]]
24 -->
25 <textarea id="testInput" dir="rtl" cols="80" rows="25" style="-moz-appearance:none">
27 == &#x0632;&#x0627;&#x062F;&#x0631;&#x0648;&#x0632;&#x0647;&#x0627; ==
28 * [[&#x06F1;&#x06F3;&#x06F0;&#x06F7;]]</textarea>
29 </div>
30 <pre id="test">
31 <script class="testbody" type="text/javascript">
33 /** Test for Bug 644768 **/
35 SimpleTest.waitForExplicitFinish();
37 function test() {
38 var textInput = $("testInput");
39 var s1, s2, equal, str1, str2;
41 textInput.focus();
42 s1 = snapshotWindow(window);
44 synthesizeKey("KEY_ArrowUp");
45 synthesizeKey("KEY_ArrowUp");
46 synthesizeKey("KEY_ArrowUp");
47 synthesizeKey("KEY_Delete");
48 synthesizeKey("KEY_Enter");
49 // Bug 1016184: Touch caret will hide due to key event.
50 s2 = snapshotWindow(window);
52 [equal, str1, str2] = compareSnapshots(s1, s2, true);
53 ok(equal, "newline before bidi text shouldn't change direction: expected " +
54 str1 + " but got " + str2);
56 SimpleTest.finish();
59 </script>
60 </pre>
61 </body>
62 </html>