test_bug499538-1.html (1369B)
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 src="/tests/SimpleTest/SimpleTest.js"></script> 9 <script src="/tests/SimpleTest/WindowSnapshot.js"></script> 10 <script 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" style="-moz-appearance:none"> 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 sendString("a "); 32 sendString("\u0639\u063A"); 33 sendString(" b"); 34 s1 = snapshotWindow(window); 35 36 textInput.select(); 37 sendString("a b"); 38 synthesizeKey("KEY_ArrowLeft"); 39 synthesizeKey("KEY_ArrowLeft"); 40 sendString("\u0639\u063A"); 41 s2 = snapshotWindow(window); 42 43 [equal, str1, str2] = compareSnapshots(s1, s2, true); 44 ok(equal, "Arabic text between English words not connected: expected " + 45 str1 + " but got " + str2); 46 47 SimpleTest.finish(); 48 } 49 50 </script> 51 </pre> 52 </body> 53 </html>