|
|
|
|
|
|
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="/MochiKit/packed.js"></script> |
| 9 |
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
| 10 |
<script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script> |
| 11 |
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script> |
| 12 |
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
| 13 |
</head> |
| 14 |
<body onload="test()"> |
| 15 |
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=644768">Mozilla Bug 644768</a> |
| 16 |
<p id="display"></p> |
| 17 |
<div id="content"> |
| 18 |
<!-- test text is |
| 19 |
== زادروزها == |
| 20 |
* [[۱۳۰۷]] |
| 21 |
--> |
| 22 |
<textarea id="testInput" dir="rtl" cols="80" rows="25"> |
| 23 |
|
| 24 |
== زادروزها == |
| 25 |
* [[۱۳۰۷]]</textarea> |
| 26 |
</div> |
| 27 |
<pre id="test"> |
| 28 |
<script class="testbody" type="text/javascript"> |
| 29 |
|
| 30 |
/** Test for Bug 644768 **/ |
| 31 |
|
| 32 |
SimpleTest.waitForExplicitFinish(); |
| 33 |
|
| 34 |
function test() { |
| 35 |
var textInput = $("testInput"); |
| 36 |
var s1, s2, equal, str1, str2; |
| 37 |
|
| 38 |
textInput.focus(); |
| 39 |
s1 = snapshotWindow(window); |
| 40 |
|
| 41 |
synthesizeKey("VK_UP", { }); |
| 42 |
synthesizeKey("VK_UP", { }); |
| 43 |
synthesizeKey("VK_UP", { }); |
| 44 |
synthesizeKey("VK_DELETE", { }); |
| 45 |
synthesizeKey("VK_ENTER", { }); |
| 46 |
s2 = snapshotWindow(window); |
| 47 |
|
| 48 |
[equal, str1, str2] = compareSnapshots(s1, s2, true); |
| 49 |
ok(equal, "newline before bidi text shouldn't change direction: expected " + |
| 50 |
str1 + " but got " + str2); |
| 51 |
|
| 52 |
SimpleTest.finish(); |
| 53 |
} |
| 54 |
|
| 55 |
</script> |
| 56 |
</pre> |
| 57 |
</body> |
| 58 |
</html> |
| 59 |
|