Bug 1430441 - Part 2: Wait for the next event tick to avoid mixing 2 shortcuts in devtools/client/webconsole/test/browser_console_keyboard_accessibility.js r=bgrins
authorTooru Fujisawa <arai_a@mac.com>
Sat, 20 Jan 2018 20:40:11 +0900
changeset 400118 481c2b2164c70a6d3100107215a8f734babc0adb
parent 400117 31673be5d440c809f554772ffde400d7c768907a
child 400119 f2df9f22290658f15068ebdfd3f1ecee377e88f7
push id33292
push userbtara@mozilla.com
push dateSun, 21 Jan 2018 09:51:58 +0000
treeherdermozilla-central@9fe69ff0762d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1430441
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1430441 - Part 2: Wait for the next event tick to avoid mixing 2 shortcuts in devtools/client/webconsole/test/browser_console_keyboard_accessibility.js r=bgrins
devtools/client/webconsole/test/browser_console_keyboard_accessibility.js
--- a/devtools/client/webconsole/test/browser_console_keyboard_accessibility.js
+++ b/devtools/client/webconsole/test/browser_console_keyboard_accessibility.js
@@ -58,16 +58,20 @@ add_task(async function () {
       clearShortcut = WCUL10n.getStr("webconsole.clear.keyOSX");
     } else {
       clearShortcut = WCUL10n.getStr("webconsole.clear.key");
     }
     synthesizeKeyShortcut(clearShortcut);
   });
   await hud.jsterm.once("messages-cleared");
 
+  // Wait for the next event tick to make sure keyup for the shortcut above
+  // finishes.  Otherwise the 2 shortcuts are mixed.
+  await new Promise(executeSoon);
+
   is(hud.outputNode.textContent.indexOf("foobarz1"), -1, "output cleared");
   is(hud.jsterm.inputNode.getAttribute("focused"), "true",
      "jsterm input is focused");
 
   info("try ctrl-f to focus filter");
   synthesizeKeyShortcut(WCUL10n.getStr("webconsole.find.key"));
   ok(!hud.jsterm.inputNode.getAttribute("focused"),
      "jsterm input is not focused");