|
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"> |
|
22 |
|
23 == زادروزها == |
|
24 * [[۱۳۰۷]]</textarea> |
|
25 </div> |
|
26 <pre id="test"> |
|
27 <script class="testbody" type="text/javascript"> |
|
28 |
|
29 /** Test for Bug 644768 **/ |
|
30 |
|
31 SimpleTest.waitForExplicitFinish(); |
|
32 |
|
33 function test() { |
|
34 var textInput = $("testInput"); |
|
35 var s1, s2, equal, str1, str2; |
|
36 |
|
37 textInput.focus(); |
|
38 s1 = snapshotWindow(window); |
|
39 |
|
40 synthesizeKey("VK_UP", { }); |
|
41 synthesizeKey("VK_UP", { }); |
|
42 synthesizeKey("VK_UP", { }); |
|
43 synthesizeKey("VK_DELETE", { }); |
|
44 synthesizeKey("VK_RETURN", { }); |
|
45 s2 = snapshotWindow(window); |
|
46 |
|
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); |
|
50 |
|
51 SimpleTest.finish(); |
|
52 } |
|
53 |
|
54 </script> |
|
55 </pre> |
|
56 </body> |
|
57 </html> |
|
58 |