author Makoto Kato <>
Tue, 08 Jan 2019 16:50:14 +0900
changeset 510115 a6cc9b822c1c1051961f8a293bc3e0331b8739d6
parent 260894 a02f7725921cc7219ab27c4f4b6bcd75e2b617fb
permissions -rw-r--r--
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:

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