Bug 1437828 - Convert generators to sync functions in devtools/server/tests r=jryans draft
authorAlexandre Poirot <poirot.alex@gmail.com>
Tue, 13 Feb 2018 03:47:01 -0800
changeset 754795 34a9deec88231f1db9727cf1c3c028cea9b56796
parent 754794 a84a8e10305fedd61f03b11ab75086a3e54ac68b
child 754796 39053d527d45e06bce0d7c3d79fcd7b7d26b2d3b
push id99001
push userbmo:poirot.alex@gmail.com
push dateWed, 14 Feb 2018 10:14:19 +0000
reviewersjryans
bugs1437828
milestone60.0a1
Bug 1437828 - Convert generators to sync functions in devtools/server/tests r=jryans All but devtools/server/tests/unit/test_protocol_children.js which really uses generators on purpose. $ ./obj-firefox-artifact/dist/bin/run-mozilla.sh ./obj-firefox-artifact/dist/bin/xpcshell xpc devtools/server/tests/ --replace-generator MozReview-Commit-ID: 5QsXLcL7LM2
devtools/server/tests/browser/browser_animation_getMultipleStates.js
devtools/server/tests/browser/browser_animation_getPlayers.js
devtools/server/tests/browser/browser_animation_playPauseIframe.js
devtools/server/tests/browser/browser_animation_playPauseSeveral.js
devtools/server/tests/browser/browser_animation_playerState.js
devtools/server/tests/browser/browser_animation_reconstructState.js
devtools/server/tests/browser/browser_animation_refreshTransitions.js
devtools/server/tests/browser/browser_animation_setCurrentTime.js
devtools/server/tests/browser/browser_animation_updatedState.js
devtools/server/tests/browser/browser_storage_dynamic_windows.js
devtools/server/tests/browser/browser_storage_listings.js
devtools/server/tests/browser/browser_storage_updates.js
devtools/server/tests/browser/browser_webextension_inspected_window.js
devtools/server/tests/browser/head.js
devtools/server/tests/browser/storage-dynamic-windows.html
devtools/server/tests/browser/storage-listings.html
devtools/server/tests/browser/storage-secured-iframe.html
devtools/server/tests/mochitest/test_animation_actor-lifetime.html
devtools/server/tests/mochitest/test_css-properties.html
devtools/server/tests/mochitest/test_inspector-anonymous.html
devtools/server/tests/mochitest/test_inspector-dead-nodes.html
devtools/server/tests/mochitest/test_inspector-display-type.html
devtools/server/tests/mochitest/test_inspector-insert.html
devtools/server/tests/mochitest/test_inspector-mutations-events.html
devtools/server/tests/mochitest/test_inspector-pick-color.html
devtools/server/tests/mochitest/test_inspector-resize.html
devtools/server/tests/mochitest/test_inspector-search-front.html
devtools/server/tests/mochitest/test_styles-layout.html
devtools/server/tests/mochitest/test_styles-modify.html
devtools/server/tests/mochitest/webconsole-helpers.js
devtools/server/tests/unit/test_addon_reload.js
devtools/server/tests/unit/test_promises_actor_attach.js
devtools/server/tests/unit/test_promises_actor_list_promises.js
devtools/server/tests/unit/test_promises_actor_onpromisesettled.js
devtools/server/tests/unit/test_protocolSpec.js
devtools/server/tests/unit/test_protocol_formtype.js
devtools/server/tests/unit/test_symbols-01.js
devtools/server/tests/unit/test_symbols-02.js
--- a/devtools/server/tests/browser/browser_animation_getMultipleStates.js
+++ b/devtools/server/tests/browser/browser_animation_getMultipleStates.js
@@ -12,38 +12,38 @@ add_task(async function() {
     await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html");
 
   await playerHasAnInitialState(walker, animations);
 
   await client.close();
   gBrowser.removeCurrentTab();
 });
 
-function* playerHasAnInitialState(walker, animations) {
-  let state = yield getAnimationStateForNode(walker, animations,
+async function playerHasAnInitialState(walker, animations) {
+  let state = await getAnimationStateForNode(walker, animations,
     ".delayed-multiple-animations", 0);
 
   ok(state.duration, 50000,
      "The duration of the first animation is correct");
   ok(state.iterationCount, 10,
      "The iterationCount of the first animation is correct");
   ok(state.delay, 1000,
      "The delay of the first animation is correct");
 
-  state = yield getAnimationStateForNode(walker, animations,
+  state = await getAnimationStateForNode(walker, animations,
     ".delayed-multiple-animations", 1);
 
   ok(state.duration, 100000,
      "The duration of the secon animation is correct");
   ok(state.iterationCount, 30,
      "The iterationCount of the secon animation is correct");
   ok(state.delay, 750,
      "The delay of the secon animation is correct");
 }
 
-function* getAnimationStateForNode(walker, animations, selector, playerIndex) {
-  let node = yield walker.querySelector(walker.rootNode, selector);
-  let players = yield animations.getAnimationPlayersForNode(node);
+async function getAnimationStateForNode(walker, animations, selector, playerIndex) {
+  let node = await walker.querySelector(walker.rootNode, selector);
+  let players = await animations.getAnimationPlayersForNode(node);
   let player = players[playerIndex];
-  yield player.ready();
-  let state = yield player.getCurrentState();
+  await player.ready();
+  let state = await player.getCurrentState();
   return state;
 }
--- a/devtools/server/tests/browser/browser_animation_getPlayers.js
+++ b/devtools/server/tests/browser/browser_animation_getPlayers.js
@@ -12,52 +12,52 @@ add_task(async function() {
 
   await theRightNumberOfPlayersIsReturned(walker, animations);
   await playersCanBePausedAndResumed(walker, animations);
 
   await client.close();
   gBrowser.removeCurrentTab();
 });
 
-function* theRightNumberOfPlayersIsReturned(walker, animations) {
-  let node = yield walker.querySelector(walker.rootNode, ".not-animated");
-  let players = yield animations.getAnimationPlayersForNode(node);
+async function theRightNumberOfPlayersIsReturned(walker, animations) {
+  let node = await walker.querySelector(walker.rootNode, ".not-animated");
+  let players = await animations.getAnimationPlayersForNode(node);
   is(players.length, 0,
      "0 players were returned for the unanimated node");
 
-  node = yield walker.querySelector(walker.rootNode, ".simple-animation");
-  players = yield animations.getAnimationPlayersForNode(node);
+  node = await walker.querySelector(walker.rootNode, ".simple-animation");
+  players = await animations.getAnimationPlayersForNode(node);
   is(players.length, 1,
      "One animation player was returned");
 
-  node = yield walker.querySelector(walker.rootNode, ".multiple-animations");
-  players = yield animations.getAnimationPlayersForNode(node);
+  node = await walker.querySelector(walker.rootNode, ".multiple-animations");
+  players = await animations.getAnimationPlayersForNode(node);
   is(players.length, 2,
      "Two animation players were returned");
 
-  node = yield walker.querySelector(walker.rootNode, ".transition");
-  players = yield animations.getAnimationPlayersForNode(node);
+  node = await walker.querySelector(walker.rootNode, ".transition");
+  players = await animations.getAnimationPlayersForNode(node);
   is(players.length, 1,
      "One animation player was returned for the transitioned node");
 }
 
-function* playersCanBePausedAndResumed(walker, animations) {
-  let node = yield walker.querySelector(walker.rootNode, ".simple-animation");
-  let [player] = yield animations.getAnimationPlayersForNode(node);
-  yield player.ready();
+async function playersCanBePausedAndResumed(walker, animations) {
+  let node = await walker.querySelector(walker.rootNode, ".simple-animation");
+  let [player] = await animations.getAnimationPlayersForNode(node);
+  await player.ready();
 
   ok(player.initialState,
      "The player has an initialState");
   ok(player.getCurrentState,
      "The player has the getCurrentState method");
   is(player.initialState.playState, "running",
      "The animation is currently running");
 
-  yield player.pause();
-  let state = yield player.getCurrentState();
+  await player.pause();
+  let state = await player.getCurrentState();
   is(state.playState, "paused",
      "The animation is now paused");
 
-  yield player.play();
-  state = yield player.getCurrentState();
+  await player.play();
+  state = await player.getCurrentState();
   is(state.playState, "running",
      "The animation is now running again");
 }
--- a/devtools/server/tests/browser/browser_animation_playPauseIframe.js
+++ b/devtools/server/tests/browser/browser_animation_playPauseIframe.js
@@ -30,22 +30,22 @@ add_task(async function() {
   await animations.playAll();
   await checkState(animations, nodeInFrame1, "running");
   await checkState(animations, nodeInFrame2, "running");
 
   await client.close();
   gBrowser.removeCurrentTab();
 });
 
-function* checkState(animations, nodeFront, playState) {
+async function checkState(animations, nodeFront, playState) {
   info("Getting the AnimationPlayerFront for the test node");
-  let [player] = yield animations.getAnimationPlayersForNode(nodeFront);
-  yield player.ready;
-  let state = yield player.getCurrentState();
+  let [player] = await animations.getAnimationPlayersForNode(nodeFront);
+  await player.ready;
+  let state = await player.getCurrentState();
   is(state.playState, playState,
      "The playState of the test node is " + playState);
 }
 
-function* getNodeInFrame(walker, frameSelector, nodeSelector) {
-  let iframe = yield walker.querySelector(walker.rootNode, frameSelector);
-  let {nodes} = yield walker.children(iframe);
+async function getNodeInFrame(walker, frameSelector, nodeSelector) {
+  let iframe = await walker.querySelector(walker.rootNode, frameSelector);
+  let {nodes} = await walker.children(iframe);
   return walker.querySelector(nodes[0], nodeSelector);
 }
--- a/devtools/server/tests/browser/browser_animation_playPauseSeveral.js
+++ b/devtools/server/tests/browser/browser_animation_playPauseSeveral.js
@@ -63,30 +63,30 @@ add_task(async function() {
   state2 = await players[1].getCurrentState();
   is(state2.playState, "running",
     "The playState of the second player is running");
 
   await client.close();
   gBrowser.removeCurrentTab();
 });
 
-function* checkStates(walker, animations, selectors, playState) {
+async function checkStates(walker, animations, selectors, playState) {
   info("Checking the playState of all the nodes that have infinite running " +
        "animations");
 
   for (let selector of selectors) {
     info("Getting the AnimationPlayerFront for node " + selector);
-    let [player] = yield getPlayersFor(walker, animations, selector);
-    yield player.ready();
-    yield checkPlayState(player, selector, playState);
+    let [player] = await getPlayersFor(walker, animations, selector);
+    await player.ready();
+    await checkPlayState(player, selector, playState);
   }
 }
 
-function* getPlayersFor(walker, animations, selector) {
-  let node = yield walker.querySelector(walker.rootNode, selector);
+async function getPlayersFor(walker, animations, selector) {
+  let node = await walker.querySelector(walker.rootNode, selector);
   return animations.getAnimationPlayersForNode(node);
 }
 
-function* checkPlayState(player, selector, expectedState) {
-  let state = yield player.getCurrentState();
+async function checkPlayState(player, selector, expectedState) {
+  let state = await player.getCurrentState();
   is(state.playState, expectedState,
     "The playState of node " + selector + " is " + expectedState);
 }
--- a/devtools/server/tests/browser/browser_animation_playerState.js
+++ b/devtools/server/tests/browser/browser_animation_playerState.js
@@ -12,19 +12,19 @@ add_task(async function() {
 
   await playerHasAnInitialState(walker, animations);
   await playerStateIsCorrect(walker, animations);
 
   await client.close();
   gBrowser.removeCurrentTab();
 });
 
-function* playerHasAnInitialState(walker, animations) {
-  let node = yield walker.querySelector(walker.rootNode, ".simple-animation");
-  let [player] = yield animations.getAnimationPlayersForNode(node);
+async function playerHasAnInitialState(walker, animations) {
+  let node = await walker.querySelector(walker.rootNode, ".simple-animation");
+  let [player] = await animations.getAnimationPlayersForNode(node);
 
   ok(player.initialState, "The player front has an initial state");
   ok("startTime" in player.initialState, "Player's state has startTime");
   ok("currentTime" in player.initialState, "Player's state has currentTime");
   ok("playState" in player.initialState, "Player's state has playState");
   ok("playbackRate" in player.initialState, "Player's state has playbackRate");
   ok("name" in player.initialState, "Player's state has name");
   ok("duration" in player.initialState, "Player's state has duration");
@@ -36,88 +36,88 @@ function* playerHasAnInitialState(walker
   ok("direction" in player.initialState, "Player's state has direction");
   ok("isRunningOnCompositor" in player.initialState,
      "Player's state has isRunningOnCompositor");
   ok("type" in player.initialState, "Player's state has type");
   ok("documentCurrentTime" in player.initialState,
      "Player's state has documentCurrentTime");
 }
 
-function* playerStateIsCorrect(walker, animations) {
+async function playerStateIsCorrect(walker, animations) {
   info("Checking the state of the simple animation");
 
-  let player = yield getAnimationPlayerForNode(walker, animations,
+  let player = await getAnimationPlayerForNode(walker, animations,
                                                ".simple-animation", 0);
-  let state = yield player.getCurrentState();
+  let state = await player.getCurrentState();
   is(state.name, "move", "Name is correct");
   is(state.duration, 200000, "Duration is correct");
   // null = infinite count
   is(state.iterationCount, null, "Iteration count is correct");
   is(state.fill, "none", "Fill is correct");
   is(state.easing, "linear", "Easing is correct");
   is(state.direction, "normal", "Direction is correct");
   is(state.playState, "running", "PlayState is correct");
   is(state.playbackRate, 1, "PlaybackRate is correct");
   is(state.type, "cssanimation", "Type is correct");
 
   info("Checking the state of the transition");
 
   player =
-    yield getAnimationPlayerForNode(walker, animations, ".transition", 0);
-  state = yield player.getCurrentState();
+    await getAnimationPlayerForNode(walker, animations, ".transition", 0);
+  state = await player.getCurrentState();
   is(state.name, "width", "Transition name matches transition property");
   is(state.duration, 500000, "Transition duration is correct");
   // transitions run only once
   is(state.iterationCount, 1, "Transition iteration count is correct");
   is(state.fill, "backwards", "Transition fill is correct");
   is(state.easing, "linear", "Transition easing is correct");
   is(state.direction, "normal", "Transition direction is correct");
   is(state.playState, "running", "Transition playState is correct");
   is(state.playbackRate, 1, "Transition playbackRate is correct");
   is(state.type, "csstransition", "Transition type is correct");
   // chech easing in keyframe
-  let keyframes = yield player.getFrames();
+  let keyframes = await player.getFrames();
   is(keyframes.length, 2, "Transition length of keyframe is correct");
   is(keyframes[0].easing,
      "ease-out", "Transition kerframes's easing is correct");
 
   info("Checking the state of one of multiple animations on a node");
 
   // Checking the 2nd player
-  player = yield getAnimationPlayerForNode(walker, animations,
+  player = await getAnimationPlayerForNode(walker, animations,
                                            ".multiple-animations", 1);
-  state = yield player.getCurrentState();
+  state = await player.getCurrentState();
   is(state.name, "glow", "The 2nd animation's name is correct");
   is(state.duration, 100000, "The 2nd animation's duration is correct");
   is(state.iterationCount, 5, "The 2nd animation's iteration count is correct");
   is(state.fill, "both", "The 2nd animation's fill is correct");
   is(state.easing, "linear", "The 2nd animation's easing is correct");
   is(state.direction, "reverse", "The 2nd animation's direction is correct");
   is(state.playState, "running", "The 2nd animation's playState is correct");
   is(state.playbackRate, 1, "The 2nd animation's playbackRate is correct");
   // chech easing in keyframe
-  keyframes = yield player.getFrames();
+  keyframes = await player.getFrames();
   is(keyframes.length, 2, "The 2nd animation's length of keyframe is correct");
   is(keyframes[0].easing,
      "ease-out", "The 2nd animation's easing of kerframes is correct");
 
   info("Checking the state of an animation with delay");
 
-  player = yield getAnimationPlayerForNode(walker, animations,
+  player = await getAnimationPlayerForNode(walker, animations,
                                            ".delayed-animation", 0);
-  state = yield player.getCurrentState();
+  state = await player.getCurrentState();
   is(state.delay, 5000, "The animation delay is correct");
 
   info("Checking the state of an transition with delay");
 
-  player = yield getAnimationPlayerForNode(walker, animations,
+  player = await getAnimationPlayerForNode(walker, animations,
                                            ".delayed-transition", 0);
-  state = yield player.getCurrentState();
+  state = await player.getCurrentState();
   is(state.delay, 3000, "The transition delay is correct");
 }
 
-function* getAnimationPlayerForNode(walker, animations, nodeSelector, index) {
-  let node = yield walker.querySelector(walker.rootNode, nodeSelector);
-  let players = yield animations.getAnimationPlayersForNode(node);
+async function getAnimationPlayerForNode(walker, animations, nodeSelector, index) {
+  let node = await walker.querySelector(walker.rootNode, nodeSelector);
+  let players = await animations.getAnimationPlayersForNode(node);
   let player = players[index];
-  yield player.ready();
+  await player.ready();
   return player;
 }
--- a/devtools/server/tests/browser/browser_animation_reconstructState.js
+++ b/devtools/server/tests/browser/browser_animation_reconstructState.js
@@ -12,27 +12,27 @@ add_task(async function() {
     await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html");
 
   await playerHasCompleteStateAtAllTimes(walker, animations);
 
   await client.close();
   gBrowser.removeCurrentTab();
 });
 
-function* playerHasCompleteStateAtAllTimes(walker, animations) {
-  let node = yield walker.querySelector(walker.rootNode, ".simple-animation");
-  let [player] = yield animations.getAnimationPlayersForNode(node);
-  yield player.ready();
+async function playerHasCompleteStateAtAllTimes(walker, animations) {
+  let node = await walker.querySelector(walker.rootNode, ".simple-animation");
+  let [player] = await animations.getAnimationPlayersForNode(node);
+  await player.ready();
 
   // Get the list of state key names from the initialstate.
   let keys = Object.keys(player.initialState);
 
   // Get the state over and over again and check that the object returned
   // contains all keys.
   // Normally, only the currentTime will have changed in between 2 calls.
   for (let i = 0; i < 10; i++) {
-    yield player.refreshState();
+    await player.refreshState();
     keys.forEach(key => {
       ok(typeof player.state[key] !== "undefined",
          "The state retrieved has key " + key);
     });
   }
 }
--- a/devtools/server/tests/browser/browser_animation_refreshTransitions.js
+++ b/devtools/server/tests/browser/browser_animation_refreshTransitions.js
@@ -66,17 +66,17 @@ function expectMutationEvents(animations
       }
     }
 
     info("Start listening for mutation events from the AnimationsFront");
     animationsFront.on("mutations", onMutations);
   });
 }
 
-function* waitForEnd(animationFront) {
+async function waitForEnd(animationFront) {
   let playState;
   while (playState !== "finished") {
-    let state = yield animationFront.getCurrentState();
+    let state = await animationFront.getCurrentState();
     playState = state.playState;
     info("Wait for transition " + animationFront.state.name +
          " to finish, playState=" + playState);
   }
 }
--- a/devtools/server/tests/browser/browser_animation_setCurrentTime.js
+++ b/devtools/server/tests/browser/browser_animation_setCurrentTime.js
@@ -13,62 +13,62 @@ add_task(async function() {
 
   await testSetCurrentTime(walker, animations);
   await testSetCurrentTimes(walker, animations);
 
   await client.close();
   gBrowser.removeCurrentTab();
 });
 
-function* testSetCurrentTime(walker, animations) {
+async function testSetCurrentTime(walker, animations) {
   info("Retrieve an animated node");
-  let node = yield walker.querySelector(walker.rootNode, ".simple-animation");
+  let node = await walker.querySelector(walker.rootNode, ".simple-animation");
 
   info("Retrieve the animation player for the node");
-  let [player] = yield animations.getAnimationPlayersForNode(node);
+  let [player] = await animations.getAnimationPlayersForNode(node);
 
   ok(player.setCurrentTime, "Player has the setCurrentTime method");
 
   info("Check that the setCurrentTime method can be called");
   // Note that we don't check that it sets the animation to the right time here,
   // this is too prone to intermittent failures, we'll do this later after
   // pausing the animation. Here we merely test that the method doesn't fail.
-  yield player.setCurrentTime(player.initialState.currentTime + 1000);
+  await player.setCurrentTime(player.initialState.currentTime + 1000);
 
   info("Pause the animation so we can really test if setCurrentTime works");
-  yield player.pause();
-  let pausedState = yield player.getCurrentState();
+  await player.pause();
+  let pausedState = await player.getCurrentState();
 
   info("Set the current time to currentTime + 5s");
-  yield player.setCurrentTime(pausedState.currentTime + 5000);
+  await player.setCurrentTime(pausedState.currentTime + 5000);
 
-  let updatedState1 = yield player.getCurrentState();
+  let updatedState1 = await player.getCurrentState();
   is(Math.round(updatedState1.currentTime - pausedState.currentTime), 5000,
     "The currentTime was updated to +5s");
 
   info("Set the current time to currentTime - 2s");
-  yield player.setCurrentTime(updatedState1.currentTime - 2000);
-  let updatedState2 = yield player.getCurrentState();
+  await player.setCurrentTime(updatedState1.currentTime - 2000);
+  let updatedState2 = await player.getCurrentState();
   is(Math.round(updatedState2.currentTime - updatedState1.currentTime), -2000,
     "The currentTime was updated to -2s");
 }
 
-function* testSetCurrentTimes(walker, animations) {
+async function testSetCurrentTimes(walker, animations) {
   ok(animations.setCurrentTimes, "The AnimationsActor has the right method");
 
   info("Retrieve multiple animated node and its animation players");
 
-  let nodeMulti = yield walker.querySelector(walker.rootNode,
+  let nodeMulti = await walker.querySelector(walker.rootNode,
     ".multiple-animations");
-  let players = (yield animations.getAnimationPlayersForNode(nodeMulti));
+  let players = (await animations.getAnimationPlayersForNode(nodeMulti));
 
   ok(players.length > 1, "Node has more than 1 animation player");
 
   info("Try to set multiple current times at once");
-  yield animations.setCurrentTimes(players, 500, true);
+  await animations.setCurrentTimes(players, 500, true);
 
   info("Get the states of players and verify their correctness");
   for (let i = 0; i < players.length; i++) {
-    let state = yield players[i].getCurrentState();
+    let state = await players[i].getCurrentState();
     is(state.playState, "paused", `Player ${i + 1} is paused`);
     is(state.currentTime, 500, `Player ${i + 1} has the right currentTime`);
   }
 }
--- a/devtools/server/tests/browser/browser_animation_updatedState.js
+++ b/devtools/server/tests/browser/browser_animation_updatedState.js
@@ -12,45 +12,45 @@ add_task(async function() {
     await initAnimationsFrontForUrl(MAIN_DOMAIN + "animation.html");
 
   await playStateIsUpdatedDynamically(walker, animations);
 
   await client.close();
   gBrowser.removeCurrentTab();
 });
 
-function* playStateIsUpdatedDynamically(walker, animations) {
+async function playStateIsUpdatedDynamically(walker, animations) {
   info("Getting the test node (which runs a very long animation)");
   // The animation lasts for 100s, to avoid intermittents.
-  let node = yield walker.querySelector(walker.rootNode, ".long-animation");
+  let node = await walker.querySelector(walker.rootNode, ".long-animation");
 
   info("Getting the animation player front for this node");
-  let [player] = yield animations.getAnimationPlayersForNode(node);
-  yield player.ready();
+  let [player] = await animations.getAnimationPlayersForNode(node);
+  await player.ready();
 
-  let state = yield player.getCurrentState();
+  let state = await player.getCurrentState();
   is(state.playState, "running",
     "The playState is running while the animation is running");
 
   info("Change the animation's currentTime to be near the end and wait for " +
        "it to finish");
   let onFinished = waitForAnimationPlayState(player, "finished");
   // Set the currentTime to 98s, knowing that the animation lasts for 100s.
-  yield player.setCurrentTime(98 * 1000);
-  state = yield onFinished;
+  await player.setCurrentTime(98 * 1000);
+  state = await onFinished;
   is(state.playState, "finished",
     "The animation has ended and the state has been updated");
   ok(state.currentTime > player.initialState.currentTime,
     "The currentTime has been updated");
 }
 
-function* waitForAnimationPlayState(player, playState) {
+async function waitForAnimationPlayState(player, playState) {
   let state = {};
   while (state.playState !== playState) {
-    state = yield player.getCurrentState();
-    yield wait(500);
+    state = await player.getCurrentState();
+    await wait(500);
   }
   return state;
 }
 
 function wait(ms) {
   return new Promise(r => setTimeout(r, ms));
 }
--- a/devtools/server/tests/browser/browser_storage_dynamic_windows.js
+++ b/devtools/server/tests/browser/browser_storage_dynamic_windows.js
@@ -25,24 +25,24 @@ const beforeReload = {
       JSON.stringify(["idb1", "obj1"]),
       JSON.stringify(["idb1", "obj2"]),
       JSON.stringify(["idb2", "obj3"]),
     ],
     "http://sectest1.example.org": []
   }
 };
 
-function* testStores(data, front) {
+async function testStores(data, front) {
   testWindowsBeforeReload(data);
 
   // FIXME: Bug 1183581 - browser_storage_dynamic_windows.js IsSafeToRunScript
   //                      errors when testing reload in E10S mode
   // yield testReload(front);
-  yield testAddIframe(front);
-  yield testRemoveIframe(front);
+  await testAddIframe(front);
+  await testRemoveIframe(front);
 }
 
 function testWindowsBeforeReload(data) {
   for (let storageType in beforeReload) {
     ok(data[storageType], storageType + " storage actor is present");
     is(Object.keys(data[storageType].hosts).length,
        Object.keys(beforeReload[storageType]).length,
        "Number of hosts for " + storageType + "match");
--- a/devtools/server/tests/browser/browser_storage_listings.js
+++ b/devtools/server/tests/browser/browser_storage_listings.js
@@ -326,25 +326,25 @@ const IDBValues = {
             email: "foo@bar.com",
           }
         }
       ]
     }
   }
 };
 
-function* testStores(data) {
+async function testStores(data) {
   ok(data.cookies, "Cookies storage actor is present");
   ok(data.localStorage, "Local Storage storage actor is present");
   ok(data.sessionStorage, "Session Storage storage actor is present");
   ok(data.indexedDB, "Indexed DB storage actor is present");
-  yield testCookies(data.cookies);
-  yield testLocalStorage(data.localStorage);
-  yield testSessionStorage(data.sessionStorage);
-  yield testIndexedDB(data.indexedDB);
+  await testCookies(data.cookies);
+  await testLocalStorage(data.localStorage);
+  await testSessionStorage(data.sessionStorage);
+  await testIndexedDB(data.indexedDB);
 }
 
 function testCookies(cookiesActor) {
   is(Object.keys(cookiesActor.hosts).length, 3,
                  "Correct number of host entries for cookies");
   return testCookiesObjects(0, cookiesActor.hosts, cookiesActor);
 }
 
--- a/devtools/server/tests/browser/browser_storage_updates.js
+++ b/devtools/server/tests/browser/browser_storage_updates.js
@@ -285,18 +285,18 @@ function storesCleared(data) {
     is(hosts.length, 1, "number of hosts is 1");
     is(hosts[0], "http://test1.example.org",
        "host matches for " + Object.keys(data)[0]);
   } else {
     ok(false, "Stores cleared should only be for local and session storage");
   }
 }
 
-function* finishTests(client) {
-  yield client.close();
+async function finishTests(client) {
+  await client.close();
   DebuggerServer.destroy();
   finish();
 }
 
 add_task(async function() {
   let browser = await addTab(MAIN_DOMAIN + "storage-updates.html");
   // eslint-disable-next-line mozilla/no-cpows-in-tests
   let doc = browser.contentDocumentAsCPOW;
--- a/devtools/server/tests/browser/browser_webextension_inspected_window.js
+++ b/devtools/server/tests/browser/browser_webextension_inspected_window.js
@@ -11,38 +11,38 @@ const {
 const TEST_RELOAD_URL = `${MAIN_DOMAIN}/inspectedwindow-reload-target.sjs`;
 
 const FAKE_CALLER_INFO = {
   url: "moz-extension://fake-webextension-uuid/fake-caller-script.js",
   lineNumber: 1,
   addonId: "fake-webextension-uuid",
 };
 
-function* setup(pageUrl) {
-  yield addTab(pageUrl);
+async function setup(pageUrl) {
+  await addTab(pageUrl);
   initDebuggerServer();
 
   const client = new DebuggerClient(DebuggerServer.connectPipe());
-  const form = yield connectDebuggerClient(client);
+  const form = await connectDebuggerClient(client);
 
-  const [, tabClient] = yield client.attachTab(form.actor);
+  const [, tabClient] = await client.attachTab(form.actor);
 
-  const [, consoleClient] = yield client.attachConsole(form.consoleActor, []);
+  const [, consoleClient] = await client.attachConsole(form.consoleActor, []);
 
   const inspectedWindowFront = new WebExtensionInspectedWindowFront(client, form);
 
   return {
     client, form,
     tabClient, consoleClient,
     inspectedWindowFront,
   };
 }
 
-function* teardown({client}) {
-  yield client.close();
+async function teardown({client}) {
+  await client.close();
   DebuggerServer.destroy();
   gBrowser.removeCurrentTab();
 }
 
 function waitForNextTabNavigated(client) {
   return new Promise(resolve => {
     client.addListener("tabNavigated", function tabNavigatedListener(evt, pkt) {
       if (pkt.state == "stop" && pkt.isFrameSwitching == false) {
--- a/devtools/server/tests/browser/head.js
+++ b/devtools/server/tests/browser/head.js
@@ -40,58 +40,58 @@ var addTab = async function(url) {
   let tab = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, url);
   await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
 
   info(`Tab added and URL ${url} loaded`);
 
   return tab.linkedBrowser;
 };
 
-function* initAnimationsFrontForUrl(url) {
+async function initAnimationsFrontForUrl(url) {
   const {AnimationsFront} = require("devtools/shared/fronts/animation");
   const {InspectorFront} = require("devtools/shared/fronts/inspector");
 
-  yield addTab(url);
+  await addTab(url);
 
   initDebuggerServer();
   let client = new DebuggerClient(DebuggerServer.connectPipe());
-  let form = yield connectDebuggerClient(client);
+  let form = await connectDebuggerClient(client);
   let inspector = InspectorFront(client, form);
-  let walker = yield inspector.getWalker();
+  let walker = await inspector.getWalker();
   let animations = AnimationsFront(client, form);
 
   return {inspector, walker, animations, client};
 }
 
-function* initLayoutFrontForUrl(url) {
+async function initLayoutFrontForUrl(url) {
   const {InspectorFront} = require("devtools/shared/fronts/inspector");
 
-  yield addTab(url);
+  await addTab(url);
 
   initDebuggerServer();
   let client = new DebuggerClient(DebuggerServer.connectPipe());
-  let form = yield connectDebuggerClient(client);
+  let form = await connectDebuggerClient(client);
   let inspector = InspectorFront(client, form);
-  let walker = yield inspector.getWalker();
-  let layout = yield walker.getLayoutInspector();
+  let walker = await inspector.getWalker();
+  let layout = await walker.getLayoutInspector();
 
   return {inspector, walker, layout, client};
 }
 
-function* initAccessibilityFrontForUrl(url) {
+async function initAccessibilityFrontForUrl(url) {
   const {AccessibilityFront} = require("devtools/shared/fronts/accessibility");
   const {InspectorFront} = require("devtools/shared/fronts/inspector");
 
-  yield addTab(url);
+  await addTab(url);
 
   initDebuggerServer();
   let client = new DebuggerClient(DebuggerServer.connectPipe());
-  let form = yield connectDebuggerClient(client);
+  let form = await connectDebuggerClient(client);
   let inspector = InspectorFront(client, form);
-  let walker = yield inspector.getWalker();
+  let walker = await inspector.getWalker();
   let accessibility = AccessibilityFront(client, form);
 
   return {inspector, walker, accessibility, client};
 }
 
 function initDebuggerServer() {
   try {
     // Sometimes debugger server does not get destroyed correctly by previous
--- a/devtools/server/tests/browser/storage-dynamic-windows.html
+++ b/devtools/server/tests/browser/storage-dynamic-windows.html
@@ -90,28 +90,28 @@ let idbGenerator = async function() {
 
 function deleteDB(dbName) {
   return new Promise(resolve => {
     dump("removing database " + dbName + " from " + document.location + "\n");
     indexedDB.deleteDatabase(dbName).onsuccess = resolve;
   });
 }
 
-window.setup = function*() {
-  yield idbGenerator();
+window.setup = async function() {
+  await idbGenerator();
 };
 
-window.clear = function*() {
+window.clear = async function() {
   document.cookie = "c1=; expires=Thu, 01 Jan 1970 00:00:00 GMT";
   document.cookie = "c3=; expires=Thu, 01 Jan 1970 00:00:00 GMT";
   document.cookie = "cs2=; expires=Thu, 01 Jan 1970 00:00:00 GMT";
 
   localStorage.clear();
 
-  yield deleteDB("idb1");
-  yield deleteDB("idb2");
+  await deleteDB("idb1");
+  await deleteDB("idb2");
 
   dump("removed cookies, localStorage and indexedDB data from " +
        document.location + "\n");
 };
 </script>
 </body>
 </html>
--- a/devtools/server/tests/browser/storage-listings.html
+++ b/devtools/server/tests/browser/storage-listings.html
@@ -92,32 +92,32 @@ let idbGenerator = async function() {
 
 function deleteDB(dbName) {
   return new Promise(resolve => {
     dump("removing database " + dbName + " from " + document.location + "\n");
     indexedDB.deleteDatabase(dbName).onsuccess = resolve;
   });
 }
 
-window.setup = function*() {
-  yield idbGenerator();
+window.setup = async function() {
+  await idbGenerator();
 };
 
-window.clear = function*() {
+window.clear = async function() {
   document.cookie = "c1=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/browser";
   document.cookie =
     "c3=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; secure=true";
   document.cookie =
     "cs2=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=" +
     partialHostname;
 
   localStorage.clear();
   sessionStorage.clear();
 
-  yield deleteDB("idb1");
-  yield deleteDB("idb2");
+  await deleteDB("idb1");
+  await deleteDB("idb2");
 
   dump("removed cookies, localStorage, sessionStorage and indexedDB data " +
        "from " + document.location + "\n");
 };
 </script>
 </body>
 </html>
--- a/devtools/server/tests/browser/storage-secured-iframe.html
+++ b/devtools/server/tests/browser/storage-secured-iframe.html
@@ -70,25 +70,25 @@ let idbGenerator = async function() {
 
 function deleteDB(dbName) {
   return new Promise(resolve => {
     dump("removing database " + dbName + " from " + document.location + "\n");
     indexedDB.deleteDatabase(dbName).onsuccess = resolve;
   });
 }
 
-window.setup = function*() {
-  yield idbGenerator();
+window.setup = async function() {
+  await idbGenerator();
 };
 
-window.clear = function*() {
+window.clear = async function() {
   document.cookie = "sc1=; expires=Thu, 01 Jan 1970 00:00:00 GMT";
 
   localStorage.clear();
 
-  yield deleteDB("idb-s1");
-  yield deleteDB("idb-s2");
+  await deleteDB("idb-s1");
+  await deleteDB("idb-s2");
 
   console.log("removed cookies and stuff from secured iframe");
 }
 </script>
 </body>
 </html>
--- a/devtools/server/tests/mochitest/test_animation_actor-lifetime.html
+++ b/devtools/server/tests/mochitest/test_animation_actor-lifetime.html
@@ -33,49 +33,49 @@ window.onload = function () {
 
       promiseDone(inspector.getWalker().then(walker => {
         ok(walker, "getWalker() should return an actor.");
         gWalker = walker;
       }).then(runNextTest));
     });
   });
 
-  addAsyncTest(function* testActorLifetime() {
+  addAsyncTest(async function testActorLifetime() {
     info("Testing animated node actor");
-    let animatedNodeActor = yield gWalker.querySelector(gWalker.rootNode,
+    let animatedNodeActor = await gWalker.querySelector(gWalker.rootNode,
       ".animated");
-    yield animationsFront.getAnimationPlayersForNode(animatedNodeActor);
+    await animationsFront.getAnimationPlayersForNode(animatedNodeActor);
 
     let animationsActor = DebuggerServer
                           .searchAllConnectionsForActor(animationsFront.actorID);
 
     is(animationsActor.actors.length, 1,
       "AnimationActor have 1 AnimationPlayerActors");
 
     info("Testing AnimationPlayerActors release");
-    let stillNodeActor = yield gWalker.querySelector(gWalker.rootNode,
+    let stillNodeActor = await gWalker.querySelector(gWalker.rootNode,
       ".still");
-    yield animationsFront.getAnimationPlayersForNode(stillNodeActor);
+    await animationsFront.getAnimationPlayersForNode(stillNodeActor);
     is(animationsActor.actors.length, 0,
       "AnimationActor does not have any AnimationPlayerActors anymore");
 
     info("Testing multi animated node actor");
-    let multiNodeActor = yield gWalker.querySelector(gWalker.rootNode,
+    let multiNodeActor = await gWalker.querySelector(gWalker.rootNode,
       ".multi");
-    yield animationsFront.getAnimationPlayersForNode(multiNodeActor);
+    await animationsFront.getAnimationPlayersForNode(multiNodeActor);
     is(animationsActor.actors.length, 2,
       "AnimationActor has now 2 AnimationPlayerActors");
 
     info("Testing single animated node actor");
-    yield animationsFront.getAnimationPlayersForNode(animatedNodeActor);
+    await animationsFront.getAnimationPlayersForNode(animatedNodeActor);
     is(animationsActor.actors.length, 1,
       "AnimationActor has only one AnimationPlayerActors");
 
     info("Testing AnimationPlayerActors release again");
-    yield animationsFront.getAnimationPlayersForNode(stillNodeActor);
+    await animationsFront.getAnimationPlayersForNode(stillNodeActor);
     is(animationsActor.actors.length, 0,
       "AnimationActor does not have any AnimationPlayerActors anymore");
 
     runNextTest();
   });
 
   runNextTest();
 };
--- a/devtools/server/tests/mochitest/test_css-properties.html
+++ b/devtools/server/tests/mochitest/test_css-properties.html
@@ -98,20 +98,20 @@ window.onload = function () {
       "A property with color values includes non-colors.");
 
     ok(cssProperties.isValidOnClient("margin", "0px", window.document),
       "Margin and 0px are valid CSS values");
     ok(!cssProperties.isValidOnClient("margin", "foo", window.document),
       "Margin and foo are not valid CSS values");
   };
 
-  addAsyncTest(function* setup() {
+  addAsyncTest(async function setup() {
     let url = document.getElementById("cssProperties").href;
-    yield runCssPropertiesTests(url, true);
-    yield runCssPropertiesTests(url, false);
+    await runCssPropertiesTests(url, true);
+    await runCssPropertiesTests(url, false);
 
     runNextTest();
   });
 
   SimpleTest.waitForExplicitFinish();
   runNextTest();
 };
   </script>
--- a/devtools/server/tests/mochitest/test_inspector-anonymous.html
+++ b/devtools/server/tests/mochitest/test_inspector-anonymous.html
@@ -42,73 +42,73 @@ window.onload = function () {
       let inspector = InspectorFront(client, tab);
       promiseDone(inspector.getWalker().then(walker => {
         ok(walker, "getWalker() should return an actor.");
         gWalker = walker;
       }).then(runNextTest));
     });
   });
 
-  addAsyncTest(function* testXBLAnonymousInHTMLDocument() {
+  addAsyncTest(async function testXBLAnonymousInHTMLDocument() {
     info("Testing XBL anonymous in an HTML document.");
     let rawToolbarbutton = gInspectee.createElementNS(XUL_NS, "toolbarbutton");
     gInspectee.documentElement.appendChild(rawToolbarbutton);
 
-    let toolbarbutton = yield gWalker.querySelector(gWalker.rootNode, "toolbarbutton");
-    let children = yield gWalker.children(toolbarbutton);
+    let toolbarbutton = await gWalker.querySelector(gWalker.rootNode, "toolbarbutton");
+    let children = await gWalker.children(toolbarbutton);
 
     is(toolbarbutton.numChildren, 0, "XBL content is not visible in HTML doc");
     is(children.nodes.length, 0, "XBL content is not returned in HTML doc");
 
     runNextTest();
   });
 
-  addAsyncTest(function* testNativeAnonymous() {
+  addAsyncTest(async function testNativeAnonymous() {
     info("Testing native anonymous content with walker.");
 
-    let select = yield gWalker.querySelector(gWalker.rootNode, "select");
-    let children = yield gWalker.children(select);
+    let select = await gWalker.querySelector(gWalker.rootNode, "select");
+    let children = await gWalker.children(select);
 
     is(select.numChildren, 2, "No native anon content for form control");
     is(children.nodes.length, 2, "No native anon content for form control");
 
     runNextTest();
   });
 
-  addAsyncTest(function* testNativeAnonymousStartingNode() {
+  addAsyncTest(async function testNativeAnonymousStartingNode() {
     info("Tests attaching an element that a walker can't see.");
 
     let serverWalker = DebuggerServer.searchAllConnectionsForActor(gWalker.actorID);
     let docwalker = new _documentWalker(
       gInspectee.querySelector("select"),
       gInspectee.defaultView,
       nodeFilterConstants.SHOW_ALL,
       () => {
         return nodeFilterConstants.FILTER_ACCEPT;
       }
     );
     let scrollbar = docwalker.lastChild();
     is(scrollbar.tagName, "scrollbar", "An anonymous child has been fetched");
 
-    let node = yield serverWalker.attachElement(scrollbar);
+    let node = await serverWalker.attachElement(scrollbar);
 
     ok(node, "A response has arrived");
     ok(node.node, "A node is in the response");
     is(node.node.rawNode.tagName, "SELECT",
       "The node has changed to a parent that the walker recognizes");
 
     runNextTest();
   });
 
-  addAsyncTest(function* testPseudoElements() {
+  addAsyncTest(async function testPseudoElements() {
     info("Testing pseudo elements with walker.");
 
     // Markup looks like: <div><::before /><span /><::after /></div>
-    let pseudo = yield gWalker.querySelector(gWalker.rootNode, "#pseudo");
-    let children = yield gWalker.children(pseudo);
+    let pseudo = await gWalker.querySelector(gWalker.rootNode, "#pseudo");
+    let children = await gWalker.children(pseudo);
 
     is(pseudo.numChildren, 1, "::before/::after are not counted if there is a child");
     is(children.nodes.length, 3, "Correct number of children");
 
     let before = children.nodes[0];
     ok(before.isAnonymous, "Child is anonymous");
     ok(!before._form.isXBLAnonymous, "Child is not XBL anonymous");
     ok(!before._form.isShadowAnonymous, "Child is not shadow anonymous");
@@ -121,47 +121,47 @@ window.onload = function () {
     ok(after.isAnonymous, "Child is anonymous");
     ok(!after._form.isXBLAnonymous, "Child is not XBL anonymous");
     ok(!after._form.isShadowAnonymous, "Child is not shadow anonymous");
     ok(after._form.isNativeAnonymous, "Child is native anonymous");
 
     runNextTest();
   });
 
-  addAsyncTest(function* testEmptyWithPseudo() {
+  addAsyncTest(async function testEmptyWithPseudo() {
     info("Testing elements with no childrent, except for pseudos.");
 
     info("Checking an element whose only child is a pseudo element");
-    let pseudo = yield gWalker.querySelector(gWalker.rootNode, "#pseudo-empty");
-    let children = yield gWalker.children(pseudo);
+    let pseudo = await gWalker.querySelector(gWalker.rootNode, "#pseudo-empty");
+    let children = await gWalker.children(pseudo);
 
     is(pseudo.numChildren, 1,
        "::before/::after are is counted if there are no other children");
     is(children.nodes.length, 1, "Correct number of children");
 
     let before = children.nodes[0];
     ok(before.isAnonymous, "Child is anonymous");
     ok(!before._form.isXBLAnonymous, "Child is not XBL anonymous");
     ok(!before._form.isShadowAnonymous, "Child is not shadow anonymous");
     ok(before._form.isNativeAnonymous, "Child is native anonymous");
 
     runNextTest();
   });
 
-  addAsyncTest(function* testShadowAnonymous() {
+  addAsyncTest(async function testShadowAnonymous() {
     // Stylo doesn't currently support shadow DOM (bug 1293844)
     if (isStylo) {
       runNextTest();
       return;
     }
 
     info("Testing shadow DOM content.");
 
-    let shadow = yield gWalker.querySelector(gWalker.rootNode, "#shadow");
-    let children = yield gWalker.children(shadow);
+    let shadow = await gWalker.querySelector(gWalker.rootNode, "#shadow");
+    let children = await gWalker.children(shadow);
 
     is(shadow.numChildren, 3, "Children of the shadow root are counted");
     is(children.nodes.length, 3, "Children returned from walker");
 
     let before = children.nodes[0];
     ok(before.isAnonymous, "Child is anonymous");
     ok(!before._form.isXBLAnonymous, "Child is not XBL anonymous");
     ok(!before._form.isShadowAnonymous, "Child is not shadow anonymous");
@@ -169,17 +169,17 @@ window.onload = function () {
 
     // <h3>Shadow <em>DOM</em></h3>
     let shadowChild1 = children.nodes[1];
     ok(shadowChild1.isAnonymous, "Child is anonymous");
     ok(!shadowChild1._form.isXBLAnonymous, "Child is not XBL anonymous");
     ok(shadowChild1._form.isShadowAnonymous, "Child is shadow anonymous");
     ok(!shadowChild1._form.isNativeAnonymous, "Child is not native anonymous");
 
-    let shadowSubChildren = yield gWalker.children(children.nodes[1]);
+    let shadowSubChildren = await gWalker.children(children.nodes[1]);
     is(shadowChild1.numChildren, 2, "Subchildren of the shadow root are counted");
     is(shadowSubChildren.nodes.length, 2, "Subchildren are returned from walker");
 
     // <em>DOM</em>
     let shadowSubChild = children.nodes[1];
     ok(shadowSubChild.isAnonymous, "Child is anonymous");
     ok(!shadowSubChild._form.isXBLAnonymous, "Child is not XBL anonymous");
     ok(shadowSubChild._form.isShadowAnonymous, "Child is shadow anonymous");
--- a/devtools/server/tests/mochitest/test_inspector-dead-nodes.html
+++ b/devtools/server/tests/mochitest/test_inspector-dead-nodes.html
@@ -33,341 +33,341 @@ addAsyncTest(async function() {
 
   let {InspectorFront} = require("devtools/shared/fronts/inspector");
   let inspector = InspectorFront(client, tab);
   gWalker = await inspector.getWalker();
 
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.parents(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.parents(nodeFront);
-  yield newRoot;
+  await gWalker.parents(nodeFront);
+  await newRoot;
 
   ok(true, "The call to walker.parents() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.children(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "body");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "body");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.children(nodeFront);
-  yield newRoot;
+  await gWalker.children(nodeFront);
+  await newRoot;
 
   ok(true, "The call to walker.children() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.siblings(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.siblings(nodeFront);
-  yield newRoot;
+  await gWalker.siblings(nodeFront);
+  await newRoot;
 
   ok(true, "The call to walker.siblings() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.nextSibling(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.nextSibling(nodeFront);
-  yield newRoot;
+  await gWalker.nextSibling(nodeFront);
+  await newRoot;
 
   ok(true, "The call to walker.nextSibling() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.previousSibling(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.previousSibling(nodeFront);
-  yield newRoot;
+  await gWalker.previousSibling(nodeFront);
+  await newRoot;
 
   ok(true, "The call to walker.previousSibling() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.addPseudoClassLock(nodeFront) before the load completes " +
     "shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.addPseudoClassLock(nodeFront, ":hover");
-  yield newRoot;
+  await gWalker.addPseudoClassLock(nodeFront, ":hover");
+  await newRoot;
 
   ok(true, "The call to walker.addPseudoClassLock() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.removePseudoClassLock(nodeFront) before the load completes " +
     "shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.removePseudoClassLock(nodeFront, ":hover");
-  yield newRoot;
+  await gWalker.removePseudoClassLock(nodeFront, ":hover");
+  await newRoot;
 
   ok(true, "The call to walker.removePseudoClassLock() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.clearPseudoClassLocks(nodeFront) before the load completes " +
     "shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.clearPseudoClassLocks(nodeFront);
-  yield newRoot;
+  await gWalker.clearPseudoClassLocks(nodeFront);
+  await newRoot;
 
   ok(true, "The call to walker.clearPseudoClassLocks() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.innerHTML(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.innerHTML(nodeFront);
-  yield newRoot;
+  await gWalker.innerHTML(nodeFront);
+  await newRoot;
 
   ok(true, "The call to walker.innerHTML() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.setInnerHTML(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.setInnerHTML(nodeFront, "<span>innerHTML changed</span>");
-  yield newRoot;
+  await gWalker.setInnerHTML(nodeFront, "<span>innerHTML changed</span>");
+  await newRoot;
 
   ok(true, "The call to walker.setInnerHTML() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.outerHTML(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.outerHTML(nodeFront);
-  yield newRoot;
+  await gWalker.outerHTML(nodeFront);
+  await newRoot;
 
   ok(true, "The call to walker.outerHTML() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.setOuterHTML(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.setOuterHTML(nodeFront, "<h1><span>innerHTML changed</span></h1>");
-  yield newRoot;
+  await gWalker.setOuterHTML(nodeFront, "<h1><span>innerHTML changed</span></h1>");
+  await newRoot;
 
   ok(true, "The call to walker.setOuterHTML() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.insertAdjacentHTML(nodeFront) before the load completes shouldn't " +
     "fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.insertAdjacentHTML(nodeFront, "afterEnd",
+  await gWalker.insertAdjacentHTML(nodeFront, "afterEnd",
     "<span>new adjacent HTML</span>");
-  yield newRoot;
+  await newRoot;
 
   ok(true, "The call to walker.insertAdjacentHTML() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.removeNode(nodeFront) before the load completes should throw");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
   let hasThrown = false;
   try {
-    yield gWalker.removeNode(nodeFront);
+    await gWalker.removeNode(nodeFront);
   } catch (e) {
     hasThrown = true;
   }
-  yield newRoot;
+  await newRoot;
 
   ok(hasThrown, "The call to walker.removeNode() threw");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.removeNodes([nodeFront]) before the load completes should throw");
 
-  let nodeFront1 = yield gWalker.querySelector(gWalker.rootNode, "h1");
-  let nodeFront2 = yield gWalker.querySelector(gWalker.rootNode, "#longstring");
-  let nodeFront3 = yield gWalker.querySelector(gWalker.rootNode, "#shortstring");
+  let nodeFront1 = await gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront2 = await gWalker.querySelector(gWalker.rootNode, "#longstring");
+  let nodeFront3 = await gWalker.querySelector(gWalker.rootNode, "#shortstring");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
   let hasThrown = false;
   try {
-    yield gWalker.removeNodes([nodeFront1, nodeFront2, nodeFront3]);
+    await gWalker.removeNodes([nodeFront1, nodeFront2, nodeFront3]);
   } catch (e) {
     hasThrown = true;
   }
-  yield newRoot;
+  await newRoot;
 
   ok(hasThrown, "The call to walker.removeNodes() threw");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.insertBefore(nodeFront, parent, null) before the load completes " +
     "shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
-  let newParentFront = yield gWalker.querySelector(gWalker.rootNode, "#longlist");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
+  let newParentFront = await gWalker.querySelector(gWalker.rootNode, "#longlist");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.insertBefore(nodeFront, newParentFront);
-  yield newRoot;
+  await gWalker.insertBefore(nodeFront, newParentFront);
+  await newRoot;
 
   ok(true, "The call to walker.insertBefore() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.insertBefore(nodeFront, parent, sibling) before the load completes " +
     "shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
-  let newParentFront = yield gWalker.querySelector(gWalker.rootNode, "#longlist");
-  let siblingFront = yield gWalker.querySelector(gWalker.rootNode, "#b");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
+  let newParentFront = await gWalker.querySelector(gWalker.rootNode, "#longlist");
+  let siblingFront = await gWalker.querySelector(gWalker.rootNode, "#b");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.insertBefore(nodeFront, newParentFront, siblingFront);
-  yield newRoot;
+  await gWalker.insertBefore(nodeFront, newParentFront, siblingFront);
+  await newRoot;
 
   ok(true, "The call to walker.insertBefore() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.editTagName(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.editTagName(nodeFront, "h2");
-  yield newRoot;
+  await gWalker.editTagName(nodeFront, "h2");
+  await newRoot;
 
   ok(true, "The call to walker.editTagName() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.hideNode(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.hideNode(nodeFront);
-  yield newRoot;
+  await gWalker.hideNode(nodeFront);
+  await newRoot;
 
   ok(true, "The call to walker.hideNode() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.unhideNode(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.unhideNode(nodeFront);
-  yield newRoot;
+  await gWalker.unhideNode(nodeFront);
+  await newRoot;
 
   ok(true, "The call to walker.unhideNode() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.releaseNode(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "h1");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "h1");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.releaseNode(nodeFront);
-  yield newRoot;
+  await gWalker.releaseNode(nodeFront);
+  await newRoot;
 
   ok(true, "The call to walker.releaseNode() didn't fail");
   runNextTest();
 });
 
-addAsyncTest(function* () {
+addAsyncTest(async function() {
   info("Getting a nodeFront, reloading the page, and calling " +
     "walker.querySelector(nodeFront) before the load completes shouldn't fail");
 
-  let nodeFront = yield gWalker.querySelector(gWalker.rootNode, "body");
+  let nodeFront = await gWalker.querySelector(gWalker.rootNode, "body");
   let newRoot = waitForMutation(gWalker, isNewRoot);
   gDoc.defaultView.location.reload();
-  yield gWalker.querySelector(nodeFront, "h1");
-  yield newRoot;
+  await gWalker.querySelector(nodeFront, "h1");
+  await newRoot;
 
   ok(true, "The call to walker.querySelector() didn't fail");
   runNextTest();
 });
 
 addTest(function cleanup() {
   gWalker = null;
   gDoc = null;
--- a/devtools/server/tests/mochitest/test_inspector-display-type.html
+++ b/devtools/server/tests/mochitest/test_inspector-display-type.html
@@ -27,46 +27,46 @@ addTest(function setup() {
     let inspector = InspectorFront(client, tab);
 
     promiseDone(inspector.getWalker().then(walker => {
       gWalker = walker;
     }).then(runNextTest));
   });
 });
 
-addAsyncTest(function* testInlineBlockDisplayType() {
+addAsyncTest(async function testInlineBlockDisplayType() {
   info("Test getting the display type of an inline block element.");
-  let node = yield gWalker.querySelector(gWalker.rootNode, "#inline-block");
+  let node = await gWalker.querySelector(gWalker.rootNode, "#inline-block");
   let displayType = node.displayType;
   is(displayType, "inline-block", "The node has a display type of 'inline-block'.");
   runNextTest();
 });
 
-addAsyncTest(function* testInlineTextChildDisplayType() {
+addAsyncTest(async function testInlineTextChildDisplayType() {
   info("Test getting the display type of an inline text child.");
-  let node = yield gWalker.querySelector(gWalker.rootNode, "#inline-block");
-  let children = yield gWalker.children(node);
+  let node = await gWalker.querySelector(gWalker.rootNode, "#inline-block");
+  let children = await gWalker.children(node);
   let inlineTextChild = children.nodes[0];
   let displayType = inlineTextChild.displayType;
   ok(!displayType, "No display type for inline text child.");
   runNextTest();
 });
 
-addAsyncTest(function* testGridDisplayType() {
+addAsyncTest(async function testGridDisplayType() {
   info("Test getting the display type of an grid container.");
-  let node = yield gWalker.querySelector(gWalker.rootNode, "#grid");
+  let node = await gWalker.querySelector(gWalker.rootNode, "#grid");
   let displayType = node.displayType;
   is(displayType, "grid", "The node has a display type of 'grid'.");
   runNextTest();
 });
 
-addAsyncTest(function* testBlockDisplayType() {
+addAsyncTest(async function testBlockDisplayType() {
   info("Test getting the display type of a block element.");
-  let node = yield gWalker.querySelector(gWalker.rootNode, "#block");
-  let displayType = yield node.displayType;
+  let node = await gWalker.querySelector(gWalker.rootNode, "#block");
+  let displayType = await node.displayType;
   is(displayType, "block", "The node has a display type of 'block'.");
   runNextTest();
 });
 
 addTest(function () {
   gWalker = null;
   runNextTest();
 });
--- a/devtools/server/tests/mochitest/test_inspector-insert.html
+++ b/devtools/server/tests/mochitest/test_inspector-insert.html
@@ -31,71 +31,71 @@ addTest(function setup() {
     let inspectorFront = InspectorFront(client, tab);
     promiseDone(inspectorFront.getWalker().then(walker => {
       ok(walker, "getWalker() should return an actor.");
       gWalker = walker;
     }).then(runNextTest));
   });
 });
 
-addAsyncTest(function* testRearrange() {
-  let longlist = yield gWalker.querySelector(gWalker.rootNode, "#longlist");
-  let children = yield gWalker.children(longlist);
+addAsyncTest(async function testRearrange() {
+  let longlist = await gWalker.querySelector(gWalker.rootNode, "#longlist");
+  let children = await gWalker.children(longlist);
   let nodeA = children.nodes[0];
   is(nodeA.id, "a", "Got the expected node.");
 
   // Move nodeA to the end of the list.
-  yield gWalker.insertBefore(nodeA, longlist, null);
+  await gWalker.insertBefore(nodeA, longlist, null);
   ok(!gInspectee.querySelector("#a").nextSibling,
      "a should now be at the end of the list.");
-  children = yield gWalker.children(longlist);
+  children = await gWalker.children(longlist);
   is(nodeA, children.nodes[children.nodes.length - 1],
      "a should now be the last returned child.");
 
   // Now move it to the middle of the list.
   let nextNode = children.nodes[13];
-  yield gWalker.insertBefore(nodeA, longlist, nextNode);
+  await gWalker.insertBefore(nodeA, longlist, nextNode);
   let sibling =
     new DocumentWalker(gInspectee.querySelector("#a"), window).nextSibling();
   is(sibling, nextNode.rawNode(), "Node should match the expected next node.");
-  children = yield gWalker.children(longlist);
+  children = await gWalker.children(longlist);
   is(nodeA, children.nodes[13], "a should be where we expect it.");
   is(nextNode, children.nodes[14], "next node should be where we expect it.");
 
   runNextTest();
 });
 
-addAsyncTest(function* testInsertInvalidInput() {
-  let longlist = yield gWalker.querySelector(gWalker.rootNode, "#longlist");
-  let children = yield gWalker.children(longlist);
+addAsyncTest(async function testInsertInvalidInput() {
+  let longlist = await gWalker.querySelector(gWalker.rootNode, "#longlist");
+  let children = await gWalker.children(longlist);
   let nodeA = children.nodes[0];
   let nextSibling = children.nodes[1];
 
   // Now move it to the original location and make sure no mutation happens.
   let hasMutated = false;
   let observer = new gInspectee.defaultView.MutationObserver(() => {
     hasMutated = true;
   });
   observer.observe(longlist.rawNode(), {
     childList: true,
   });
 
-  yield gWalker.insertBefore(nodeA, longlist, nodeA);
+  await gWalker.insertBefore(nodeA, longlist, nodeA);
   ok(!hasMutated, "hasn't mutated");
   hasMutated = false;
 
-  yield gWalker.insertBefore(nodeA, longlist, nextSibling);
+  await gWalker.insertBefore(nodeA, longlist, nextSibling);
   ok(!hasMutated, "still hasn't mutated after inserting before nextSibling");
   hasMutated = false;
 
-  yield gWalker.insertBefore(nodeA, longlist);
+  await gWalker.insertBefore(nodeA, longlist);
   ok(hasMutated, "has mutated after inserting with null sibling");
   hasMutated = false;
 
-  yield gWalker.insertBefore(nodeA, longlist);
+  await gWalker.insertBefore(nodeA, longlist);
   ok(!hasMutated, "hasn't mutated after inserting with null sibling again");
 
   observer.disconnect();
   runNextTest();
 });
 
 addTest(function cleanup() {
   gWalker = null;
--- a/devtools/server/tests/mochitest/test_inspector-mutations-events.html
+++ b/devtools/server/tests/mochitest/test_inspector-mutations-events.html
@@ -41,22 +41,22 @@ window.onload = function () {
     });
 
     walker = await inspector.getWalker();
     ok(walker, "getWalker() should return an actor.");
 
     runNextTest();
   });
 
-  addAsyncTest(function* setupEventTest() {
+  addAsyncTest(async function setupEventTest() {
     eventNode1 = inspectee.querySelector("#a");
     eventNode2 = inspectee.querySelector("#b");
 
-    eventFront1 = yield walker.querySelector(walker.rootNode, "#a");
-    eventFront2 = yield walker.querySelector(walker.rootNode, "#b");
+    eventFront1 = await walker.querySelector(walker.rootNode, "#a");
+    eventFront2 = await walker.querySelector(walker.rootNode, "#b");
 
     runNextTest();
   });
 
   addAsyncTest(async function testChangeEventListenerOnSingleNode() {
     checkNodesHaveNoEventListener();
 
     info("add event listener on a single node");
--- a/devtools/server/tests/mochitest/test_inspector-pick-color.html
+++ b/devtools/server/tests/mochitest/test_inspector-pick-color.html
@@ -34,54 +34,54 @@ window.onload = function () {
         inspector = InspectorFront(client, tab);
         resolve();
       });
     });
 
     runNextTest();
   });
 
-  addAsyncTest(function* () {
+  addAsyncTest(async function() {
     info("Start picking a color from the page");
-    yield inspector.pickColorFromPage();
+    await inspector.pickColorFromPage();
 
     info("Click in the page and make sure a color-picked event is received");
     let onColorPicked = waitForEvent("color-picked");
     win.document.body.click();
-    let color = yield onColorPicked;
+    let color = await onColorPicked;
 
     is(color, "#000000", "The color-picked event was received with the right color");
 
     runNextTest();
   });
 
-  addAsyncTest(function* () {
+  addAsyncTest(async function() {
     info("Start picking a color from the page");
-    yield inspector.pickColorFromPage();
+    await inspector.pickColorFromPage();
 
     info("Use the escape key to dismiss the eyedropper");
     let onPickCanceled = waitForEvent("color-pick-canceled");
 
     let keyboardEvent = win.document.createEvent("KeyboardEvent");
     keyboardEvent.initKeyEvent("keydown", true, true, win, false, false,
                                false, false, 27, 0);
     win.document.dispatchEvent(keyboardEvent);
 
-    yield onPickCanceled;
+    await onPickCanceled;
     ok(true, "The color-pick-canceled event was received");
 
     runNextTest();
   });
 
-  addAsyncTest(function* () {
+  addAsyncTest(async function() {
     info("Start picking a color from the page");
-    yield inspector.pickColorFromPage();
+    await inspector.pickColorFromPage();
 
     info("And cancel the color picking");
-    yield inspector.cancelPickColorFromPage();
+    await inspector.cancelPickColorFromPage();
 
     runNextTest();
   });
 
   function waitForEvent(name) {
     return new Promise(resolve => inspector.once(name, resolve));
   }
 
--- a/devtools/server/tests/mochitest/test_inspector-resize.html
+++ b/devtools/server/tests/mochitest/test_inspector-resize.html
@@ -34,32 +34,32 @@ window.onload = function () {
         inspector = InspectorFront(client, tab);
         resolve();
       });
     });
 
     runNextTest();
   });
 
-  addAsyncTest(function* () {
-    let walker = yield inspector.getWalker();
+  addAsyncTest(async function() {
+    let walker = await inspector.getWalker();
 
     // We can't receive events from the walker if we haven't first executed a
     // method on the actor to initialize it.
-    yield walker.querySelector(walker.rootNode, "img");
+    await walker.querySelector(walker.rootNode, "img");
 
     let {outerWidth, outerHeight} = win;
     // eslint-disable-next-line new-cap
     let onResize = new Promise(resolve => {
       walker.once("resize", () => {
         resolve();
       });
     });
     win.resizeTo(800, 600);
-    yield onResize;
+    await onResize;
 
     ok(true, "The resize event was emitted");
     win.resizeTo(outerWidth, outerHeight);
 
     runNextTest();
   });
 
   runNextTest();
--- a/devtools/server/tests/mochitest/test_inspector-search-front.html
+++ b/devtools/server/tests/mochitest/test_inspector-search-front.html
@@ -40,134 +40,134 @@ window.onload = function () {
     });
 
     walkerFront = await inspector.getWalker();
     ok(walkerFront, "getWalker() should return an actor.");
 
     runNextTest();
   });
 
-  addAsyncTest(function* testWalkerFrontDefaults() {
+  addAsyncTest(async function testWalkerFrontDefaults() {
     info("Testing search API using WalkerFront.");
-    let nodes = yield walkerFront.querySelectorAll(walkerFront.rootNode, "h2");
-    let fronts = yield nodes.items();
+    let nodes = await walkerFront.querySelectorAll(walkerFront.rootNode, "h2");
+    let fronts = await nodes.items();
 
-    let frontResult = yield walkerFront.search("");
+    let frontResult = await walkerFront.search("");
     ok(!frontResult, "Null result on front when searching for ''");
 
-    let results = yield walkerFront.search("h2");
+    let results = await walkerFront.search("h2");
     isDeeply(results, {
       node: fronts[0],
       type: "search",
       resultsIndex: 0,
       resultsLength: 3
     }, "Default options work");
 
-    results = yield walkerFront.search("h2", { });
+    results = await walkerFront.search("h2", { });
     isDeeply(results, {
       node: fronts[1],
       type: "search",
       resultsIndex: 1,
       resultsLength: 3
     }, "Search works with empty options");
 
     // Clear search data to remove result state on the front
-    yield walkerFront.search("");
+    await walkerFront.search("");
     runNextTest();
   });
 
-  addAsyncTest(function* testMultipleSearches() {
+  addAsyncTest(async function testMultipleSearches() {
     info("Testing search API using WalkerFront (reverse=false)");
-    let nodes = yield walkerFront.querySelectorAll(walkerFront.rootNode, "h2");
-    let fronts = yield nodes.items();
+    let nodes = await walkerFront.querySelectorAll(walkerFront.rootNode, "h2");
+    let fronts = await nodes.items();
 
-    let results = yield walkerFront.search("h2");
+    let results = await walkerFront.search("h2");
     isDeeply(results, {
       node: fronts[0],
       type: "search",
       resultsIndex: 0,
       resultsLength: 3
     }, "Search works with multiple results (reverse=false)");
 
-    results = yield walkerFront.search("h2");
+    results = await walkerFront.search("h2");
     isDeeply(results, {
       node: fronts[1],
       type: "search",
       resultsIndex: 1,
       resultsLength: 3
     }, "Search works with multiple results (reverse=false)");
 
-    results = yield walkerFront.search("h2");
+    results = await walkerFront.search("h2");
     isDeeply(results, {
       node: fronts[2],
       type: "search",
       resultsIndex: 2,
       resultsLength: 3
     }, "Search works with multiple results (reverse=false)");
 
-    results = yield walkerFront.search("h2");
+    results = await walkerFront.search("h2");
     isDeeply(results, {
       node: fronts[0],
       type: "search",
       resultsIndex: 0,
       resultsLength: 3
     }, "Search works with multiple results (reverse=false)");
 
     // Clear search data to remove result state on the front
-    yield walkerFront.search("");
+    await walkerFront.search("");
     runNextTest();
   });
 
-  addAsyncTest(function* testMultipleSearchesReverse() {
+  addAsyncTest(async function testMultipleSearchesReverse() {
     info("Testing search API using WalkerFront (reverse=true)");
-    let nodes = yield walkerFront.querySelectorAll(walkerFront.rootNode, "h2");
-    let fronts = yield nodes.items();
+    let nodes = await walkerFront.querySelectorAll(walkerFront.rootNode, "h2");
+    let fronts = await nodes.items();
 
-    let results = yield walkerFront.search("h2", {reverse: true});
+    let results = await walkerFront.search("h2", {reverse: true});
     isDeeply(results, {
       node: fronts[2],
       type: "search",
       resultsIndex: 2,
       resultsLength: 3
     }, "Search works with multiple results (reverse=true)");
 
-    results = yield walkerFront.search("h2", {reverse: true});
+    results = await walkerFront.search("h2", {reverse: true});
     isDeeply(results, {
       node: fronts[1],
       type: "search",
       resultsIndex: 1,
       resultsLength: 3
     }, "Search works with multiple results (reverse=true)");
 
-    results = yield walkerFront.search("h2", {reverse: true});
+    results = await walkerFront.search("h2", {reverse: true});
     isDeeply(results, {
       node: fronts[0],
       type: "search",
       resultsIndex: 0,
       resultsLength: 3
     }, "Search works with multiple results (reverse=true)");
 
-    results = yield walkerFront.search("h2", {reverse: true});
+    results = await walkerFront.search("h2", {reverse: true});
     isDeeply(results, {
       node: fronts[2],
       type: "search",
       resultsIndex: 2,
       resultsLength: 3
     }, "Search works with multiple results (reverse=true)");
 
-    results = yield walkerFront.search("h2", {reverse: false});
+    results = await walkerFront.search("h2", {reverse: false});
     isDeeply(results, {
       node: fronts[0],
       type: "search",
       resultsIndex: 0,
       resultsLength: 3
     }, "Search works with multiple results (reverse=false)");
 
     // Clear search data to remove result state on the front
-    yield walkerFront.search("");
+    await walkerFront.search("");
     runNextTest();
   });
 
   runNextTest();
 };
   </script>
 </head>
 <body>
--- a/devtools/server/tests/mochitest/test_styles-layout.html
+++ b/devtools/server/tests/mochitest/test_styles-layout.html
@@ -32,37 +32,37 @@ addTest(function () {
   });
 });
 
 addTest(function () {
   ok(gStyles.getLayout, "The PageStyleActor has a getLayout method");
   runNextTest();
 });
 
-addAsyncTest(function* () {
-  let node = yield gWalker.querySelector(gWalker.rootNode, "#layout-element");
-  let layout = yield gStyles.getLayout(node, {});
+addAsyncTest(async function() {
+  let node = await gWalker.querySelector(gWalker.rootNode, "#layout-element");
+  let layout = await gStyles.getLayout(node, {});
 
   let properties = ["width", "height",
                     "margin-top", "margin-right", "margin-bottom",
                     "margin-left", "padding-top", "padding-right",
                     "padding-bottom", "padding-left", "border-top-width",
                     "border-right-width", "border-bottom-width",
                     "border-left-width", "z-index", "box-sizing", "display",
                     "position"];
   for (let prop of properties) {
     ok((prop in layout), "The layout object returned has " + prop);
   }
 
   runNextTest();
 });
 
-addAsyncTest(function* () {
-  let node = yield gWalker.querySelector(gWalker.rootNode, "#layout-element");
-  let layout = yield gStyles.getLayout(node, {});
+addAsyncTest(async function() {
+  let node = await gWalker.querySelector(gWalker.rootNode, "#layout-element");
+  let layout = await gStyles.getLayout(node, {});
 
   let expected = {
     "box-sizing": "border-box",
     "position": "absolute",
     "z-index": "2",
     "display": "block",
     "width": 50,
     "height": 50,
@@ -74,25 +74,25 @@ addAsyncTest(function* () {
 
   for (let name in expected) {
     is(layout[name], expected[name], "The " + name + " property is correct");
   }
 
   runNextTest();
 });
 
-addAsyncTest(function* () {
-  let node = yield gWalker.querySelector(gWalker.rootNode,
+addAsyncTest(async function() {
+  let node = await gWalker.querySelector(gWalker.rootNode,
                                          "#layout-auto-margin-element");
 
-  let layout = yield gStyles.getLayout(node, {});
+  let layout = await gStyles.getLayout(node, {});
   ok(!("autoMargins" in layout),
      "By default, getLayout doesn't return auto margins");
 
-  layout = yield gStyles.getLayout(node, {autoMargins: true});
+  layout = await gStyles.getLayout(node, {autoMargins: true});
   ok(("autoMargins" in layout),
      "getLayout does return auto margins when asked to");
   is(layout.autoMargins.left, "auto", "The left margin is auto");
   is(layout.autoMargins.right, "auto", "The right margin is auto");
   ok(!layout.autoMargins.bottom, "The bottom margin is not auto");
   ok(!layout.autoMargins.top, "The top margin is not auto");
 
   runNextTest();
--- a/devtools/server/tests/mochitest/test_styles-modify.html
+++ b/devtools/server/tests/mochitest/test_styles-modify.html
@@ -38,65 +38,65 @@ addAsyncTest(async function setup() {
   });
 
   gWalker = await inspector.getWalker();
   gStyles = await inspector.getPageStyle();
 
   runNextTest();
 });
 
-addAsyncTest(function* modifyProperties() {
+addAsyncTest(async function modifyProperties() {
   let localNode = gInspectee.querySelector("#inheritable-rule-inheritable-style");
 
-  let node = yield gWalker.querySelector(gWalker.rootNode,
+  let node = await gWalker.querySelector(gWalker.rootNode,
     "#inheritable-rule-inheritable-style");
 
-  let applied = yield gStyles.getApplied(node,
+  let applied = await gStyles.getApplied(node,
     { inherited: false, filter: "user" });
 
   let elementStyle = applied[0].rule;
   is(elementStyle.cssText, localNode.style.cssText, "Got expected css text");
 
   // Change an existing property...
-  yield setProperty(elementStyle, 0, "color", "black");
+  await setProperty(elementStyle, 0, "color", "black");
   // Create a new property
-  yield setProperty(elementStyle, 1, "background-color", "green");
+  await setProperty(elementStyle, 1, "background-color", "green");
 
   // Create a new property and then change it immediately.
-  yield setProperty(elementStyle, 2, "border", "1px solid black");
-  yield setProperty(elementStyle, 2, "border", "2px solid black");
+  await setProperty(elementStyle, 2, "border", "1px solid black");
+  await setProperty(elementStyle, 2, "border", "2px solid black");
 
   is(elementStyle.cssText,
      "color: black; background-color: green; border: 2px solid black;",
      "Should have expected cssText");
   is(elementStyle.cssText, localNode.style.cssText,
      "Local node and style front match.");
 
   // Remove all the properties
-  yield removeProperty(elementStyle, 0, "color");
-  yield removeProperty(elementStyle, 0, "background-color");
-  yield removeProperty(elementStyle, 0, "border");
+  await removeProperty(elementStyle, 0, "color");
+  await removeProperty(elementStyle, 0, "background-color");
+  await removeProperty(elementStyle, 0, "border");
 
   is(elementStyle.cssText, "", "Should have expected cssText");
   is(elementStyle.cssText, localNode.style.cssText,
      "Local node and style front match.");
 
   runNextTest();
 });
 
-function* setProperty(rule, index, name, value) {
+async function setProperty(rule, index, name, value) {
   let changes = rule.startModifyingProperties(isCssPropertyKnown);
   changes.setProperty(index, name, value);
-  yield changes.apply();
+  await changes.apply();
 }
 
-function* removeProperty(rule, index, name) {
+async function removeProperty(rule, index, name) {
   let changes = rule.startModifyingProperties(isCssPropertyKnown);
   changes.removeProperty(index, name);
-  yield changes.apply();
+  await changes.apply();
 }
 
 addTest(function cleanup() {
   gStyles = null;
   gWalker = null;
   gInspectee = null;
   runNextTest();
 });
--- a/devtools/server/tests/mochitest/webconsole-helpers.js
+++ b/devtools/server/tests/mochitest/webconsole-helpers.js
@@ -33,19 +33,19 @@ if (!DebuggerServer.initialized) {
  *           - consoleClient: the console client
  *           - cleanup: a generator function which can be called to close
  *             the opened tab and disconnect its debugger client.
  */
 async function attachURL(url) {
   let win = window.open(url, "_blank");
   let client = null;
 
-  let cleanup = function* () {
+  let cleanup = async function() {
     if (client) {
-      yield client.close();
+      await client.close();
       client = null;
     }
     if (win) {
       win.close();
       win = null;
     }
   };
   SimpleTest.registerCleanupFunction(cleanup);
--- a/devtools/server/tests/unit/test_addon_reload.js
+++ b/devtools/server/tests/unit/test_addon_reload.js
@@ -29,18 +29,18 @@ function promiseWebExtensionStartup() {
       Management.off("ready", listener);
       resolve(extension);
     };
 
     Management.on("ready", listener);
   });
 }
 
-function* findAddonInRootList(client, addonId) {
-  const result = yield client.listAddons();
+async function findAddonInRootList(client, addonId) {
+  const result = await client.listAddons();
   const addonActor = result.addons.filter(addon => addon.id === addonId)[0];
   ok(addonActor, `Found add-on actor for ${addonId}`);
   return addonActor;
 }
 
 async function reloadAddon(client, addonActor) {
   // The add-on will be re-installed after a successful reload.
   const onInstalled = promiseAddonEvent("onInstalled");
--- a/devtools/server/tests/unit/test_promises_actor_attach.js
+++ b/devtools/server/tests/unit/test_promises_actor_attach.js
@@ -24,31 +24,31 @@ add_task(async function() {
 
   let [ tabResponse ] = await attachTab(client, targetTab);
 
   await testAttach(client, tabResponse);
 
   await close(client);
 });
 
-function* testAttach(client, parent) {
+async function testAttach(client, parent) {
   let promises = PromisesFront(client, parent);
 
   try {
-    yield promises.detach();
+    await promises.detach();
     ok(false, "Should not be able to detach when in a detached state.");
   } catch (e) {
     ok(true, "Expected detach to fail when already in a detached state.");
   }
 
-  yield promises.attach();
+  await promises.attach();
   ok(true, "Expected attach to succeed.");
 
   try {
-    yield promises.attach();
+    await promises.attach();
     ok(false, "Should not be able to attach when in an attached state.");
   } catch (e) {
     ok(true, "Expected attach to fail when already in an attached state.");
   }
 
-  yield promises.detach();
+  await promises.detach();
   ok(true, "Expected detach to succeed.");
 }
--- a/devtools/server/tests/unit/test_promises_actor_list_promises.js
+++ b/devtools/server/tests/unit/test_promises_actor_list_promises.js
@@ -27,24 +27,24 @@ add_task(async function() {
   await testListPromises(client, targetTab, v => {
     const debuggee = DebuggerServer.getTestGlobal("promises-actor-test");
     return debuggee.Promise.resolve(v);
   });
 
   await close(client);
 });
 
-function* testListPromises(client, form, makePromise) {
+async function testListPromises(client, form, makePromise) {
   let resolution = SECRET + Math.random();
   let promise = makePromise(resolution);
   let front = PromisesFront(client, form);
 
-  yield front.attach();
+  await front.attach();
 
-  let promises = yield front.listPromises();
+  let promises = await front.listPromises();
 
   let found = false;
   for (let p of promises) {
     equal(p.type, "object", "Expect type to be Object");
     equal(p.class, "Promise", "Expect class to be Promise");
     equal(typeof p.promiseState.creationTimestamp, "number",
       "Expect creation timestamp to be a number");
     if (p.promiseState.state !== "pending") {
@@ -54,12 +54,12 @@ function* testListPromises(client, form,
 
     if (p.promiseState.state === "fulfilled" &&
         p.promiseState.value === resolution) {
       found = true;
     }
   }
 
   ok(found, "Found our promise");
-  yield front.detach();
+  await front.detach();
   // Appease eslint
   void promise;
 }
--- a/devtools/server/tests/unit/test_promises_actor_onpromisesettled.js
+++ b/devtools/server/tests/unit/test_promises_actor_onpromisesettled.js
@@ -36,36 +36,36 @@ add_task(async function() {
   }, v => {
     const debuggee = DebuggerServer.getTestGlobal("promises-actor-test");
     return debuggee.Promise.reject(v);
   });
 
   await close(client);
 });
 
-function* testPromisesSettled(client, form, makeResolvePromise,
+async function testPromisesSettled(client, form, makeResolvePromise,
     makeRejectPromise) {
   let front = PromisesFront(client, form);
   let resolution = "MyLittleSecret" + Math.random();
 
-  yield front.attach();
-  yield front.listPromises();
+  await front.attach();
+  await front.listPromises();
 
   let onPromiseSettled = oncePromiseSettled(front, resolution, true, false);
   let resolvedPromise = makeResolvePromise(resolution);
-  let foundResolvedPromise = yield onPromiseSettled;
+  let foundResolvedPromise = await onPromiseSettled;
   ok(foundResolvedPromise, "Found our resolved promise");
 
   PromiseTestUtils.expectUncaughtRejection(r => r.message == resolution);
   onPromiseSettled = oncePromiseSettled(front, resolution, false, true);
   let rejectedPromise = makeRejectPromise(resolution);
-  let foundRejectedPromise = yield onPromiseSettled;
+  let foundRejectedPromise = await onPromiseSettled;
   ok(foundRejectedPromise, "Found our rejected promise");
 
-  yield front.detach();
+  await front.detach();
   // Appease eslint
   void resolvedPromise;
   void rejectedPromise;
 }
 
 function oncePromiseSettled(front, resolution, resolveValue, rejectValue) {
   return new Promise(resolve => {
     EventEmitter.on(front, "promises-settled", promises => {
--- a/devtools/server/tests/unit/test_protocolSpec.js
+++ b/devtools/server/tests/unit/test_protocolSpec.js
@@ -1,19 +1,19 @@
 "use strict";
 
-const run_test = Test(function* () {
+const run_test = Test(async function() {
   initTestDebuggerServer();
   const connection = DebuggerServer.connectPipe();
   const client = Async(new DebuggerClient(connection));
 
-  yield client.connect();
+  await client.connect();
 
-  const response = yield client.request({
+  const response = await client.request({
     to: "root",
     type: "protocolDescription"
   });
 
   assert(response.from == "root");
   assert(typeof (response.types) === "object");
 
-  yield client.close();
+  await client.close();
 });
--- a/devtools/server/tests/unit/test_protocol_formtype.js
+++ b/devtools/server/tests/unit/test_protocol_formtype.js
@@ -136,45 +136,45 @@ var RootFront = protocol.FrontClassWithS
     this.manage(this);
   },
 
   form(v, ctx, detail) {
     this.lastForm = v;
   }
 });
 
-const run_test = Test(function* () {
+const run_test = Test(async function() {
   DebuggerServer.createRootActor = (conn => {
     return RootActor(conn);
   });
   DebuggerServer.init();
 
   const connection = DebuggerServer.connectPipe();
   const conn = new DebuggerClient(connection);
   const client = Async(conn);
 
-  yield client.connect();
+  await client.connect();
 
   let rootFront = RootFront(conn);
 
   // Trigger some methods that return forms.
-  let retval = yield rootFront.getDefault();
+  let retval = await rootFront.getDefault();
   Assert.ok(retval instanceof RootFront);
   Assert.ok(rootFront.lastForm.childActor instanceof ChildFront);
 
-  retval = yield rootFront.getDetail1();
+  retval = await rootFront.getDetail1();
   Assert.ok(retval instanceof RootFront);
   Assert.ok(rootFront.lastForm.detailItem instanceof ChildFront);
 
-  retval = yield rootFront.getDetail2();
+  retval = await rootFront.getDetail2();
   Assert.ok(retval instanceof RootFront);
   Assert.ok(typeof (rootFront.lastForm) === "string");
 
   // getUnknownDetail should fail, since no typeName is specified.
   try {
-    yield rootFront.getUnknownDetail();
+    await rootFront.getUnknownDetail();
     Assert.ok(false);
   } catch (ex) {
     // empty
   }
 
-  yield client.close();
+  await client.close();
 });
--- a/devtools/server/tests/unit/test_symbols-01.js
+++ b/devtools/server/tests/unit/test_symbols-01.js
@@ -20,17 +20,17 @@ function run_test() {
                              add_task(testSymbols.bind(null, client, debuggee));
                              run_next_test();
                            });
   });
 
   do_test_pending();
 }
 
-function* testSymbols(client, debuggee) {
+async function testSymbols(client, debuggee) {
   const evalCode = () => {
     /* eslint-disable */
     Components.utils.evalInSandbox(
       "(" + function () {
         var symbolWithName = Symbol("Chris");
         var symbolWithoutName = Symbol();
         var iteratorSymbol = Symbol.iterator;
         debugger;
@@ -38,17 +38,17 @@ function* testSymbols(client, debuggee) 
       debuggee,
       "1.8",
       URL,
       1
     );
     /* eslint-enable */
   };
 
-  const packet = yield executeOnNextTickAndWaitForPause(evalCode, client);
+  const packet = await executeOnNextTickAndWaitForPause(evalCode, client);
   const {
     symbolWithName,
     symbolWithoutName,
     iteratorSymbol
   } = packet.frame.environment.bindings.variables;
 
   equal(symbolWithName.value.type, "symbol");
   equal(symbolWithName.value.name, "Chris");
--- a/devtools/server/tests/unit/test_symbols-02.js
+++ b/devtools/server/tests/unit/test_symbols-02.js
@@ -20,17 +20,17 @@ function run_test() {
                              add_task(testSymbols.bind(null, client, debuggee));
                              run_next_test();
                            });
   });
 
   do_test_pending();
 }
 
-function* testSymbols(client, debuggee) {
+async function testSymbols(client, debuggee) {
   const evalCode = () => {
     /* eslint-disable */
     Components.utils.evalInSandbox(
       "(" + function () {
         Symbol.prototype.toString = () => {
           throw new Error("lololol");
         };
         var sym = Symbol("le troll");
@@ -39,16 +39,16 @@ function* testSymbols(client, debuggee) 
       debuggee,
       "1.8",
       URL,
       1
     );
     /* eslint-enable */
   };
 
-  const packet = yield executeOnNextTickAndWaitForPause(evalCode, client);
+  const packet = await executeOnNextTickAndWaitForPause(evalCode, client);
   const { sym } = packet.frame.environment.bindings.variables;
 
   equal(sym.value.type, "symbol");
   equal(sym.value.name, "le troll");
 
   finishClient(client);
 }