1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/libeditor/base/tests/test_bug514156.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=514156 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 514156</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=514156">Mozilla Bug 514156</a> 1.18 +<p id="display"></p> 1.19 +<div id="content"> 1.20 +<input type="text" id="input1"> 1.21 +<input type="text" id="input2"> 1.22 +</div> 1.23 +<pre id="test"> 1.24 +<script class="testbody" type="text/javascript"> 1.25 + 1.26 +/** Test for Bug 514156 **/ 1.27 + 1.28 +SimpleTest.waitForExplicitFinish(); 1.29 + 1.30 +function test() { 1.31 + var input1 = $("input1"); 1.32 + input1.focus(); 1.33 + synthesizeKey("\u200e", { }); 1.34 + synthesizeKey("\u05d0", { }); 1.35 + synthesizeKey("\u05d1", { }); 1.36 + is(escape(input1.value), escape("\u200e\u05d0\u05d1"), "non-spacing character and direction change shouldn't change content"); 1.37 + 1.38 + var input2 = $("input2"); 1.39 + input2.focus(); 1.40 + synthesizeKey("\u05b6", { }); 1.41 + synthesizeKey("a", { }); 1.42 + synthesizeKey("b", { }); 1.43 + synthesizeKey("c", { }); 1.44 + is(escape(input2.value), escape("\u05b6abc"), "non-spacing character and direction change shouldn't change content"); 1.45 + 1.46 + SimpleTest.finish(); 1.47 +} 1.48 + 1.49 +</script> 1.50 +</pre> 1.51 +</body> 1.52 +</html> 1.53 +