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/. -->
8 https://bugzilla.mozilla.org/show_bug.cgi?id=644768
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" />
17 <body onload=
"test()">
18 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=644768">Mozilla Bug
644768</a>
25 <textarea id=
"testInput" dir=
"rtl" cols=
"80" rows=
"25" style=
"-moz-appearance:none">
27 ==
زادروزها ==
28 * [[
۱۳۰۷]]
</textarea>
31 <script class=
"testbody" type=
"text/javascript">
33 /** Test for Bug
644768 **/
35 SimpleTest.waitForExplicitFinish();
38 var textInput = $(
"testInput");
39 var s1, s2, equal, str1, str2;
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);