gecko-dev/layout/base/tests/bug1097242-1.html
Makoto Kato 353b3ac952 Bug 1450055 - Part 3. Update mochitests since focus event listener is system group. r=masayuki
The focus event listener in editor is system group, so synthesizeKey and/or synthesizeMouse doesn't work on focus event since editor doesn't initialize selection yet. So use setTimeout to work synthesizeKey and etc well.

Differential Revision: https://phabricator.services.mozilla.com/D15926

--HG--
extra : rebase_source : bbedd32278c94f009c7ab0e9d685979887b2f031
2019-01-08 16:50:14 +09:00

23 lines
675 B
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<script>
function focused() {
document.documentElement.removeAttribute("class");
}
</script>
<body>
<div contenteditable spellcheck="false" onfocus="focused()"
style="outline: none">foo<span contenteditable=false
style="-moz-user-select: none">bar</span>baz</div>
<script>
SimpleTest.waitForFocus(() => {
SimpleTest.executeSoon(() => {
synthesizeMouseAtCenter(document.querySelector("span"), {});
});
});
</script>
</body>
</html>