1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/base/tests/test_bug499538-1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,60 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=499538 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 499538</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=499538">Mozilla Bug 499538</a> 1.18 +<p id="display"></p> 1.19 +<div id="content"> 1.20 +<input type="text" id="testInput"> 1.21 +</div> 1.22 +<pre id="test"> 1.23 +<script class="testbody" type="text/javascript"> 1.24 + 1.25 +/** Test for Bug 499538 **/ 1.26 + 1.27 +SimpleTest.waitForExplicitFinish(); 1.28 + 1.29 +function test() { 1.30 + var textInput = $("testInput"); 1.31 + var s1, s2, s3, equal, str1, str2; 1.32 + 1.33 + textInput.focus(); 1.34 + synthesizeKey("a", { }); 1.35 + synthesizeKey(" ", { }); 1.36 + synthesizeKey("\u0639", { }); 1.37 + synthesizeKey("\u063A", { }); 1.38 + synthesizeKey(" ", { }); 1.39 + synthesizeKey("b", { }); 1.40 + s1 = snapshotWindow(window); 1.41 + 1.42 + textInput.select(); 1.43 + synthesizeKey("a", { }); 1.44 + synthesizeKey(" ", { }); 1.45 + synthesizeKey(" ", { }); 1.46 + synthesizeKey("b", { }); 1.47 + synthesizeKey("VK_LEFT", { }); 1.48 + synthesizeKey("VK_LEFT", { }); 1.49 + synthesizeKey("\u0639", { }); 1.50 + synthesizeKey("\u063A", { }); 1.51 + s2 = snapshotWindow(window); 1.52 + 1.53 + [equal, str1, str2] = compareSnapshots(s1, s2, true); 1.54 + ok(equal, "Arabic text between English words not connected: expected " + 1.55 + str1 + " but got " + str2); 1.56 + 1.57 + SimpleTest.finish(); 1.58 +} 1.59 + 1.60 +</script> 1.61 +</pre> 1.62 +</body> 1.63 +</html>