test_bug514156.html (1260B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=514156 5 --> 6 <head> 7 <title>Test for Bug 514156</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=514156">Mozilla Bug 514156</a> 15 <p id="display"></p> 16 <div id="content"> 17 <input type="text" id="input1"> 18 <input type="text" id="input2"> 19 </div> 20 <pre id="test"> 21 <script class="testbody" type="text/javascript"> 22 23 /** Test for Bug 514156 */ 24 25 SimpleTest.waitForExplicitFinish(); 26 27 function test() { 28 var input1 = $("input1"); 29 input1.focus(); 30 sendString("\u200e\u05d0\u05d1"); 31 is(escape(input1.value), escape("\u200e\u05d0\u05d1"), "non-spacing character and direction change shouldn't change content"); 32 33 var input2 = $("input2"); 34 input2.focus(); 35 sendString("\u05b6"); 36 sendString("abc"); 37 is(escape(input2.value), escape("\u05b6abc"), "non-spacing character and direction change shouldn't change content"); 38 39 SimpleTest.finish(); 40 } 41 42 </script> 43 </pre> 44 </body> 45 </html>