layout/base/tests/test_bug644768.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/base/tests/test_bug644768.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,58 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=644768
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 644768</title>
    1.11 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
    1.13 +  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    1.14 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.15 +</head>
    1.16 +<body onload="test()">
    1.17 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=644768">Mozilla Bug 644768</a>
    1.18 +<p id="display"></p>
    1.19 +<div id="content">
    1.20 +<!-- test text is 
    1.21 +== زادروزها ==
    1.22 +* [[۱۳۰۷]]
    1.23 +-->
    1.24 + <textarea id="testInput" dir="rtl" cols="80" rows="25">
    1.25 +
    1.26 +== &#x0632;&#x0627;&#x062F;&#x0631;&#x0648;&#x0632;&#x0647;&#x0627; ==
    1.27 +* [[&#x06F1;&#x06F3;&#x06F0;&#x06F7;]]</textarea>
    1.28 +</div>
    1.29 +<pre id="test">
    1.30 +<script class="testbody" type="text/javascript">
    1.31 +
    1.32 +/** Test for Bug 644768 **/
    1.33 +
    1.34 +SimpleTest.waitForExplicitFinish();
    1.35 +
    1.36 +function test() {
    1.37 +  var textInput = $("testInput");
    1.38 +  var s1, s2, equal, str1, str2;
    1.39 +
    1.40 +  textInput.focus();
    1.41 +  s1 = snapshotWindow(window);
    1.42 +
    1.43 +  synthesizeKey("VK_UP", { });
    1.44 +  synthesizeKey("VK_UP", { });
    1.45 +  synthesizeKey("VK_UP", { });
    1.46 +  synthesizeKey("VK_DELETE", { });
    1.47 +  synthesizeKey("VK_RETURN", { });
    1.48 +  s2 = snapshotWindow(window);
    1.49 +
    1.50 +  [equal, str1, str2] = compareSnapshots(s1, s2, true);
    1.51 +  ok(equal, "newline before bidi text shouldn't change direction: expected " +
    1.52 +     str1 + " but got " + str2);
    1.53 +
    1.54 +  SimpleTest.finish();
    1.55 +}
    1.56 +
    1.57 +</script>
    1.58 +</pre>
    1.59 +</body>
    1.60 +</html>
    1.61 +

mercurial