Bug 1430441 - Part 1: Use Async Function in devtools/client/webconsole/test/browser_console_keyboard_accessibility.js r=bgrins
authorTooru Fujisawa <arai_a@mac.com>
Sat, 20 Jan 2018 20:40:10 +0900
changeset 454419 31673be5d440c809f554772ffde400d7c768907a
parent 454418 5bf29bdee18b4a435b8f9fa9b99dcea6a9556b93
child 454420 481c2b2164c70a6d3100107215a8f734babc0adb
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [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 1: Use Async Function 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
@@ -2,31 +2,31 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Check that basic keyboard shortcuts work in the web console.
 
 "use strict";
 
-add_task(function* () {
+add_task(async function () {
   const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
                    "test/test-console.html";
 
-  yield loadTab(TEST_URI);
+  await loadTab(TEST_URI);
 
-  let hud = yield openConsole();
+  let hud = await openConsole();
   ok(hud, "Web Console opened");
 
   info("dump some spew into the console for scrolling");
   hud.jsterm.execute("(function() { for (var i = 0; i < 100; i++) { " +
                      "console.log('foobarz' + i);" +
                      "}})();");
 
-  yield waitForMessages({
+  await waitForMessages({
     webconsole: hud,
     messages: [{
       text: "foobarz99",
       category: CATEGORY_WEBDEV,
       severity: SEVERITY_LOG,
     }],
   });
 
@@ -56,17 +56,17 @@ add_task(function* () {
     let clearShortcut;
     if (Services.appinfo.OS === "Darwin") {
       clearShortcut = WCUL10n.getStr("webconsole.clear.keyOSX");
     } else {
       clearShortcut = WCUL10n.getStr("webconsole.clear.key");
     }
     synthesizeKeyShortcut(clearShortcut);
   });
-  yield hud.jsterm.once("messages-cleared");
+  await hud.jsterm.once("messages-cleared");
 
   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"),