layout/base/tests/test_bug499538-1.html

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:5177dca016e8
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=499538
5 -->
6 <head>
7 <title>Test for Bug 499538</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=499538">Mozilla Bug 499538</a>
15 <p id="display"></p>
16 <div id="content">
17 <input type="text" id="testInput">
18 </div>
19 <pre id="test">
20 <script class="testbody" type="text/javascript">
21
22 /** Test for Bug 499538 **/
23
24 SimpleTest.waitForExplicitFinish();
25
26 function test() {
27 var textInput = $("testInput");
28 var s1, s2, s3, equal, str1, str2;
29
30 textInput.focus();
31 synthesizeKey("a", { });
32 synthesizeKey(" ", { });
33 synthesizeKey("\u0639", { });
34 synthesizeKey("\u063A", { });
35 synthesizeKey(" ", { });
36 synthesizeKey("b", { });
37 s1 = snapshotWindow(window);
38
39 textInput.select();
40 synthesizeKey("a", { });
41 synthesizeKey(" ", { });
42 synthesizeKey(" ", { });
43 synthesizeKey("b", { });
44 synthesizeKey("VK_LEFT", { });
45 synthesizeKey("VK_LEFT", { });
46 synthesizeKey("\u0639", { });
47 synthesizeKey("\u063A", { });
48 s2 = snapshotWindow(window);
49
50 [equal, str1, str2] = compareSnapshots(s1, s2, true);
51 ok(equal, "Arabic text between English words not connected: expected " +
52 str1 + " but got " + str2);
53
54 SimpleTest.finish();
55 }
56
57 </script>
58 </pre>
59 </body>
60 </html>

mercurial