gecko-dev/layout/base/tests/bug1123067-2.html
Masayuki Nakano cf83ee7bb4 Bug 1438157 - part 2: Remove unnecessary second argument of EventUtils.synthesizeKey() r=smaug
Note that this patch also replaces legacy VK_* with KEY_*, and replaces
synthesizeKey() for inputting some characters with sendString() because
it's better and clearer what it does and it sets shiftKey state properly.

MozReview-Commit-ID: De4enbjux3T

--HG--
extra : rebase_source : 2296b84bff8e22f01eeb48cd8614fac5db11136a
2018-02-15 04:15:39 +09:00

35 lines
987 B
HTML

<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<meta charset="utf-8">
<title>Testcase #2 for bug 1123067</title>
<script>
function test() {
for (var i = 0; i < 5; ++i) {
synthesizeKey("KEY_ArrowRight");
}
synthesizeKey("KEY_ArrowLeft");
document.documentElement.removeAttribute("class");
}
function runTests() {
var e = document.querySelector('#test1');
e.focus();
}
</script>
<style>
div { -moz-user-select:none; }
div:focus { outline:1px solid black; }
</style>
</head>
<body>
<div id="test1" contenteditable="true" spellcheck="false" onfocus="setTimeout(test,0)">This text is NOT selectable.</div>
<script>
SimpleTest.waitForFocus(runTests);
</script>
</body>
</html>