Bug 1429121 - Automated conversion of RDM to async / await. r=ochameau
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 09 Jan 2018 10:08:35 -0600
changeset 453743 f82b2ca6885f85c4ab2139dc3bd0ca6f87469dad
parent 453742 b70ab4f919acd33abae5cfc4ef0315b869775a1a
child 453744 a923bf4a14d6aea75ae0fb54986f991e8ef61f9a
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1429121
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1429121 - Automated conversion of RDM to async / await. r=ochameau MozReview-Commit-ID: BdzxQW6TbEK
devtools/client/responsive.html/actions/devices.js
devtools/client/responsive.html/actions/screenshot.js
devtools/client/responsive.html/browser/swap.js
devtools/client/responsive.html/browser/tunnel.js
devtools/client/responsive.html/commands.js
devtools/client/responsive.html/index.js
devtools/client/responsive.html/manager.js
devtools/client/responsive.html/test/browser/browser_cmd_click.js
devtools/client/responsive.html/test/browser/browser_device_change.js
devtools/client/responsive.html/test/browser/browser_device_custom.js
devtools/client/responsive.html/test/browser/browser_device_custom_remove.js
devtools/client/responsive.html/test/browser/browser_device_modal_error.js
devtools/client/responsive.html/test/browser/browser_device_modal_exit.js
devtools/client/responsive.html/test/browser/browser_device_modal_submit.js
devtools/client/responsive.html/test/browser/browser_device_pixel_ratio_change.js
devtools/client/responsive.html/test/browser/browser_device_width.js
devtools/client/responsive.html/test/browser/browser_exit_button.js
devtools/client/responsive.html/test/browser/browser_frame_script_active.js
devtools/client/responsive.html/test/browser/browser_hide_container.js
devtools/client/responsive.html/test/browser/browser_menu_item_01.js
devtools/client/responsive.html/test/browser/browser_menu_item_02.js
devtools/client/responsive.html/test/browser/browser_mouse_resize.js
devtools/client/responsive.html/test/browser/browser_navigation.js
devtools/client/responsive.html/test/browser/browser_network_throttling.js
devtools/client/responsive.html/test/browser/browser_page_state.js
devtools/client/responsive.html/test/browser/browser_permission_doorhanger.js
devtools/client/responsive.html/test/browser/browser_resize_cmd.js
devtools/client/responsive.html/test/browser/browser_screenshot_button.js
devtools/client/responsive.html/test/browser/browser_tab_close.js
devtools/client/responsive.html/test/browser/browser_tab_remoteness_change.js
devtools/client/responsive.html/test/browser/browser_target_blank.js
devtools/client/responsive.html/test/browser/browser_toolbox_computed_view.js
devtools/client/responsive.html/test/browser/browser_toolbox_rule_view.js
devtools/client/responsive.html/test/browser/browser_toolbox_swap_browsers.js
devtools/client/responsive.html/test/browser/browser_touch_device.js
devtools/client/responsive.html/test/browser/browser_touch_simulation.js
devtools/client/responsive.html/test/browser/browser_viewport_basics.js
devtools/client/responsive.html/test/browser/browser_window_close.js
devtools/client/responsive.html/test/browser/head.js
--- a/devtools/client/responsive.html/actions/devices.js
+++ b/devtools/client/responsive.html/actions/devices.js
@@ -69,19 +69,19 @@ function updatePreferredDevices(devices)
 module.exports = {
 
   // This function is only exported for testing purposes
   _loadPreferredDevices: loadPreferredDevices,
 
   updatePreferredDevices: updatePreferredDevices,
 
   addCustomDevice(device) {
-    return function* (dispatch) {
+    return async function (dispatch) {
       // Add custom device to device storage
-      yield addDevice(device, "custom");
+      await addDevice(device, "custom");
       dispatch({
         type: ADD_DEVICE,
         device,
         deviceType: "custom",
       });
     };
   },
 
@@ -96,27 +96,27 @@ module.exports = {
   addDeviceType(deviceType) {
     return {
       type: ADD_DEVICE_TYPE,
       deviceType,
     };
   },
 
   removeCustomDevice(device) {
-    return function* (dispatch, getState) {
+    return async function (dispatch, getState) {
       // Check if the custom device is currently associated with any viewports
       let { viewports } = getState();
       for (let viewport of viewports) {
         if (viewport.device == device.name) {
           dispatch(removeDeviceAssociation(viewport.id));
         }
       }
 
       // Remove custom device from device storage
-      yield removeDevice(device, "custom");
+      await removeDevice(device, "custom");
       dispatch({
         type: REMOVE_DEVICE,
         device,
         deviceType: "custom",
       });
     };
   },
 
@@ -125,23 +125,23 @@ module.exports = {
       type: UPDATE_DEVICE_DISPLAYED,
       device,
       deviceType,
       displayed,
     };
   },
 
   loadDevices() {
-    return function* (dispatch) {
+    return async function (dispatch) {
       dispatch({ type: LOAD_DEVICE_LIST_START });
       let preferredDevices = loadPreferredDevices();
       let devices;
 
       try {
-        devices = yield getDevices();
+        devices = await getDevices();
       } catch (e) {
         console.error("Could not load device list: " + e);
         dispatch({ type: LOAD_DEVICE_LIST_ERROR });
         return;
       }
 
       for (let type of devices.TYPES) {
         dispatch(module.exports.addDeviceType(type));
--- a/devtools/client/responsive.html/actions/screenshot.js
+++ b/devtools/client/responsive.html/actions/screenshot.js
@@ -36,17 +36,17 @@ function getFileName() {
 
 function createScreenshotFor(node) {
   let mm = node.frameLoader.messageManager;
 
   return e10s.request(mm, "RequestScreenshot");
 }
 
 function saveToFile(data, filename) {
-  return spawn(function* () {
+  return spawn(function () {
     const chromeWindow = getToplevelWindow(window);
     const chromeDocument = chromeWindow.document;
 
     // append .png extension to filename if it doesn't exist
     filename = filename.replace(/\.png$|$/i, ".png");
 
     chromeWindow.saveURL(data, filename, null,
                          true, true,
@@ -60,26 +60,26 @@ function simulateCameraEffects(node) {
     cameraAudio.play();
   }
   node.animate({ opacity: [ 0, 1 ] }, 500);
 }
 
 module.exports = {
 
   takeScreenshot() {
-    return function* (dispatch, getState) {
-      yield dispatch({ type: TAKE_SCREENSHOT_START });
+    return async function (dispatch, getState) {
+      await dispatch({ type: TAKE_SCREENSHOT_START });
 
       // Waiting the next repaint, to ensure the react components
       // can be properly render after the action dispatched above
-      yield animationFrame();
+      await animationFrame();
 
       let iframe = document.querySelector("iframe");
-      let data = yield createScreenshotFor(iframe);
+      let data = await createScreenshotFor(iframe);
 
       simulateCameraEffects(iframe);
 
-      yield saveToFile(data, getFileName());
+      await saveToFile(data, getFileName());
 
       dispatch({ type: TAKE_SCREENSHOT_END });
     };
   }
 };
--- a/devtools/client/responsive.html/browser/swap.js
+++ b/devtools/client/responsive.html/browser/swap.js
@@ -87,17 +87,17 @@ function swapToInnerBrowser({ tab, conta
     if (otherBrowser.frameLoader.tabParent.tabId != contentTabId) {
       // Bug 1408602: Try to unwind to save tab content from being lost.
       throw new Error("Swapping tab content between browsers failed.");
     }
   };
 
   return {
 
-    start: Task.async(function* () {
+    async start() {
       tab.isResponsiveDesignMode = true;
 
       // Hide the browser content temporarily while things move around to avoid displaying
       // strange intermediate states.
       tab.linkedBrowser.style.visibility = "hidden";
 
       // Freeze navigation temporarily to avoid "blinking" in the location bar.
       freezeNavigationState(tab);
@@ -146,19 +146,19 @@ function swapToInnerBrowser({ tab, conta
       // has finished.
       debug("Set container docShell active");
       containerBrowser.docShellIsActive = true;
 
       // 3. Create the initial viewport inside the tool UI.
       // The calling application will use container page loaded into the tab to
       // do whatever it needs to create the inner browser.
       debug("Yield to container tab loaded");
-      yield tabLoaded(containerTab);
+      await tabLoaded(containerTab);
       debug("Yield to get inner browser");
-      innerBrowser = yield getInnerBrowser(containerBrowser);
+      innerBrowser = await getInnerBrowser(containerBrowser);
       addXULBrowserDecorations(innerBrowser);
       if (innerBrowser.isRemoteBrowser != tab.linkedBrowser.isRemoteBrowser) {
         throw new Error("The inner browser's remoteness must match the " +
                         "original tab.");
       }
 
       // 4. Swap tab content from the regular browser tab to the browser within
       //    the viewport in the tool UI, preserving all state via
@@ -179,17 +179,17 @@ function swapToInnerBrowser({ tab, conta
       debug("Swap tool UI to original tab");
       swapBrowsersAndCloseOtherSilently(tab, containerTab);
 
       // 7. Start a tunnel from the tool tab's browser to the viewport browser
       //    so that some browser UI functions, like navigation, are connected to
       //    the content in the viewport, instead of the tool page.
       tunnel = tunnelToInnerBrowser(tab.linkedBrowser, innerBrowser);
       debug("Yield to tunnel start");
-      yield tunnel.start();
+      await tunnel.start();
 
       // Swapping browsers disconnects the find bar UI from the browser.
       // If the find bar has been initialized, reconnect it.
       if (gBrowser.isFindBarInitialized(tab)) {
         let findBar = gBrowser.getFindBar(tab);
         findBar.browser = tab.linkedBrowser;
         if (!findBar.hidden) {
           // Force the find bar to activate again, restoring the search string.
@@ -199,17 +199,17 @@ function swapToInnerBrowser({ tab, conta
 
       // Force the browser UI to match the new state of the tab and browser.
       thawNavigationState(tab);
       gBrowser.setTabTitle(tab);
       gBrowser.updateCurrentBrowser(true);
 
       // Show the browser content again now that the move is done.
       tab.linkedBrowser.style.visibility = "";
-    }),
+    },
 
     stop() {
       // Hide the browser content temporarily while things move around to avoid displaying
       // strange intermediate states.
       tab.linkedBrowser.style.visibility = "hidden";
 
       // 1. Stop the tunnel between outer and inner browsers.
       tunnel.stop();
--- a/devtools/client/responsive.html/browser/tunnel.js
+++ b/devtools/client/responsive.html/browser/tunnel.js
@@ -90,17 +90,17 @@ const PROPERTIES_FROM_BROWSER_WINDOW = [
  */
 function tunnelToInnerBrowser(outer, inner) {
   let browserWindow = outer.ownerDocument.defaultView;
   let gBrowser = browserWindow.gBrowser;
   let mmTunnel;
 
   return {
 
-    start: Task.async(function* () {
+    async start() {
       if (outer.isRemoteBrowser) {
         throw new Error("The outer browser must be non-remote.");
       }
       if (!inner.isRemoteBrowser) {
         throw new Error("The inner browser must be remote.");
       }
 
       // Various browser methods access the `frameLoader` property, including:
@@ -229,17 +229,17 @@ function tunnelToInnerBrowser(outer, inn
           },
           configurable: true,
           enumerable: true,
         });
       }
 
       // Add mozbrowser event handlers
       inner.addEventListener("mozbrowseropenwindow", this);
-    }),
+    },
 
     handleEvent(event) {
       if (event.type != "mozbrowseropenwindow") {
         return;
       }
 
       // Minimal support for <a target/> and window.open() which just ensures we at
       // least open them somewhere (in a new tab).  The following things are ignored:
--- a/devtools/client/responsive.html/commands.js
+++ b/devtools/client/responsive.html/commands.js
@@ -87,15 +87,15 @@ exports.items = [
         type: "number",
         description: l10n.lookup("resizePageArgHeightDesc"),
       },
     ],
     exec: resize
   }
 ];
 
-function* resize(args, context) {
+async function resize(args, context) {
   let browserWindow = context.environment.chromeWindow;
-  yield ResponsiveUIManager.handleGcliCommand(browserWindow,
+  await ResponsiveUIManager.handleGcliCommand(browserWindow,
                                               browserWindow.gBrowser.selectedTab,
                                               this.name,
                                               args);
 }
--- a/devtools/client/responsive.html/index.js
+++ b/devtools/client/responsive.html/index.js
@@ -34,29 +34,29 @@ const { loadDevices } = require("./actio
 window.require = require;
 
 let bootstrap = {
 
   telemetry: new Telemetry(),
 
   store: null,
 
-  init: Task.async(function* () {
+  async init() {
     // Load a special UA stylesheet to reset certain styles such as dropdown
     // lists.
     loadAgentSheet(
       window,
       "resource://devtools/client/responsive.html/responsive-ua.css"
     );
     this.telemetry.toolOpened("responsive");
     let store = this.store = Store();
     let provider = createElement(Provider, { store }, App());
     ReactDOM.render(provider, document.querySelector("#root"));
     message.post(window, "init:done");
-  }),
+  },
 
   destroy() {
     this.store = null;
     this.telemetry.toolClosed("responsive");
     this.telemetry = null;
   },
 
   /**
--- a/devtools/client/responsive.html/manager.js
+++ b/devtools/client/responsive.html/manager.js
@@ -70,70 +70,70 @@ const ResponsiveUIManager = exports.Resp
    *        The browser tab.
    * @param options
    *        Other options associated with opening.  Currently includes:
    *        - `command`: Whether initiated via GCLI command bar or toolbox button
    * @return Promise
    *         Resolved to the ResponsiveUI instance for this tab when opening is
    *         complete.
    */
-  openIfNeeded: Task.async(function* (window, tab, options) {
+  async openIfNeeded(window, tab, options) {
     if (!tab.linkedBrowser.isRemoteBrowser) {
       this.showRemoteOnlyNotification(window, tab, options);
       return promise.reject(new Error("RDM only available for remote tabs."));
     }
     // Remove this once we support this case in bug 1306975.
     if (tab.linkedBrowser.hasAttribute("usercontextid")) {
       this.showNoContainerTabsNotification(window, tab, options);
       return promise.reject(new Error("RDM not available for container tabs."));
     }
     if (!this.isActiveForTab(tab)) {
       this.initMenuCheckListenerFor(window);
 
       let ui = new ResponsiveUI(window, tab);
       this.activeTabs.set(tab, ui);
-      yield this.setMenuCheckFor(tab, window);
-      yield ui.inited;
+      await this.setMenuCheckFor(tab, window);
+      await ui.inited;
       this.emit("on", { tab });
     }
 
     return this.getResponsiveUIForTab(tab);
-  }),
+  },
 
   /**
    * Closes the responsive UI, if not already closed.
    *
    * @param window
    *        The main browser chrome window.
    * @param tab
    *        The browser tab.
    * @param options
    *        Other options associated with closing.  Currently includes:
    *        - `command`: Whether initiated via GCLI command bar or toolbox button
    *        - `reason`: String detailing the specific cause for closing
    * @return Promise
    *         Resolved (with no value) when closing is complete.
    */
-  closeIfNeeded: Task.async(function* (window, tab, options) {
+  async closeIfNeeded(window, tab, options) {
     if (this.isActiveForTab(tab)) {
       let ui = this.activeTabs.get(tab);
-      let destroyed = yield ui.destroy(options);
+      let destroyed = await ui.destroy(options);
       if (!destroyed) {
         // Already in the process of destroying, abort.
         return;
       }
       this.activeTabs.delete(tab);
 
       if (!this.isActiveForWindow(window)) {
         this.removeMenuCheckListenerFor(window);
       }
       this.emit("off", { tab });
-      yield this.setMenuCheckFor(tab, window);
+      await this.setMenuCheckFor(tab, window);
     }
-  }),
+  },
 
   /**
    * Returns true if responsive UI is active for a given tab.
    *
    * @param tab
    *        The browser tab.
    * @return boolean
    */
@@ -208,24 +208,24 @@ const ResponsiveUIManager = exports.Resp
 
   removeMenuCheckListenerFor(window) {
     if (window && window.gBrowser && window.gBrowser.tabContainer) {
       let { tabContainer } = window.gBrowser;
       tabContainer.removeEventListener("TabSelect", this.handleMenuCheck);
     }
   },
 
-  setMenuCheckFor: Task.async(function* (tab, window = tab.ownerGlobal) {
-    yield startup(window);
+  async setMenuCheckFor(tab, window = tab.ownerGlobal) {
+    await startup(window);
 
     let menu = window.document.getElementById("menu_responsiveUI");
     if (menu) {
       menu.setAttribute("checked", this.isActiveForTab(tab));
     }
-  }),
+  },
 
   showRemoteOnlyNotification(window, tab, options) {
     this.showErrorNotification(window, tab, options, getStr("responsive.remoteOnly"));
   },
 
   showNoContainerTabsNotification(window, tab, options) {
     this.showErrorNotification(window, tab, options,
                                getStr("responsive.noContainerTabs"));
@@ -315,59 +315,59 @@ ResponsiveUI.prototype = {
 
   /**
    * Open RDM while preserving the state of the page.  We use `swapFrameLoaders`
    * to ensure all in-page state is preserved, just like when you move a tab to
    * a new window.
    *
    * For more details, see /devtools/docs/responsive-design-mode.md.
    */
-  init: Task.async(function* () {
+  async init() {
     debug("Init start");
 
     let ui = this;
 
     // Watch for tab close and window close so we can clean up RDM synchronously
     this.tab.addEventListener("TabClose", this);
     this.browserWindow.addEventListener("unload", this);
 
     // Swap page content from the current tab into a viewport within RDM
     debug("Create browser swapper");
     this.swap = swapToInnerBrowser({
       tab: this.tab,
       containerURL: TOOL_URL,
-      getInnerBrowser: Task.async(function* (containerBrowser) {
+      async getInnerBrowser(containerBrowser) {
         let toolWindow = ui.toolWindow = containerBrowser.contentWindow;
         toolWindow.addEventListener("message", ui);
         debug("Yield to init from inner");
-        yield message.request(toolWindow, "init");
+        await message.request(toolWindow, "init");
         toolWindow.addInitialViewport("about:blank");
         debug("Yield to browser mounted");
-        yield message.wait(toolWindow, "browser-mounted");
+        await message.wait(toolWindow, "browser-mounted");
         return ui.getViewportBrowser();
-      })
+      }
     });
     debug("Yield to swap start");
-    yield this.swap.start();
+    await this.swap.start();
 
     this.tab.addEventListener("BeforeTabRemotenessChange", this);
 
     // Notify the inner browser to start the frame script
     debug("Yield to start frame script");
-    yield message.request(this.toolWindow, "start-frame-script");
+    await message.request(this.toolWindow, "start-frame-script");
 
     // Get the protocol ready to speak with emulation actor
     debug("Yield to RDP server connect");
-    yield this.connectToServer();
+    await this.connectToServer();
 
     // Non-blocking message to tool UI to start any delayed init activities
     message.post(this.toolWindow, "post-init");
 
     debug("Init done");
-  }),
+  },
 
   /**
    * Close RDM and restore page content back into a regular tab.
    *
    * @param object
    *        Destroy options, which currently includes a `reason` string.
    * @return boolean
    *         Whether this call is actually destroying.  False means destruction
@@ -437,24 +437,24 @@ ResponsiveUI.prototype = {
       swap.stop();
     }
 
     this.destroyed = true;
 
     return true;
   },
 
-  connectToServer: Task.async(function* () {
+  async connectToServer() {
     DebuggerServer.init();
     DebuggerServer.registerAllActors();
     this.client = new DebuggerClient(DebuggerServer.connectPipe());
-    yield this.client.connect();
-    let { tab } = yield this.client.getTab();
+    await this.client.connect();
+    let { tab } = await this.client.getTab();
     this.emulationFront = EmulationFront(this.client, tab);
-  }),
+  },
 
   handleEvent(event) {
     let { browserWindow, tab } = this;
 
     switch (event.type) {
       case "message":
         this.handleMessage(event);
         break;
@@ -493,35 +493,35 @@ ResponsiveUI.prototype = {
         this.onExit();
         break;
       case "remove-device-association":
         this.onRemoveDeviceAssociation(event);
         break;
     }
   },
 
-  onChangeDevice: Task.async(function* (event) {
+  async onChangeDevice(event) {
     let { userAgent, pixelRatio, touch } = event.data.device;
     // Bug 1428799: Should we reload on UA change as well?
-    yield this.updateUserAgent(userAgent);
-    yield this.updateDPPX(pixelRatio);
-    let reloadNeeded = yield this.updateTouchSimulation(touch);
+    await this.updateUserAgent(userAgent);
+    await this.updateDPPX(pixelRatio);
+    let reloadNeeded = await this.updateTouchSimulation(touch);
     if (reloadNeeded) {
       this.getViewportBrowser().reload();
     }
     // Used by tests
     this.emit("device-changed");
-  }),
+  },
 
-  onChangeNetworkThrottling: Task.async(function* (event) {
+  async onChangeNetworkThrottling(event) {
     let { enabled, profile } = event.data;
-    yield this.updateNetworkThrottling(enabled, profile);
+    await this.updateNetworkThrottling(enabled, profile);
     // Used by tests
     this.emit("network-throttling-changed");
-  }),
+  },
 
   onChangePixelRatio(event) {
     let { pixelRatio } = event.data;
     this.updateDPPX(pixelRatio);
   },
 
   async onChangeTouchSimulation(event) {
     let { enabled } = event.data;
@@ -541,65 +541,65 @@ ResponsiveUI.prototype = {
     });
   },
 
   onExit() {
     let { browserWindow, tab } = this;
     ResponsiveUIManager.closeIfNeeded(browserWindow, tab);
   },
 
-  onRemoveDeviceAssociation: Task.async(function* (event) {
+  async onRemoveDeviceAssociation(event) {
     // Bug 1428799: Should we reload on UA change as well?
-    yield this.updateUserAgent();
-    yield this.updateDPPX();
-    let reloadNeeded = yield this.updateTouchSimulation();
+    await this.updateUserAgent();
+    await this.updateDPPX();
+    let reloadNeeded = await this.updateTouchSimulation();
     if (reloadNeeded) {
       this.getViewportBrowser().reload();
     }
     // Used by tests
     this.emit("device-association-removed");
-  }),
+  },
 
   /**
    * Set or clear the emulated device pixel ratio.
    *
    * @return boolean
    *         Whether a reload is needed to apply the change.
    *         (This is always immediate, so it's always false.)
    */
-  updateDPPX: Task.async(function* (dppx) {
+  async updateDPPX(dppx) {
     if (!dppx) {
-      yield this.emulationFront.clearDPPXOverride();
+      await this.emulationFront.clearDPPXOverride();
       return false;
     }
-    yield this.emulationFront.setDPPXOverride(dppx);
+    await this.emulationFront.setDPPXOverride(dppx);
     return false;
-  }),
+  },
 
   /**
    * Set or clear network throttling.
    *
    * @return boolean
    *         Whether a reload is needed to apply the change.
    *         (This is always immediate, so it's always false.)
    */
-  updateNetworkThrottling: Task.async(function* (enabled, profile) {
+  async updateNetworkThrottling(enabled, profile) {
     if (!enabled) {
-      yield this.emulationFront.clearNetworkThrottling();
+      await this.emulationFront.clearNetworkThrottling();
       return false;
     }
     let data = throttlingProfiles.find(({ id }) => id == profile);
     let { download, upload, latency } = data;
-    yield this.emulationFront.setNetworkThrottling({
+    await this.emulationFront.setNetworkThrottling({
       downloadThroughput: download,
       uploadThroughput: upload,
       latency,
     });
     return false;
-  }),
+  },
 
   /**
    * Set or clear the emulated user agent.
    *
    * @return boolean
    *         Whether a reload is needed to apply the change.
    */
   updateUserAgent(userAgent) {
@@ -629,20 +629,20 @@ ResponsiveUI.prototype = {
    */
   getViewportSize() {
     return this.toolWindow.getViewportSize();
   },
 
   /**
    * Helper for tests, GCLI, etc. Assumes a single viewport for now.
    */
-  setViewportSize: Task.async(function* (size) {
-    yield this.inited;
+  async setViewportSize(size) {
+    await this.inited;
     this.toolWindow.setViewportSize(size);
-  }),
+  },
 
   /**
    * Helper for tests/reloading the viewport. Assumes a single viewport for now.
    */
   getViewportBrowser() {
     return this.toolWindow.getViewportBrowser();
   },
 
--- a/devtools/client/responsive.html/test/browser/browser_cmd_click.js
+++ b/devtools/client/responsive.html/test/browser/browser_cmd_click.js
@@ -5,25 +5,25 @@
 
 // Ensure Cmd/Ctrl-clicking link opens a new tab
 
 const TAB_URL = "http://example.com/";
 const TEST_URL =
   `data:text/html,<a href="${TAB_URL}">Click me</a>`
   .replace(/ /g, "%20");
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let store = ui.toolWindow.store;
 
   // Wait until the viewport has been added
-  yield waitUntilState(store, state => state.viewports.length == 1);
+  await waitUntilState(store, state => state.viewports.length == 1);
 
   // Cmd-click the link and wait for a new tab
-  yield waitForFrameLoad(ui, TEST_URL);
+  await waitForFrameLoad(ui, TEST_URL);
   let newTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, TAB_URL);
   BrowserTestUtils.synthesizeMouseAtCenter("a", {
     ctrlKey: true,
     metaKey: true,
   }, ui.getViewportBrowser());
-  let newTab = yield newTabPromise;
+  let newTab = await newTabPromise;
   ok(newTab, "New tab opened from link");
-  yield removeTab(newTab);
+  await removeTab(newTab);
 });
--- a/devtools/client/responsive.html/test/browser/browser_device_change.js
+++ b/devtools/client/responsive.html/test/browser/browser_device_change.js
@@ -23,60 +23,60 @@ const testDevice = {
   "firefoxOS": true,
   "os": "custom",
   "featured": true,
 };
 
 // Add the new device to the list
 addDeviceForTest(testDevice);
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let { store } = ui.toolWindow;
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 
   // Test defaults
   testViewportDimensions(ui, 320, 480);
   info("Should have default UA at the start of the test");
-  yield testUserAgent(ui, DEFAULT_UA);
-  yield testDevicePixelRatio(ui, DEFAULT_DPPX);
-  yield testTouchEventsOverride(ui, false);
+  await testUserAgent(ui, DEFAULT_UA);
+  await testDevicePixelRatio(ui, DEFAULT_DPPX);
+  await testTouchEventsOverride(ui, false);
   testViewportDeviceSelectLabel(ui, "no device selected");
 
   // Test device with custom properties
   let reloaded = waitForViewportLoad(ui);
-  yield selectDevice(ui, "Fake Phone RDM Test");
-  yield reloaded;
-  yield waitForViewportResizeTo(ui, testDevice.width, testDevice.height);
+  await selectDevice(ui, "Fake Phone RDM Test");
+  await reloaded;
+  await waitForViewportResizeTo(ui, testDevice.width, testDevice.height);
   info("Should have device UA now that device is applied");
-  yield testUserAgent(ui, testDevice.userAgent);
-  yield testDevicePixelRatio(ui, testDevice.pixelRatio);
-  yield testTouchEventsOverride(ui, true);
+  await testUserAgent(ui, testDevice.userAgent);
+  await testDevicePixelRatio(ui, testDevice.pixelRatio);
+  await testTouchEventsOverride(ui, true);
 
   // Test resetting device when resizing viewport
   let deviceRemoved = once(ui, "device-association-removed");
   reloaded = waitForViewportLoad(ui);
-  yield testViewportResize(ui, ".viewport-vertical-resize-handle",
+  await testViewportResize(ui, ".viewport-vertical-resize-handle",
     [-10, -10], [testDevice.width, testDevice.height - 10], [0, -10], ui);
-  yield Promise.all([ deviceRemoved, reloaded ]);
+  await Promise.all([ deviceRemoved, reloaded ]);
   info("Should have default UA after resizing viewport");
-  yield testUserAgent(ui, DEFAULT_UA);
-  yield testDevicePixelRatio(ui, DEFAULT_DPPX);
-  yield testTouchEventsOverride(ui, false);
+  await testUserAgent(ui, DEFAULT_UA);
+  await testDevicePixelRatio(ui, DEFAULT_DPPX);
+  await testTouchEventsOverride(ui, false);
   testViewportDeviceSelectLabel(ui, "no device selected");
 
   // Test device with generic properties
-  yield selectDevice(ui, "Laptop (1366 x 768)");
-  yield waitForViewportResizeTo(ui, 1366, 768);
+  await selectDevice(ui, "Laptop (1366 x 768)");
+  await waitForViewportResizeTo(ui, 1366, 768);
   info("Should have default UA when using device without specific UA");
-  yield testUserAgent(ui, DEFAULT_UA);
-  yield testDevicePixelRatio(ui, 1);
-  yield testTouchEventsOverride(ui, false);
+  await testUserAgent(ui, DEFAULT_UA);
+  await testDevicePixelRatio(ui, 1);
+  await testTouchEventsOverride(ui, false);
 });
 
 add_task(async function () {
   const tab = await addTab(TEST_URL);
   const { ui } = await openRDM(tab);
 
   let { store } = ui.toolWindow;
 
@@ -108,18 +108,18 @@ function testViewportDimensions(ui, w, h
   let viewport = ui.toolWindow.document.querySelector(".viewport-content");
 
   is(ui.toolWindow.getComputedStyle(viewport).getPropertyValue("width"),
      `${w}px`, `Viewport should have width of ${w}px`);
   is(ui.toolWindow.getComputedStyle(viewport).getPropertyValue("height"),
      `${h}px`, `Viewport should have height of ${h}px`);
 }
 
-function* testDevicePixelRatio(ui, expected) {
-  let dppx = yield getViewportDevicePixelRatio(ui);
+async function testDevicePixelRatio(ui, expected) {
+  let dppx = await getViewportDevicePixelRatio(ui);
   is(dppx, expected, `devicePixelRatio should be set to ${expected}`);
 }
 
-function* getViewportDevicePixelRatio(ui) {
-  return yield ContentTask.spawn(ui.getViewportBrowser(), {}, function* () {
+async function getViewportDevicePixelRatio(ui) {
+  return await ContentTask.spawn(ui.getViewportBrowser(), {}, async function () {
     return content.devicePixelRatio;
   });
 }
--- a/devtools/client/responsive.html/test/browser/browser_device_custom.js
+++ b/devtools/client/responsive.html/test/browser/browser_device_custom.js
@@ -21,22 +21,22 @@ const unicodeDevice = {
   pixelRatio: 1.5,
   userAgent: "Mozilla/5.0 (Mobile; rv:39.0) Gecko/39.0 Firefox/39.0",
   touch: true,
 };
 
 const TEST_URL = "data:text/html;charset=utf-8,";
 const Types = require("devtools/client/responsive.html/types");
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let { toolWindow } = ui;
   let { store, document } = toolWindow;
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 
   let deviceSelector = document.querySelector(".viewport-device-selector");
   let submitButton = document.querySelector("#device-submit-button");
 
   openDeviceModal(ui);
 
   info("Reveal device adder form, check that defaults match the viewport");
@@ -47,44 +47,44 @@ addRDMTask(TEST_URL, function* ({ ui }) 
     width: 320,
     height: 480,
     pixelRatio: window.devicePixelRatio,
     userAgent: navigator.userAgent,
     touch: false,
   });
 
   info("Fill out device adder form and save");
-  yield addDeviceInModal(ui, device);
+  await addDeviceInModal(ui, device);
 
   info("Verify device defaults to enabled in modal");
   let deviceCb = [...document.querySelectorAll(".device-input-checkbox")].find(cb => {
     return cb.value == device.name;
   });
   ok(deviceCb, "Custom device checkbox added to modal");
   ok(deviceCb.checked, "Custom device enabled");
   submitButton.click();
 
   info("Look for custom device in device selector");
   let selectorOption = [...deviceSelector.options].find(opt => opt.value == device.name);
   ok(selectorOption, "Custom device option added to device selector");
 });
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let { toolWindow } = ui;
   let { store, document } = toolWindow;
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 
   let deviceSelector = document.querySelector(".viewport-device-selector");
   let submitButton = document.querySelector("#device-submit-button");
 
   info("Select existing device from the selector");
-  yield selectDevice(ui, "Test Device");
+  await selectDevice(ui, "Test Device");
 
   openDeviceModal(ui);
 
   info("Reveal device adder form, check that defaults are based on selected device");
   let adderShow = document.querySelector("#device-adder-show");
   adderShow.click();
   testDeviceAdder(ui, Object.assign({}, device, {
     name: "Test Device (Custom)",
@@ -92,69 +92,69 @@ addRDMTask(TEST_URL, function* ({ ui }) 
 
   info("Remove previously added custom device");
   let deviceRemoveButton = document.querySelector(".device-remove-button");
   let removed = Promise.all([
     waitUntilState(store, state => state.devices.custom.length == 0),
     once(ui, "device-association-removed")
   ]);
   deviceRemoveButton.click();
-  yield removed;
+  await removed;
   submitButton.click();
 
   info("Ensure custom device was removed from device selector");
-  yield waitUntilState(store, state => state.viewports[0].device == "");
+  await waitUntilState(store, state => state.viewports[0].device == "");
   is(deviceSelector.value, "", "Device selector reset to no device");
   let selectorOption = [...deviceSelector.options].find(opt => opt.value == device.name);
   ok(!selectorOption, "Custom device option removed from device selector");
 
   info("Ensure device properties like UA have been reset");
-  yield testUserAgent(ui, navigator.userAgent);
+  await testUserAgent(ui, navigator.userAgent);
 });
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let { toolWindow } = ui;
   let { store, document } = toolWindow;
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 
   let deviceSelector = document.querySelector(".viewport-device-selector");
   let submitButton = document.querySelector("#device-submit-button");
 
   openDeviceModal(ui);
 
   info("Reveal device adder form");
   let adderShow = document.querySelector("#device-adder-show");
   adderShow.click();
 
   info("Fill out device adder form by setting details to unicode device and save");
-  yield addDeviceInModal(ui, unicodeDevice);
+  await addDeviceInModal(ui, unicodeDevice);
 
   info("Verify unicode device defaults to enabled in modal");
   let deviceCb = [...document.querySelectorAll(".device-input-checkbox")].find(cb => {
     return cb.value == unicodeDevice.name;
   });
   ok(deviceCb, "Custom unicode device checkbox added to modal");
   ok(deviceCb.checked, "Custom unicode device enabled");
   submitButton.click();
 
   info("Look for custom unicode device in device selector");
   let selectorOption = [...deviceSelector.options].find(opt =>
     opt.value == unicodeDevice.name);
   ok(selectorOption, "Custom unicode device option added to device selector");
 });
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let { toolWindow } = ui;
   let { store, document } = toolWindow;
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 
   let deviceSelector = document.querySelector(".viewport-device-selector");
 
   // Check if the unicode custom device is present in the list of device options since
   // we want to ensure that unicode device names are not forgotten after restarting RDM
   // see bug 1379687
   info("Look for custom unicode device in device selector");
--- a/devtools/client/responsive.html/test/browser/browser_device_custom_remove.js
+++ b/devtools/client/responsive.html/test/browser/browser_device_custom_remove.js
@@ -19,44 +19,44 @@ const device = {
 const device1 = Object.assign({}, device, {
   name: "Test Device 1",
 });
 
 const device2 = Object.assign({}, device, {
   name: "Test Device 2",
 });
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let { toolWindow } = ui;
   let { store, document } = toolWindow;
 
   info("Verify that remove buttons affect the correct device");
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 
   let deviceSelector = document.querySelector(".viewport-device-selector");
   let submitButton = document.querySelector("#device-submit-button");
 
   openDeviceModal(ui);
 
   info("Reveal device adder form");
   let adderShow = document.querySelector("#device-adder-show");
   adderShow.click();
 
   info("Add test device 1");
-  yield addDeviceInModal(ui, device1);
+  await addDeviceInModal(ui, device1);
 
   info("Reveal device adder form");
   adderShow = document.querySelector("#device-adder-show");
   adderShow.click();
 
   info("Add test device 2");
-  yield addDeviceInModal(ui, device2);
+  await addDeviceInModal(ui, device2);
 
   info("Verify all custom devices default to enabled in modal");
   let deviceCbs =
     [...document.querySelectorAll(".device-type-custom .device-input-checkbox")];
   is(deviceCbs.length, 2, "Both devices have a checkbox in modal");
   for (let cb of deviceCbs) {
     ok(cb.checked, "Custom device enabled");
   }
@@ -72,34 +72,34 @@ addRDMTask(TEST_URL, function* ({ ui }) 
 
   openDeviceModal(ui);
 
   info("Remove device 2");
   let deviceRemoveButtons = [...document.querySelectorAll(".device-remove-button")];
   is(deviceRemoveButtons.length, 2, "Both devices have a remove button in modal");
   let removed = waitUntilState(store, state => state.devices.custom.length == 1);
   deviceRemoveButtons[1].click();
-  yield removed;
+  await removed;
   submitButton.click();
 
   info("Ensure device 1 is still in device selector");
   deviceOption1 = [...deviceSelector.options].find(opt => opt.value == device1.name);
   ok(deviceOption1, "Test device 1 option exists");
 
   info("Ensure device 2 is no longer in device selector");
   deviceOption2 = [...deviceSelector.options].find(opt => opt.value == device2.name);
   ok(!deviceOption2, "Test device 2 option removed");
 });
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let { toolWindow } = ui;
   let { store, document } = toolWindow;
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 
   let deviceSelector = document.querySelector(".viewport-device-selector");
 
   info("Ensure device 1 is still in device selector");
   let deviceOption1 = [...deviceSelector.options].find(opt => opt.value == device1.name);
   ok(deviceOption1, "Test device 1 option exists");
 
--- a/devtools/client/responsive.html/test/browser/browser_device_modal_error.js
+++ b/devtools/client/responsive.html/test/browser/browser_device_modal_error.js
@@ -5,29 +5,29 @@ http://creativecommons.org/publicdomain/
 
 // Test to check that RDM can handle properly an error in the device list
 
 const TEST_URL = "data:text/html;charset=utf-8,";
 const Types = require("devtools/client/responsive.html/types");
 const { getStr } = require("devtools/client/responsive.html/utils/l10n");
 
 // Set a wrong URL for the device list file
-add_task(function* () {
-  yield SpecialPowers.pushPrefEnv({
+add_task(async function () {
+  await SpecialPowers.pushPrefEnv({
     set: [["devtools.devices.url", TEST_URI_ROOT + "wrong_devices_file.json"]],
   });
 });
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let { store, document } = ui.toolWindow;
   let select = document.querySelector(".viewport-device-selector");
 
   // Wait until the viewport has been added and the device list state indicates
   // an error
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.ERROR);
 
   // The device selector placeholder should be set accordingly
   let placeholder = select.options[select.selectedIndex].innerHTML;
   ok(placeholder == getStr("responsive.deviceListError"),
     "Device selector indicates an error");
 
   // The device selector should be disabled
--- a/devtools/client/responsive.html/test/browser/browser_device_modal_exit.js
+++ b/devtools/client/responsive.html/test/browser/browser_device_modal_exit.js
@@ -3,23 +3,23 @@ http://creativecommons.org/publicdomain/
 
 "use strict";
 
 // Test submitting display device changes on the device modal
 
 const TEST_URL = "data:text/html;charset=utf-8,";
 const Types = require("devtools/client/responsive.html/types");
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let { store, document } = ui.toolWindow;
   let modal = document.querySelector("#device-modal-wrapper");
   let closeButton = document.querySelector("#device-close-button");
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 
   openDeviceModal(ui);
 
   let preferredDevicesBefore = _loadPreferredDevices();
 
   info("Check the first unchecked device and exit the modal.");
   let uncheckedCb = [...document.querySelectorAll(".device-input-checkbox")]
--- a/devtools/client/responsive.html/test/browser/browser_device_modal_submit.js
+++ b/devtools/client/responsive.html/test/browser/browser_device_modal_submit.js
@@ -16,33 +16,33 @@ const addedDevice = {
   "firefoxOS": false,
   "os": "custom",
   "featured": true,
 };
 
 const TEST_URL = "data:text/html;charset=utf-8,";
 const Types = require("devtools/client/responsive.html/types");
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let { store, document } = ui.toolWindow;
   let modal = document.querySelector("#device-modal-wrapper");
   let select = document.querySelector(".viewport-device-selector");
   let submitButton = document.querySelector("#device-submit-button");
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 
   openDeviceModal(ui);
 
   info("Checking displayed device checkboxes are checked in the device modal.");
   let checkedCbs = [...document.querySelectorAll(".device-input-checkbox")]
     .filter(cb => cb.checked);
 
-  let remoteList = yield getDevices();
+  let remoteList = await getDevices();
 
   let featuredCount = remoteList.TYPES.reduce((total, type) => {
     return total + remoteList[type].reduce((subtotal, device) => {
       return subtotal + ((device.os != "fxos" && device.featured) ? 1 : 0);
     }, 0);
   }, 0);
 
   is(featuredCount, checkedCbs.length,
@@ -105,27 +105,27 @@ addRDMTask(TEST_URL, function* ({ ui }) 
   ok([...document.querySelectorAll(".device-input-checkbox")]
     .filter(cb => !cb.checked && cb.value === checkedVal)[0],
     checkedVal + " is unchecked in the device modal.");
 
   // Let's add a dummy device to simulate featured flag changes for next test
   addDeviceForTest(addedDevice);
 });
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let { store, document } = ui.toolWindow;
   let select = document.querySelector(".viewport-device-selector");
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 
   openDeviceModal(ui);
 
-  let remoteList = yield getDevices();
+  let remoteList = await getDevices();
   let featuredCount = remoteList.TYPES.reduce((total, type) => {
     return total + remoteList[type].reduce((subtotal, device) => {
       return subtotal + ((device.os != "fxos" && device.featured) ? 1 : 0);
     }, 0);
   }, 0);
   let preferredDevices = _loadPreferredDevices();
 
   // Tests to prove that reloading the RDM didn't break our device list
--- a/devtools/client/responsive.html/test/browser/browser_device_pixel_ratio_change.js
+++ b/devtools/client/responsive.html/test/browser/browser_device_pixel_ratio_change.js
@@ -19,88 +19,88 @@ const testDevice = {
   "firefoxOS": true,
   "os": "custom",
   "featured": true,
 };
 
 // Add the new device to the list
 addDeviceForTest(testDevice);
 
-addRDMTask(TEST_URL, function* ({ ui, manager }) {
-  yield waitStartup(ui);
+addRDMTask(TEST_URL, async function ({ ui, manager }) {
+  await waitStartup(ui);
 
-  yield testDefaults(ui);
-  yield testChangingDevice(ui);
-  yield testResetWhenResizingViewport(ui);
-  yield testChangingDevicePixelRatio(ui);
+  await testDefaults(ui);
+  await testChangingDevice(ui);
+  await testResetWhenResizingViewport(ui);
+  await testChangingDevicePixelRatio(ui);
 });
 
-function* waitStartup(ui) {
+async function waitStartup(ui) {
   let { store } = ui.toolWindow;
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 }
 
-function* testDefaults(ui) {
+async function testDefaults(ui) {
   info("Test Defaults");
 
-  yield testDevicePixelRatio(ui, window.devicePixelRatio);
+  await testDevicePixelRatio(ui, window.devicePixelRatio);
   testViewportDevicePixelRatioSelect(ui, {
     value: window.devicePixelRatio,
     disabled: false,
   });
   testViewportDeviceSelectLabel(ui, "no device selected");
 }
 
-function* testChangingDevice(ui) {
+async function testChangingDevice(ui) {
   info("Test Changing Device");
 
   let waitPixelRatioChange = onceDevicePixelRatioChange(ui);
 
-  yield selectDevice(ui, testDevice.name);
-  yield waitForViewportResizeTo(ui, testDevice.width, testDevice.height);
-  yield waitPixelRatioChange;
-  yield testDevicePixelRatio(ui, testDevice.pixelRatio);
+  await selectDevice(ui, testDevice.name);
+  await waitForViewportResizeTo(ui, testDevice.width, testDevice.height);
+  await waitPixelRatioChange;
+  await testDevicePixelRatio(ui, testDevice.pixelRatio);
   testViewportDevicePixelRatioSelect(ui, {
     value: testDevice.pixelRatio,
     disabled: true,
   });
   testViewportDeviceSelectLabel(ui, testDevice.name);
 }
 
-function* testResetWhenResizingViewport(ui) {
+async function testResetWhenResizingViewport(ui) {
   info("Test reset when resizing the viewport");
 
   let waitPixelRatioChange = onceDevicePixelRatioChange(ui);
 
   let deviceRemoved = once(ui, "device-association-removed");
-  yield testViewportResize(ui, ".viewport-vertical-resize-handle",
+  await testViewportResize(ui, ".viewport-vertical-resize-handle",
     [-10, -10], [testDevice.width, testDevice.height - 10], [0, -10], ui);
-  yield deviceRemoved;
+  await deviceRemoved;
 
-  yield waitPixelRatioChange;
-  yield testDevicePixelRatio(ui, window.devicePixelRatio);
+  await waitPixelRatioChange;
+  await testDevicePixelRatio(ui, window.devicePixelRatio);
 
   testViewportDevicePixelRatioSelect(ui, {
     value: window.devicePixelRatio,
     disabled: false,
   });
   testViewportDeviceSelectLabel(ui, "no device selected");
 }
 
-function* testChangingDevicePixelRatio(ui) {
+async function testChangingDevicePixelRatio(ui) {
   info("Test changing device pixel ratio");
 
   let waitPixelRatioChange = onceDevicePixelRatioChange(ui);
 
-  yield selectDevicePixelRatio(ui, VIEWPORT_DPPX);
-  yield waitPixelRatioChange;
-  yield testDevicePixelRatio(ui, VIEWPORT_DPPX);
+  await selectDevicePixelRatio(ui, VIEWPORT_DPPX);
+  await waitPixelRatioChange;
+  await testDevicePixelRatio(ui, VIEWPORT_DPPX);
   testViewportDevicePixelRatioSelect(ui, {
     value: VIEWPORT_DPPX,
     disabled: false,
   });
   testViewportDeviceSelectLabel(ui, "no device selected");
 }
 
 function testViewportDevicePixelRatioSelect(ui, expected) {
@@ -109,31 +109,31 @@ function testViewportDevicePixelRatioSel
   let select =
     ui.toolWindow.document.querySelector("#global-device-pixel-ratio-selector");
   is(select.value, expected.value,
      `DevicePixelRatio Select value should be: ${expected.value}`);
   is(select.disabled, expected.disabled,
     `DevicePixelRatio Select should be ${expected.disabled ? "disabled" : "enabled"}.`);
 }
 
-function* testDevicePixelRatio(ui, expected) {
+async function testDevicePixelRatio(ui, expected) {
   info("Test device pixel ratio");
 
-  let dppx = yield getViewportDevicePixelRatio(ui);
+  let dppx = await getViewportDevicePixelRatio(ui);
   is(dppx, expected, `devicePixelRatio should be: ${expected}`);
 }
 
-function* getViewportDevicePixelRatio(ui) {
-  return yield ContentTask.spawn(ui.getViewportBrowser(), {}, function* () {
+async function getViewportDevicePixelRatio(ui) {
+  return await ContentTask.spawn(ui.getViewportBrowser(), {}, async function () {
     return content.devicePixelRatio;
   });
 }
 
 function onceDevicePixelRatioChange(ui) {
-  return ContentTask.spawn(ui.getViewportBrowser(), {}, function* () {
+  return ContentTask.spawn(ui.getViewportBrowser(), {}, async function () {
     info(`Listening for a pixel ratio change (current: ${content.devicePixelRatio}dppx)`);
 
     let pixelRatio = content.devicePixelRatio;
     let mql = content.matchMedia(`(resolution: ${pixelRatio}dppx)`);
 
     return new Promise(resolve => {
       const onWindowCreated = () => {
         if (pixelRatio !== content.devicePixelRatio) {
--- a/devtools/client/responsive.html/test/browser/browser_device_width.js
+++ b/devtools/client/responsive.html/test/browser/browser_device_width.js
@@ -1,104 +1,104 @@
 /* Any copyright is dedicated to the Public Domain.
 http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const TEST_URL = "data:text/html;charset=utf-8,";
 
-addRDMTask(TEST_URL, function* ({ ui, manager }) {
+addRDMTask(TEST_URL, async function ({ ui, manager }) {
   ok(ui, "An instance of the RDM should be attached to the tab.");
-  yield setViewportSize(ui, manager, 110, 500);
+  await setViewportSize(ui, manager, 110, 500);
 
   info("Checking initial width/height properties.");
-  yield doInitialChecks(ui);
+  await doInitialChecks(ui);
 
   info("Changing the RDM size");
-  yield setViewportSize(ui, manager, 90, 500);
+  await setViewportSize(ui, manager, 90, 500);
 
   info("Checking for screen props");
-  yield checkScreenProps(ui);
+  await checkScreenProps(ui);
 
   info("Changing the RDM size using input keys");
-  yield setViewportSizeWithInputKeys(ui);
+  await setViewportSizeWithInputKeys(ui);
 
   info("Setting docShell.deviceSizeIsPageSize to false");
-  yield ContentTask.spawn(ui.getViewportBrowser(), {}, function* () {
+  await ContentTask.spawn(ui.getViewportBrowser(), {}, async function () {
     let docShell = content.QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIWebNavigation)
                           .QueryInterface(Ci.nsIDocShell);
     docShell.deviceSizeIsPageSize = false;
   });
 
   info("Checking for screen props once again.");
-  yield checkScreenProps2(ui);
+  await checkScreenProps2(ui);
 });
 
-function* setViewportSizeWithInputKeys(ui) {
+async function setViewportSizeWithInputKeys(ui) {
   let width = 320, height = 500;
   let resized = waitForViewportResizeTo(ui, width, height);
   ui.setViewportSize({ width, height });
-  yield resized;
+  await resized;
 
   let dimensions = ui.toolWindow.document.querySelectorAll(".viewport-dimension-input");
 
   // Increase width value to 420 by using the Up arrow key
   resized = waitForViewportResizeTo(ui, 420, height);
   dimensions[0].focus();
   for (let i = 1; i <= 100; i++) {
     EventUtils.synthesizeKey("KEY_ArrowUp", { code: "ArrowUp" });
   }
-  yield resized;
+  await resized;
 
   // Resetting width value back to 320 using `Shift + Down` arrow
   resized = waitForViewportResizeTo(ui, width, height);
   dimensions[0].focus();
   for (let i = 1; i <= 10; i++) {
     EventUtils.synthesizeKey("KEY_ArrowDown", { shiftKey: true, code: "ArrowDown" });
   }
-  yield resized;
+  await resized;
 
   // Increase height value to 600 by using `PageUp + Shift` key
   resized = waitForViewportResizeTo(ui, width, 600);
   dimensions[1].focus();
   EventUtils.synthesizeKey("VK_PAGE_UP", { shiftKey: true });
-  yield resized;
+  await resized;
 
   // Resetting height value back to 500 by using `PageDown + Shift` key
   resized = waitForViewportResizeTo(ui, width, height);
   dimensions[1].focus();
   EventUtils.synthesizeKey("VK_PAGE_DOWN", { shiftKey: true });
-  yield resized;
+  await resized;
 }
 
-function* doInitialChecks(ui) {
-  let { innerWidth, matchesMedia } = yield grabContentInfo(ui);
+async function doInitialChecks(ui) {
+  let { innerWidth, matchesMedia } = await grabContentInfo(ui);
   is(innerWidth, 110, "initial width should be 110px");
   ok(!matchesMedia, "media query shouldn't match.");
 }
 
-function* checkScreenProps(ui) {
-  let { matchesMedia, screen } = yield grabContentInfo(ui);
+async function checkScreenProps(ui) {
+  let { matchesMedia, screen } = await grabContentInfo(ui);
   ok(matchesMedia, "media query should match");
   isnot(window.screen.width, screen.width,
         "screen.width should not be the size of the screen.");
   is(screen.width, 90, "screen.width should be the page width");
   is(screen.height, 500, "screen.height should be the page height");
 }
 
-function* checkScreenProps2(ui) {
-  let { matchesMedia, screen } = yield grabContentInfo(ui);
+async function checkScreenProps2(ui) {
+  let { matchesMedia, screen } = await grabContentInfo(ui);
   ok(!matchesMedia, "media query should be re-evaluated.");
   is(window.screen.width, screen.width,
      "screen.width should be the size of the screen.");
 }
 
 function grabContentInfo(ui) {
-  return ContentTask.spawn(ui.getViewportBrowser(), {}, function* () {
+  return ContentTask.spawn(ui.getViewportBrowser(), {}, async function () {
     return {
       screen: {
         width: content.screen.width,
         height: content.screen.height
       },
       innerWidth: content.innerWidth,
       matchesMedia: content.matchMedia("(max-device-width:100px)").matches
     };
--- a/devtools/client/responsive.html/test/browser/browser_exit_button.js
+++ b/devtools/client/responsive.html/test/browser/browser_exit_button.js
@@ -1,71 +1,71 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const TEST_URL = "data:text/html;charset=utf-8,";
 
 // Test global exit button
-addRDMTask(TEST_URL, function* (...args) {
-  yield testExitButton(...args);
+addRDMTask(TEST_URL, async function (...args) {
+  await testExitButton(...args);
 });
 
 // Test global exit button on detached tab.
 // See Bug 1262806
-add_task(function* () {
-  let tab = yield addTab(TEST_URL);
-  let { ui, manager } = yield openRDM(tab);
+add_task(async function () {
+  let tab = await addTab(TEST_URL);
+  let { ui, manager } = await openRDM(tab);
 
-  yield waitBootstrap(ui);
+  await waitBootstrap(ui);
 
   let waitTabIsDetached = Promise.all([
     once(tab, "TabClose"),
     once(tab.linkedBrowser, "SwapDocShells")
   ]);
 
   // Detach the tab with RDM open.
   let newWindow = gBrowser.replaceTabWithWindow(tab);
 
   // Wait until the tab is detached and the new window is fully initialized.
-  yield waitTabIsDetached;
-  yield newWindow.delayedStartupPromise;
+  await waitTabIsDetached;
+  await newWindow.delayedStartupPromise;
 
   // Get the new tab instance.
   tab = newWindow.gBrowser.tabs[0];
 
   // Detaching a tab closes RDM.
   ok(!manager.isActiveForTab(tab),
     "Responsive Design Mode is not active for the tab");
 
   // Reopen the RDM and test the exit button again.
-  yield testExitButton(yield openRDM(tab));
-  yield BrowserTestUtils.closeWindow(newWindow);
+  await testExitButton(await openRDM(tab));
+  await BrowserTestUtils.closeWindow(newWindow);
 });
 
-function* waitBootstrap(ui) {
+async function waitBootstrap(ui) {
   let { toolWindow, tab } = ui;
   let { store } = toolWindow;
   let url = String(tab.linkedBrowser.currentURI.spec);
 
   // Wait until the viewport has been added.
-  yield waitUntilState(store, state => state.viewports.length == 1);
+  await waitUntilState(store, state => state.viewports.length == 1);
 
   // Wait until the document has been loaded.
-  yield waitForFrameLoad(ui, url);
+  await waitForFrameLoad(ui, url);
 }
 
-function* testExitButton({ui, manager}) {
-  yield waitBootstrap(ui);
+async function testExitButton({ui, manager}) {
+  await waitBootstrap(ui);
 
   let exitButton = ui.toolWindow.document.getElementById("global-exit-button");
 
   ok(manager.isActiveForTab(ui.tab),
     "Responsive Design Mode active for the tab");
 
   exitButton.click();
 
-  yield once(manager, "off");
+  await once(manager, "off");
 
   ok(!manager.isActiveForTab(ui.tab),
     "Responsive Design Mode is not active for the tab");
 }
--- a/devtools/client/responsive.html/test/browser/browser_frame_script_active.js
+++ b/devtools/client/responsive.html/test/browser/browser_frame_script_active.js
@@ -3,44 +3,44 @@
 
 "use strict";
 
 // Verify frame script is active when expected.
 
 const e10s = require("devtools/client/responsive.html/utils/e10s");
 
 const TEST_URL = "http://example.com/";
-add_task(function* () {
-  let tab = yield addTab(TEST_URL);
+add_task(async function () {
+  let tab = await addTab(TEST_URL);
 
-  let { ui } = yield openRDM(tab);
+  let { ui } = await openRDM(tab);
 
   let mm = ui.getViewportBrowser().messageManager;
-  let { active } = yield e10s.request(mm, "IsActive");
+  let { active } = await e10s.request(mm, "IsActive");
   is(active, true, "Frame script is active");
 
-  yield closeRDM(tab);
+  await closeRDM(tab);
 
   // Must re-get the messageManager on each run since it changes when RDM opens
   // or closes due to the design of swapFrameLoaders.  Also, we only have access
   // to a valid `ui` instance while RDM is open.
   mm = tab.linkedBrowser.messageManager;
-  ({ active } = yield e10s.request(mm, "IsActive"));
+  ({ active } = await e10s.request(mm, "IsActive"));
   is(active, false, "Frame script is active");
 
   // Try another round as well to be sure there is no state saved anywhere
-  ({ ui } = yield openRDM(tab));
+  ({ ui } = await openRDM(tab));
 
   mm = ui.getViewportBrowser().messageManager;
-  ({ active } = yield e10s.request(mm, "IsActive"));
+  ({ active } = await e10s.request(mm, "IsActive"));
   is(active, true, "Frame script is active");
 
-  yield closeRDM(tab);
+  await closeRDM(tab);
 
   // Must re-get the messageManager on each run since it changes when RDM opens
   // or closes due to the design of swapFrameLoaders.  Also, we only have access
   // to a valid `ui` instance while RDM is open.
   mm = tab.linkedBrowser.messageManager;
-  ({ active } = yield e10s.request(mm, "IsActive"));
+  ({ active } = await e10s.request(mm, "IsActive"));
   is(active, false, "Frame script is active");
 
-  yield removeTab(tab);
+  await removeTab(tab);
 });
--- a/devtools/client/responsive.html/test/browser/browser_hide_container.js
+++ b/devtools/client/responsive.html/test/browser/browser_hide_container.js
@@ -25,40 +25,40 @@ function flushContainerTabState(tab) {
   // During this test, we actually expect this to hang because the container tab
   // doesn't have the right epoch value to reply to the flush correctly.
   return new Promise(resolve => {
     TabStateFlusher.flush(outerBrowser).then(resolve);
     waitForTime(10000).then(resolve);
   });
 }
 
-add_task(function* () {
+add_task(async function () {
   // Load test URL
-  let tab = yield addTab(TEST_URL);
+  let tab = await addTab(TEST_URL);
   let browser = tab.linkedBrowser;
 
   // Check session history state
-  let history = yield getSessionHistory(browser);
+  let history = await getSessionHistory(browser);
   is(history.index - 1, 0, "At page 0 in history");
   is(history.entries.length, 1, "1 page in history");
   is(history.entries[0].url, TEST_URL, "Page 0 URL matches");
 
   // Open RDM
-  yield openRDM(tab);
+  await openRDM(tab);
 
   // Checking session history directly in content does show the container URL
   // that we're trying to hide...
-  history = yield getSessionHistory(browser);
+  history = await getSessionHistory(browser);
   is(history.index - 1, 0, "At page 0 in history");
   is(history.entries.length, 1, "1 page in history");
   is(history.entries[0].url, CONTAINER_URL, "Page 0 URL matches");
 
   // However, checking the recorded tab state for the outer browser shows the
   // container URL has been ignored correctly.
-  yield flushContainerTabState(tab);
+  await flushContainerTabState(tab);
   let tabState = JSON.parse(SessionStore.getTabState(tab));
   is(tabState.index - 1, 0, "At page 0 in history");
   is(tabState.entries.length, 1, "1 page in history");
   is(tabState.entries[0].url, TEST_URL, "Page 0 URL matches");
 
-  yield closeRDM(tab);
-  yield removeTab(tab);
+  await closeRDM(tab);
+  await removeTab(tab);
 });
--- a/devtools/client/responsive.html/test/browser/browser_menu_item_01.js
+++ b/devtools/client/responsive.html/test/browser/browser_menu_item_01.js
@@ -21,42 +21,42 @@ const activateTab = (tab) => new Promise
   gBrowser.selectedTab = tab;
 });
 
 const isMenuChecked = () => {
   let menu = document.getElementById("menu_responsiveUI");
   return menu.getAttribute("checked") === "true";
 };
 
-add_task(function* () {
-  yield startup(window);
+add_task(async function () {
+  await startup(window);
 
   ok(!isMenuChecked(),
     "RDM menu item is unchecked by default");
 
-  const tab = yield addTab(TEST_URL);
+  const tab = await addTab(TEST_URL);
 
   ok(!isMenuChecked(),
     "RDM menu item is unchecked for new tab");
 
-  yield openRDM(tab);
+  await openRDM(tab);
 
   ok(isMenuChecked(),
     "RDM menu item is checked with RDM open");
 
-  const tab2 = yield addTab(TEST_URL);
+  const tab2 = await addTab(TEST_URL);
 
   ok(!isMenuChecked(),
     "RDM menu item is unchecked for new tab");
 
-  yield activateTab(tab);
+  await activateTab(tab);
 
   ok(isMenuChecked(),
     "RDM menu item is checked for the tab where RDM is open");
 
-  yield closeRDM(tab);
+  await closeRDM(tab);
 
   ok(!isMenuChecked(),
     "RDM menu item is unchecked after RDM is closed");
 
-  yield removeTab(tab);
-  yield removeTab(tab2);
+  await removeTab(tab);
+  await removeTab(tab2);
 });
--- a/devtools/client/responsive.html/test/browser/browser_menu_item_02.js
+++ b/devtools/client/responsive.html/test/browser/browser_menu_item_02.js
@@ -7,41 +7,41 @@
 
 const TEST_URL = "data:text/html;charset=utf-8,";
 
 const isMenuCheckedFor = ({document}) => {
   let menu = document.getElementById("menu_responsiveUI");
   return menu.getAttribute("checked") === "true";
 };
 
-add_task(function* () {
-  const window1 = yield BrowserTestUtils.openNewBrowserWindow();
+add_task(async function () {
+  const window1 = await BrowserTestUtils.openNewBrowserWindow();
   let { gBrowser } = window1;
 
-  yield BrowserTestUtils.withNewTab({ gBrowser, url: TEST_URL },
-    function* (browser) {
+  await BrowserTestUtils.withNewTab({ gBrowser, url: TEST_URL },
+    async function (browser) {
       let tab = gBrowser.getTabForBrowser(browser);
 
       is(window1, Services.wm.getMostRecentWindow("navigator:browser"),
         "The new window is the active one");
 
       ok(!isMenuCheckedFor(window1),
         "RDM menu item is unchecked by default");
 
-      yield openRDM(tab);
+      await openRDM(tab);
 
       ok(isMenuCheckedFor(window1),
         "RDM menu item is checked with RDM open");
 
-      yield closeRDM(tab);
+      await closeRDM(tab);
 
       ok(!isMenuCheckedFor(window1),
         "RDM menu item is unchecked with RDM closed");
     });
 
-  yield BrowserTestUtils.closeWindow(window1);
+  await BrowserTestUtils.closeWindow(window1);
 
   is(window, Services.wm.getMostRecentWindow("navigator:browser"),
     "The original window is the active one");
 
   ok(!isMenuCheckedFor(window),
     "RDM menu item is unchecked");
 });
--- a/devtools/client/responsive.html/test/browser/browser_mouse_resize.js
+++ b/devtools/client/responsive.html/test/browser/browser_mouse_resize.js
@@ -1,27 +1,27 @@
 /* Any copyright is dedicated to the Public Domain.
 http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const TEST_URL = "data:text/html;charset=utf-8,";
 
-addRDMTask(TEST_URL, function* ({ ui, manager }) {
+addRDMTask(TEST_URL, async function ({ ui, manager }) {
   let store = ui.toolWindow.store;
 
   // Wait until the viewport has been added
-  yield waitUntilState(store, state => state.viewports.length == 1);
+  await waitUntilState(store, state => state.viewports.length == 1);
 
-  yield setViewportSize(ui, manager, 300, 300);
+  await setViewportSize(ui, manager, 300, 300);
 
   // Do horizontal + vertical resize
-  yield testViewportResize(ui, ".viewport-resize-handle",
+  await testViewportResize(ui, ".viewport-resize-handle",
     [10, 10], [320, 310], [10, 10]);
 
   // Do horizontal resize
-  yield testViewportResize(ui, ".viewport-horizontal-resize-handle",
+  await testViewportResize(ui, ".viewport-horizontal-resize-handle",
     [-10, 10], [300, 310], [-10, 0]);
 
   // Do vertical resize
-  yield testViewportResize(ui, ".viewport-vertical-resize-handle",
+  await testViewportResize(ui, ".viewport-vertical-resize-handle",
     [-10, -10], [300, 300], [0, -10], ui);
 });
--- a/devtools/client/responsive.html/test/browser/browser_navigation.js
+++ b/devtools/client/responsive.html/test/browser/browser_navigation.js
@@ -5,61 +5,61 @@
 
 // Test the primary browser navigation UI to verify it's connected to the viewport.
 
 const DUMMY_1_URL = "http://example.com/";
 const TEST_URL = `${URL_ROOT}doc_page_state.html`;
 const DUMMY_2_URL = "http://example.com/browser/";
 const DUMMY_3_URL = "http://example.com/browser/devtools/";
 
-add_task(function* () {
+add_task(async function () {
   // Load up a sequence of pages:
   // 0. DUMMY_1_URL
   // 1. TEST_URL
   // 2. DUMMY_2_URL
-  let tab = yield addTab(DUMMY_1_URL);
+  let tab = await addTab(DUMMY_1_URL);
   let browser = tab.linkedBrowser;
-  yield load(browser, TEST_URL);
-  yield load(browser, DUMMY_2_URL);
+  await load(browser, TEST_URL);
+  await load(browser, DUMMY_2_URL);
 
   // Check session history state
-  let history = yield getSessionHistory(browser);
+  let history = await getSessionHistory(browser);
   is(history.index - 1, 2, "At page 2 in history");
   is(history.entries.length, 3, "3 pages in history");
   is(history.entries[0].url, DUMMY_1_URL, "Page 0 URL matches");
   is(history.entries[1].url, TEST_URL, "Page 1 URL matches");
   is(history.entries[2].url, DUMMY_2_URL, "Page 2 URL matches");
 
   // Go back one so we're at the test page
-  yield back(browser);
+  await back(browser);
 
   // Check session history state
-  history = yield getSessionHistory(browser);
+  history = await getSessionHistory(browser);
   is(history.index - 1, 1, "At page 1 in history");
   is(history.entries.length, 3, "3 pages in history");
   is(history.entries[0].url, DUMMY_1_URL, "Page 0 URL matches");
   is(history.entries[1].url, TEST_URL, "Page 1 URL matches");
   is(history.entries[2].url, DUMMY_2_URL, "Page 2 URL matches");
 
-  yield openRDM(tab);
+  await openRDM(tab);
 
   ok(browser.webNavigation.canGoBack, "Going back is allowed");
   ok(browser.webNavigation.canGoForward, "Going forward is allowed");
   is(browser.documentURI.spec, TEST_URL, "documentURI matches page 1");
   is(browser.contentTitle, "Page State Test", "contentTitle matches page 1");
 
-  yield forward(browser);
+  await forward(browser);
 
   ok(browser.webNavigation.canGoBack, "Going back is allowed");
   ok(!browser.webNavigation.canGoForward, "Going forward is not allowed");
   is(browser.documentURI.spec, DUMMY_2_URL, "documentURI matches page 2");
   is(browser.contentTitle, "mochitest index /browser/", "contentTitle matches page 2");
 
-  yield back(browser);
-  yield back(browser);
+  await back(browser);
+  await back(browser);
 
   ok(!browser.webNavigation.canGoBack, "Going back is not allowed");
   ok(browser.webNavigation.canGoForward, "Going forward is allowed");
   is(browser.documentURI.spec, DUMMY_1_URL, "documentURI matches page 0");
   is(browser.contentTitle, "mochitest index /", "contentTitle matches page 0");
 
   let receivedStatusChanges = new Promise(resolve => {
     let statusChangesSeen = 0;
@@ -71,28 +71,28 @@ add_task(function* () {
           gBrowser.removeProgressListener(progressListener);
           ok(true, `${statusChangesExpected} status changes while loading`);
           resolve();
         }
       }
     };
     gBrowser.addProgressListener(progressListener);
   });
-  yield load(browser, DUMMY_3_URL);
-  yield receivedStatusChanges;
+  await load(browser, DUMMY_3_URL);
+  await receivedStatusChanges;
 
   ok(browser.webNavigation.canGoBack, "Going back is allowed");
   ok(!browser.webNavigation.canGoForward, "Going forward is not allowed");
   is(browser.documentURI.spec, DUMMY_3_URL, "documentURI matches page 3");
   is(browser.contentTitle, "mochitest index /browser/devtools/",
      "contentTitle matches page 3");
 
-  yield closeRDM(tab);
+  await closeRDM(tab);
 
   // Check session history state
-  history = yield getSessionHistory(browser);
+  history = await getSessionHistory(browser);
   is(history.index - 1, 1, "At page 1 in history");
   is(history.entries.length, 2, "2 pages in history");
   is(history.entries[0].url, DUMMY_1_URL, "Page 0 URL matches");
   is(history.entries[1].url, DUMMY_3_URL, "Page 1 URL matches");
 
-  yield removeTab(tab);
+  await removeTab(tab);
 });
--- a/devtools/client/responsive.html/test/browser/browser_network_throttling.js
+++ b/devtools/client/responsive.html/test/browser/browser_network_throttling.js
@@ -3,54 +3,54 @@ http://creativecommons.org/publicdomain/
 
 "use strict";
 
 const throttlingProfiles = require("devtools/client/shared/network-throttling-profiles");
 
 // Tests changing network throttling
 const TEST_URL = "data:text/html;charset=utf-8,Network throttling test";
 
-addRDMTask(TEST_URL, function* ({ ui, manager }) {
+addRDMTask(TEST_URL, async function ({ ui, manager }) {
   let { store } = ui.toolWindow;
 
   // Wait until the viewport has been added
-  yield waitUntilState(store, state => state.viewports.length == 1);
+  await waitUntilState(store, state => state.viewports.length == 1);
 
   // Test defaults
   testNetworkThrottlingSelectorLabel(ui, "No throttling");
-  yield testNetworkThrottlingState(ui, null);
+  await testNetworkThrottlingState(ui, null);
 
   // Test a fast profile
-  yield testThrottlingProfile(ui, "Wi-Fi");
+  await testThrottlingProfile(ui, "Wi-Fi");
 
   // Test a slower profile
-  yield testThrottlingProfile(ui, "Regular 3G");
+  await testThrottlingProfile(ui, "Regular 3G");
 
   // Test switching back to no throttling
-  yield selectNetworkThrottling(ui, "No throttling");
+  await selectNetworkThrottling(ui, "No throttling");
   testNetworkThrottlingSelectorLabel(ui, "No throttling");
-  yield testNetworkThrottlingState(ui, null);
+  await testNetworkThrottlingState(ui, null);
 });
 
 function testNetworkThrottlingSelectorLabel(ui, expected) {
   let selector = "#global-network-throttling-selector";
   let select = ui.toolWindow.document.querySelector(selector);
   is(select.selectedOptions[0].textContent, expected,
     `Select label should be changed to ${expected}`);
 }
 
-var testNetworkThrottlingState = Task.async(function* (ui, expected) {
-  let state = yield ui.emulationFront.getNetworkThrottling();
+var testNetworkThrottlingState = async function (ui, expected) {
+  let state = await ui.emulationFront.getNetworkThrottling();
   Assert.deepEqual(state, expected, "Network throttling state should be " +
                                     JSON.stringify(expected, null, 2));
-});
+};
 
-var testThrottlingProfile = Task.async(function* (ui, profile) {
-  yield selectNetworkThrottling(ui, profile);
+var testThrottlingProfile = async function (ui, profile) {
+  await selectNetworkThrottling(ui, profile);
   testNetworkThrottlingSelectorLabel(ui, profile);
   let data = throttlingProfiles.find(({ id }) => id == profile);
   let { download, upload, latency } = data;
-  yield testNetworkThrottlingState(ui, {
+  await testNetworkThrottlingState(ui, {
     downloadThroughput: download,
     uploadThroughput: upload,
     latency,
   });
-});
+};
--- a/devtools/client/responsive.html/test/browser/browser_page_state.js
+++ b/devtools/client/responsive.html/test/browser/browser_page_state.js
@@ -5,72 +5,72 @@
 
 // Test page state to ensure page is not reloaded and session history is not
 // modified.
 
 const DUMMY_1_URL = "http://example.com/";
 const TEST_URL = `${URL_ROOT}doc_page_state.html`;
 const DUMMY_2_URL = "http://example.com/browser/";
 
-add_task(function* () {
+add_task(async function () {
   // Load up a sequence of pages:
   // 0. DUMMY_1_URL
   // 1. TEST_URL
   // 2. DUMMY_2_URL
-  let tab = yield addTab(DUMMY_1_URL);
+  let tab = await addTab(DUMMY_1_URL);
   let browser = tab.linkedBrowser;
-  yield load(browser, TEST_URL);
-  yield load(browser, DUMMY_2_URL);
+  await load(browser, TEST_URL);
+  await load(browser, DUMMY_2_URL);
 
   // Check session history state
-  let history = yield getSessionHistory(browser);
+  let history = await getSessionHistory(browser);
   is(history.index - 1, 2, "At page 2 in history");
   is(history.entries.length, 3, "3 pages in history");
   is(history.entries[0].url, DUMMY_1_URL, "Page 0 URL matches");
   is(history.entries[1].url, TEST_URL, "Page 1 URL matches");
   is(history.entries[2].url, DUMMY_2_URL, "Page 2 URL matches");
 
   // Go back one so we're at the test page
-  yield back(browser);
+  await back(browser);
 
   // Check session history state
-  history = yield getSessionHistory(browser);
+  history = await getSessionHistory(browser);
   is(history.index - 1, 1, "At page 1 in history");
   is(history.entries.length, 3, "3 pages in history");
   is(history.entries[0].url, DUMMY_1_URL, "Page 0 URL matches");
   is(history.entries[1].url, TEST_URL, "Page 1 URL matches");
   is(history.entries[2].url, DUMMY_2_URL, "Page 2 URL matches");
 
   // Click on content to set an altered state that would be lost on reload
-  yield BrowserTestUtils.synthesizeMouseAtCenter("body", {}, browser);
+  await BrowserTestUtils.synthesizeMouseAtCenter("body", {}, browser);
 
-  let { ui } = yield openRDM(tab);
+  let { ui } = await openRDM(tab);
 
   // Check color inside the viewport
-  let color = yield spawnViewportTask(ui, {}, function* () {
+  let color = await spawnViewportTask(ui, {}, function () {
     // eslint-disable-next-line mozilla/no-cpows-in-tests
     return content.getComputedStyle(content.document.body)
                   .getPropertyValue("background-color");
   });
   is(color, "rgb(0, 128, 0)",
      "Content is still modified from click in viewport");
 
-  yield closeRDM(tab);
+  await closeRDM(tab);
 
   // Check color back in the browser tab
-  color = yield ContentTask.spawn(browser, {}, function* () {
+  color = await ContentTask.spawn(browser, {}, async function () {
     // eslint-disable-next-line mozilla/no-cpows-in-tests
     return content.getComputedStyle(content.document.body)
                   .getPropertyValue("background-color");
   });
   is(color, "rgb(0, 128, 0)",
      "Content is still modified from click in browser tab");
 
   // Check session history state
-  history = yield getSessionHistory(browser);
+  history = await getSessionHistory(browser);
   is(history.index - 1, 1, "At page 1 in history");
   is(history.entries.length, 3, "3 pages in history");
   is(history.entries[0].url, DUMMY_1_URL, "Page 0 URL matches");
   is(history.entries[1].url, TEST_URL, "Page 1 URL matches");
   is(history.entries[2].url, DUMMY_2_URL, "Page 2 URL matches");
 
-  yield removeTab(tab);
+  await removeTab(tab);
 });
--- a/devtools/client/responsive.html/test/browser/browser_permission_doorhanger.js
+++ b/devtools/client/responsive.html/test/browser/browser_permission_doorhanger.js
@@ -15,39 +15,39 @@ function waitForGeolocationPrompt(win, b
       if (notification) {
         win.PopupNotifications.panel.removeEventListener("popupshown", popupShown);
         resolve();
       }
     });
   });
 }
 
-add_task(function* () {
-  let tab = yield addTab(DUMMY_URL);
+add_task(async function () {
+  let tab = await addTab(DUMMY_URL);
   let browser = tab.linkedBrowser;
   let win = browser.ownerGlobal;
 
   let waitPromptPromise = waitForGeolocationPrompt(win, browser);
 
   // Checks if a geolocation permission doorhanger appears when openning a page
   // requesting geolocation
-  yield load(browser, TEST_SURL);
-  yield waitPromptPromise;
+  await load(browser, TEST_SURL);
+  await waitPromptPromise;
 
   ok(true, "Permission doorhanger appeared without RDM enabled");
 
   // Lets switch back to the dummy website and enable RDM
-  yield load(browser, DUMMY_URL);
-  let { ui } = yield openRDM(tab);
+  await load(browser, DUMMY_URL);
+  let { ui } = await openRDM(tab);
   let newBrowser = ui.getViewportBrowser();
 
   waitPromptPromise = waitForGeolocationPrompt(win, newBrowser);
 
   // Checks if the doorhanger appeared again when reloading the geolocation
   // page inside RDM
-  yield load(browser, TEST_SURL);
-  yield waitPromptPromise;
+  await load(browser, TEST_SURL);
+  await waitPromptPromise;
 
   ok(true, "Permission doorhanger appeared inside RDM");
 
-  yield closeRDM(tab);
-  yield removeTab(tab);
+  await closeRDM(tab);
+  await removeTab(tab);
 });
--- a/devtools/client/responsive.html/test/browser/browser_resize_cmd.js
+++ b/devtools/client/responsive.html/test/browser/browser_resize_cmd.js
@@ -1,110 +1,110 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 /* global ResponsiveUIManager */
 /* eslint key-spacing: 0 */
 
-add_task(function* () {
+add_task(async function () {
   let manager = ResponsiveUIManager;
   let done;
 
   function isOpen() {
     return ResponsiveUIManager.isActiveForTab(gBrowser.selectedTab);
   }
 
   const TEST_URL = "data:text/html;charset=utf-8,hi";
-  yield helpers.addTabWithToolbar(TEST_URL, (options) => {
+  await helpers.addTabWithToolbar(TEST_URL, (options) => {
     return helpers.audit(options, [
       {
         setup() {
           done = once(manager, "on");
           return helpers.setInput(options, "resize toggle");
         },
         check: {
           input:  "resize toggle",
           hints:               "",
           markup: "VVVVVVVVVVVVV",
           status: "VALID"
         },
         exec: {
           output: ""
         },
-        post: Task.async(function* () {
-          yield done;
+        async post() {
+          await done;
           ok(isOpen(), "responsive mode is open");
-        }),
+        },
       },
       {
         setup() {
           done = once(manager, "off");
           return helpers.setInput(options, "resize toggle");
         },
         check: {
           input:  "resize toggle",
           hints:               "",
           markup: "VVVVVVVVVVVVV",
           status: "VALID"
         },
         exec: {
           output: ""
         },
-        post: Task.async(function* () {
-          yield done;
+        async post() {
+          await done;
           ok(!isOpen(), "responsive mode is closed");
-        }),
+        },
       },
     ]);
   });
-  yield helpers.addTabWithToolbar(TEST_URL, (options) => {
+  await helpers.addTabWithToolbar(TEST_URL, (options) => {
     return helpers.audit(options, [
       {
         setup() {
           done = once(manager, "on");
           return helpers.setInput(options, "resize on");
         },
         check: {
           input:  "resize on",
           hints:           "",
           markup: "VVVVVVVVV",
           status: "VALID"
         },
         exec: {
           output: ""
         },
-        post: Task.async(function* () {
-          yield done;
+        async post() {
+          await done;
           ok(isOpen(), "responsive mode is open");
-        }),
+        },
       },
       {
         setup() {
           done = once(manager, "off");
           return helpers.setInput(options, "resize off");
         },
         check: {
           input:  "resize off",
           hints:            "",
           markup: "VVVVVVVVVV",
           status: "VALID"
         },
         exec: {
           output: ""
         },
-        post: Task.async(function* () {
-          yield done;
+        async post() {
+          await done;
           ok(!isOpen(), "responsive mode is closed");
-        }),
+        },
       },
     ]);
   });
-  yield helpers.addTabWithToolbar(TEST_URL, (options) => {
+  await helpers.addTabWithToolbar(TEST_URL, (options) => {
     return helpers.audit(options, [
       {
         setup() {
           done = once(manager, "on");
           return helpers.setInput(options, "resize to 400 400");
         },
         check: {
           input:  "resize to 400 400",
@@ -114,35 +114,35 @@ add_task(function* () {
           args: {
             width: { value: 400 },
             height: { value: 400 },
           }
         },
         exec: {
           output: ""
         },
-        post: Task.async(function* () {
-          yield done;
+        async post() {
+          await done;
           ok(isOpen(), "responsive mode is open");
-        }),
+        },
       },
       {
         setup() {
           done = once(manager, "off");
           return helpers.setInput(options, "resize off");
         },
         check: {
           input:  "resize off",
           hints:            "",
           markup: "VVVVVVVVVV",
           status: "VALID"
         },
         exec: {
           output: ""
         },
-        post: Task.async(function* () {
-          yield done;
+        async post() {
+          await done;
           ok(!isOpen(), "responsive mode is closed");
-        }),
+        },
       },
     ]);
   });
 });
--- a/devtools/client/responsive.html/test/browser/browser_screenshot_button.js
+++ b/devtools/client/responsive.html/test/browser/browser_screenshot_button.js
@@ -4,56 +4,56 @@
 "use strict";
 
 // Test global exit button
 
 const TEST_URL = "data:text/html;charset=utf-8,";
 
 const { OS } = require("resource://gre/modules/osfile.jsm");
 
-function* waitUntilScreenshot() {
-  return new Promise(Task.async(function* (resolve) {
+function waitUntilScreenshot() {
+  return new Promise(async function (resolve) {
     let { Downloads } = require("resource://gre/modules/Downloads.jsm");
-    let list = yield Downloads.getList(Downloads.ALL);
+    let list = await Downloads.getList(Downloads.ALL);
 
     let view = {
       onDownloadAdded: download => {
         download.whenSucceeded().then(() => {
           resolve(download.target.path);
           list.removeView(view);
         });
       }
     };
 
-    yield list.addView(view);
-  }));
+    await list.addView(view);
+  });
 }
 
-addRDMTask(TEST_URL, function* ({ ui: {toolWindow} }) {
+addRDMTask(TEST_URL, async function ({ ui: {toolWindow} }) {
   let { store, document } = toolWindow;
 
   // Wait until the viewport has been added
-  yield waitUntilState(store, state => state.viewports.length == 1);
+  await waitUntilState(store, state => state.viewports.length == 1);
 
   info("Click the screenshot button");
   let screenshotButton = document.getElementById("global-screenshot-button");
   screenshotButton.click();
 
   let whenScreenshotSucceeded = waitUntilScreenshot();
 
-  let filePath = yield whenScreenshotSucceeded;
+  let filePath = await whenScreenshotSucceeded;
   let image = new Image();
   image.src = OS.Path.toFileURI(filePath);
 
-  yield once(image, "load");
+  await once(image, "load");
 
   // We have only one viewport at the moment
   let viewport = store.getState().viewports[0];
   let ratio = window.devicePixelRatio;
 
   is(image.width, viewport.width * ratio,
     "screenshot width has the expected width");
 
   is(image.height, viewport.height * ratio,
     "screenshot width has the expected height");
 
-  yield OS.File.remove(filePath);
+  await OS.File.remove(filePath);
 });
--- a/devtools/client/responsive.html/test/browser/browser_tab_close.js
+++ b/devtools/client/responsive.html/test/browser/browser_tab_close.js
@@ -2,42 +2,42 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Verify RDM closes synchronously when tabs are closed.
 
 const TEST_URL = "http://example.com/";
 
-add_task(function* () {
-  let tab = yield addTab(TEST_URL);
+add_task(async function () {
+  let tab = await addTab(TEST_URL);
 
-  let { ui } = yield openRDM(tab);
+  let { ui } = await openRDM(tab);
   let clientClosed = waitForClientClose(ui);
 
   closeRDM(tab, {
     reason: "TabClose",
   });
 
   // This flag is set at the end of `ResponsiveUI.destroy`.  If it is true
   // without yielding on `closeRDM` above, then we must have closed
   // synchronously.
   is(ui.destroyed, true, "RDM closed synchronously");
 
-  yield clientClosed;
-  yield removeTab(tab);
+  await clientClosed;
+  await removeTab(tab);
 });
 
-add_task(function* () {
-  let tab = yield addTab(TEST_URL);
+add_task(async function () {
+  let tab = await addTab(TEST_URL);
 
-  let { ui } = yield openRDM(tab);
+  let { ui } = await openRDM(tab);
   let clientClosed = waitForClientClose(ui);
 
-  yield removeTab(tab);
+  await removeTab(tab);
 
   // This flag is set at the end of `ResponsiveUI.destroy`.  If it is true without
   // yielding on `closeRDM` itself and only removing the tab, then we must have closed
   // synchronously in response to tab closing.
   is(ui.destroyed, true, "RDM closed synchronously");
 
-  yield clientClosed;
+  await clientClosed;
 });
--- a/devtools/client/responsive.html/test/browser/browser_tab_remoteness_change.js
+++ b/devtools/client/responsive.html/test/browser/browser_tab_remoteness_change.js
@@ -2,44 +2,44 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Verify RDM closes synchronously when tabs change remoteness.
 
 const TEST_URL = "http://example.com/";
 
-add_task(function* () {
-  let tab = yield addTab(TEST_URL);
+add_task(async function () {
+  let tab = await addTab(TEST_URL);
 
-  let { ui } = yield openRDM(tab);
+  let { ui } = await openRDM(tab);
   let clientClosed = waitForClientClose(ui);
 
   closeRDM(tab, {
     reason: "BeforeTabRemotenessChange",
   });
 
   // This flag is set at the end of `ResponsiveUI.destroy`.  If it is true
   // without yielding on `closeRDM` above, then we must have closed
   // synchronously.
   is(ui.destroyed, true, "RDM closed synchronously");
 
-  yield clientClosed;
-  yield removeTab(tab);
+  await clientClosed;
+  await removeTab(tab);
 });
 
-add_task(function* () {
-  let tab = yield addTab(TEST_URL);
+add_task(async function () {
+  let tab = await addTab(TEST_URL);
 
-  let { ui } = yield openRDM(tab);
+  let { ui } = await openRDM(tab);
   let clientClosed = waitForClientClose(ui);
 
   // Load URL that requires the main process, forcing a remoteness flip
-  yield load(tab.linkedBrowser, "about:robots");
+  await load(tab.linkedBrowser, "about:robots");
 
   // This flag is set at the end of `ResponsiveUI.destroy`.  If it is true without
   // yielding on `closeRDM` itself and only removing the tab, then we must have closed
   // synchronously in response to tab closing.
   is(ui.destroyed, true, "RDM closed synchronously");
 
-  yield clientClosed;
-  yield removeTab(tab);
+  await clientClosed;
+  await removeTab(tab);
 });
--- a/devtools/client/responsive.html/test/browser/browser_target_blank.js
+++ b/devtools/client/responsive.html/test/browser/browser_target_blank.js
@@ -5,24 +5,24 @@
 
 // Ensure target="_blank" link opens a new tab
 
 const TAB_URL = "http://example.com/";
 const TEST_URL =
   `data:text/html,<a href="${TAB_URL}" target="_blank">Click me</a>`
   .replace(/ /g, "%20");
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let store = ui.toolWindow.store;
 
   // Wait until the viewport has been added
-  yield waitUntilState(store, state => state.viewports.length == 1);
+  await waitUntilState(store, state => state.viewports.length == 1);
 
   // Click the target="_blank" link and wait for a new tab
-  yield waitForFrameLoad(ui, TEST_URL);
+  await waitForFrameLoad(ui, TEST_URL);
   let newTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, TAB_URL);
-  spawnViewportTask(ui, {}, function* () {
+  spawnViewportTask(ui, {}, function () {
     content.document.querySelector("a").click(); // eslint-disable-line
   });
-  let newTab = yield newTabPromise;
+  let newTab = await newTabPromise;
   ok(newTab, "New tab opened from link");
-  yield removeTab(newTab);
+  await removeTab(newTab);
 });
--- a/devtools/client/responsive.html/test/browser/browser_toolbox_computed_view.js
+++ b/devtools/client/responsive.html/test/browser/browser_toolbox_computed_view.js
@@ -13,47 +13,47 @@ const TEST_URI = "data:text/html;charset
                  "} " +
                  "@media screen and (max-width: 200px) {" +
                  "  div { " +
                  "    width: 100px;" +
                  "  }" +
                  "};" +
                  "</style><div></div></html>";
 
-addRDMTask(TEST_URI, function* ({ ui, manager }) {
+addRDMTask(TEST_URI, async function ({ ui, manager }) {
   info("Open the responsive design mode and set its size to 500x500 to start");
-  yield setViewportSize(ui, manager, 500, 500);
+  await setViewportSize(ui, manager, 500, 500);
 
   info("Open the inspector, computed-view and select the test node");
-  let { inspector, view } = yield openComputedView();
-  yield selectNode("div", inspector);
+  let { inspector, view } = await openComputedView();
+  await selectNode("div", inspector);
 
   info("Try shrinking the viewport and checking the applied styles");
-  yield testShrink(view, inspector, ui, manager);
+  await testShrink(view, inspector, ui, manager);
 
   info("Try growing the viewport and checking the applied styles");
-  yield testGrow(view, inspector, ui, manager);
+  await testGrow(view, inspector, ui, manager);
 
-  yield closeToolbox();
+  await closeToolbox();
 });
 
-function* testShrink(computedView, inspector, ui, manager) {
+async function testShrink(computedView, inspector, ui, manager) {
   is(computedWidth(computedView), "500px", "Should show 500px initially.");
 
   let onRefresh = inspector.once("computed-view-refreshed");
-  yield setViewportSize(ui, manager, 100, 100);
-  yield onRefresh;
+  await setViewportSize(ui, manager, 100, 100);
+  await onRefresh;
 
   is(computedWidth(computedView), "100px", "Should be 100px after shrinking.");
 }
 
-function* testGrow(computedView, inspector, ui, manager) {
+async function testGrow(computedView, inspector, ui, manager) {
   let onRefresh = inspector.once("computed-view-refreshed");
-  yield setViewportSize(ui, manager, 500, 500);
-  yield onRefresh;
+  await setViewportSize(ui, manager, 500, 500);
+  await onRefresh;
 
   is(computedWidth(computedView), "500px", "Should be 500px after growing.");
 }
 
 function computedWidth(computedView) {
   for (let prop of computedView.propertyViews) {
     if (prop.name === "width") {
       return prop.valueNode.textContent;
--- a/devtools/client/responsive.html/test/browser/browser_toolbox_rule_view.js
+++ b/devtools/client/responsive.html/test/browser/browser_toolbox_rule_view.js
@@ -13,62 +13,62 @@ const TEST_URI = "data:text/html;charset
                  "} " +
                  "@media screen and (max-width: 200px) {" +
                  "  div { " +
                  "    width: 100px;" +
                  "  }" +
                  "};" +
                  "</style><div></div></html>";
 
-addRDMTask(TEST_URI, function* ({ ui, manager }) {
+addRDMTask(TEST_URI, async function ({ ui, manager }) {
   info("Open the responsive design mode and set its size to 500x500 to start");
-  yield setViewportSize(ui, manager, 500, 500);
+  await setViewportSize(ui, manager, 500, 500);
 
   info("Open the inspector, rule-view and select the test node");
-  let { inspector, view } = yield openRuleView();
-  yield selectNode("div", inspector);
+  let { inspector, view } = await openRuleView();
+  await selectNode("div", inspector);
 
   info("Try shrinking the viewport and checking the applied styles");
-  yield testShrink(view, ui, manager);
+  await testShrink(view, ui, manager);
 
   info("Try growing the viewport and checking the applied styles");
-  yield testGrow(view, ui, manager);
+  await testGrow(view, ui, manager);
 
   info("Check that ESC still opens the split console");
-  yield testEscapeOpensSplitConsole(inspector);
+  await testEscapeOpensSplitConsole(inspector);
 
-  yield closeToolbox();
+  await closeToolbox();
 });
 
-function* testShrink(ruleView, ui, manager) {
+async function testShrink(ruleView, ui, manager) {
   is(numberOfRules(ruleView), 2, "Should have two rules initially.");
 
   info("Resize to 100x100 and wait for the rule-view to update");
   let onRefresh = ruleView.once("ruleview-refreshed");
-  yield setViewportSize(ui, manager, 100, 100);
-  yield onRefresh;
+  await setViewportSize(ui, manager, 100, 100);
+  await onRefresh;
 
   is(numberOfRules(ruleView), 3, "Should have three rules after shrinking.");
 }
 
-function* testGrow(ruleView, ui, manager) {
+async function testGrow(ruleView, ui, manager) {
   info("Resize to 500x500 and wait for the rule-view to update");
   let onRefresh = ruleView.once("ruleview-refreshed");
-  yield setViewportSize(ui, manager, 500, 500);
-  yield onRefresh;
+  await setViewportSize(ui, manager, 500, 500);
+  await onRefresh;
 
   is(numberOfRules(ruleView), 2, "Should have two rules after growing.");
 }
 
-function* testEscapeOpensSplitConsole(inspector) {
+async function testEscapeOpensSplitConsole(inspector) {
   ok(!inspector._toolbox._splitConsole, "Console is not split.");
 
   info("Press escape");
   let onSplit = inspector._toolbox.once("split-console");
   EventUtils.synthesizeKey("VK_ESCAPE", {});
-  yield onSplit;
+  await onSplit;
 
   ok(inspector._toolbox._splitConsole, "Console is split after pressing ESC.");
 }
 
 function numberOfRules(ruleView) {
   return ruleView.element.querySelectorAll(".ruleview-code").length;
 }
--- a/devtools/client/responsive.html/test/browser/browser_toolbox_swap_browsers.js
+++ b/devtools/client/responsive.html/test/browser/browser_toolbox_swap_browsers.js
@@ -4,119 +4,119 @@
 "use strict";
 
 // Verify that toolbox remains open when opening and closing RDM.
 
 const TEST_URL = "http://example.com/";
 
 function getServerConnections(browser) {
   ok(browser.isRemoteBrowser, "Content browser is remote");
-  return ContentTask.spawn(browser, {}, function* () {
+  return ContentTask.spawn(browser, {}, async function () {
     const Cu = Components.utils;
     const { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
     const { DebuggerServer } = require("devtools/server/main");
     if (!DebuggerServer._connections) {
       return 0;
     }
     return Object.getOwnPropertyNames(DebuggerServer._connections);
   });
 }
 
-let checkServerConnectionCount = Task.async(function* (browser, expected, msg) {
-  let conns = yield getServerConnections(browser);
+let checkServerConnectionCount = async function (browser, expected, msg) {
+  let conns = await getServerConnections(browser);
   is(conns.length || 0, expected, "Server connection count: " + msg);
-});
+};
 
-let checkToolbox = Task.async(function* (tab, location) {
+let checkToolbox = async function (tab, location) {
   let target = TargetFactory.forTab(tab);
   ok(!!gDevTools.getToolbox(target), `Toolbox exists ${location}`);
-});
+};
 
-add_task(function* () {
-  let tab = yield addTab(TEST_URL);
+add_task(async function () {
+  let tab = await addTab(TEST_URL);
 
   let tabsInDifferentProcesses = E10S_MULTI_ENABLED &&
     (gBrowser.tabs[0].linkedBrowser.frameLoader.childID !=
      gBrowser.tabs[1].linkedBrowser.frameLoader.childID);
 
   info("Open toolbox outside RDM");
   {
     // 0: No DevTools connections yet
-    yield checkServerConnectionCount(tab.linkedBrowser, 0,
+    await checkServerConnectionCount(tab.linkedBrowser, 0,
       "0: No DevTools connections yet");
-    let { toolbox } = yield openInspector();
+    let { toolbox } = await openInspector();
     if (tabsInDifferentProcesses) {
       // 1: Two tabs open, but only one per content process
-      yield checkServerConnectionCount(tab.linkedBrowser, 1,
+      await checkServerConnectionCount(tab.linkedBrowser, 1,
         "1: Two tabs open, but only one per content process");
     } else {
       // 2: One for each tab (starting tab plus the one we opened)
-      yield checkServerConnectionCount(tab.linkedBrowser, 2,
+      await checkServerConnectionCount(tab.linkedBrowser, 2,
         "2: One for each tab (starting tab plus the one we opened)");
     }
-    yield checkToolbox(tab, "outside RDM");
-    let { ui } = yield openRDM(tab);
+    await checkToolbox(tab, "outside RDM");
+    let { ui } = await openRDM(tab);
     if (tabsInDifferentProcesses) {
       // 2: RDM UI adds an extra connection, 1 + 1 = 2
-      yield checkServerConnectionCount(ui.getViewportBrowser(), 2,
+      await checkServerConnectionCount(ui.getViewportBrowser(), 2,
         "2: RDM UI uses an extra connection");
     } else {
       // 3: RDM UI adds an extra connection, 2 + 1 = 3
-      yield checkServerConnectionCount(ui.getViewportBrowser(), 3,
+      await checkServerConnectionCount(ui.getViewportBrowser(), 3,
         "3: RDM UI uses an extra connection");
     }
-    yield checkToolbox(tab, "after opening RDM");
-    yield closeRDM(tab);
+    await checkToolbox(tab, "after opening RDM");
+    await closeRDM(tab);
     if (tabsInDifferentProcesses) {
       // 1: RDM UI closed, return to previous connection count
-      yield checkServerConnectionCount(tab.linkedBrowser, 1,
+      await checkServerConnectionCount(tab.linkedBrowser, 1,
         "1: RDM UI closed, return to previous connection count");
     } else {
       // 2: RDM UI closed, return to previous connection count
-      yield checkServerConnectionCount(tab.linkedBrowser, 2,
+      await checkServerConnectionCount(tab.linkedBrowser, 2,
         "2: RDM UI closed, return to previous connection count");
     }
-    yield checkToolbox(tab, tab.linkedBrowser, "after closing RDM");
-    yield toolbox.destroy();
+    await checkToolbox(tab, tab.linkedBrowser, "after closing RDM");
+    await toolbox.destroy();
     // 0: All DevTools usage closed
-    yield checkServerConnectionCount(tab.linkedBrowser, 0,
+    await checkServerConnectionCount(tab.linkedBrowser, 0,
       "0: All DevTools usage closed");
   }
 
   info("Open toolbox inside RDM");
   {
     // 0: No DevTools connections yet
-    yield checkServerConnectionCount(tab.linkedBrowser, 0,
+    await checkServerConnectionCount(tab.linkedBrowser, 0,
       "0: No DevTools connections yet");
-    let { ui } = yield openRDM(tab);
+    let { ui } = await openRDM(tab);
     // 1: RDM UI uses an extra connection
-    yield checkServerConnectionCount(ui.getViewportBrowser(), 1,
+    await checkServerConnectionCount(ui.getViewportBrowser(), 1,
       "1: RDM UI uses an extra connection");
-    let { toolbox } = yield openInspector();
+    let { toolbox } = await openInspector();
     if (tabsInDifferentProcesses) {
       // 2: Two tabs open, but only one per content process
-      yield checkServerConnectionCount(ui.getViewportBrowser(), 2,
+      await checkServerConnectionCount(ui.getViewportBrowser(), 2,
         "2: Two tabs open, but only one per content process");
     } else {
       // 3: One for each tab (starting tab plus the one we opened)
-      yield checkServerConnectionCount(ui.getViewportBrowser(), 3,
+      await checkServerConnectionCount(ui.getViewportBrowser(), 3,
         "3: One for each tab (starting tab plus the one we opened)");
     }
-    yield checkToolbox(tab, ui.getViewportBrowser(), "inside RDM");
-    yield closeRDM(tab);
+    await checkToolbox(tab, ui.getViewportBrowser(), "inside RDM");
+    await closeRDM(tab);
     if (tabsInDifferentProcesses) {
       // 1: RDM UI closed, one less connection
-      yield checkServerConnectionCount(tab.linkedBrowser, 1,
+      await checkServerConnectionCount(tab.linkedBrowser, 1,
         "1: RDM UI closed, one less connection");
     } else {
       // 2: RDM UI closed, one less connection
-      yield checkServerConnectionCount(tab.linkedBrowser, 2,
+      await checkServerConnectionCount(tab.linkedBrowser, 2,
         "2: RDM UI closed, one less connection");
     }
-    yield checkToolbox(tab, tab.linkedBrowser, "after closing RDM");
-    yield toolbox.destroy();
+    await checkToolbox(tab, tab.linkedBrowser, "after closing RDM");
+    await toolbox.destroy();
     // 0: All DevTools usage closed
-    yield checkServerConnectionCount(tab.linkedBrowser, 0,
+    await checkServerConnectionCount(tab.linkedBrowser, 0,
       "0: All DevTools usage closed");
   }
 
-  yield removeTab(tab);
+  await removeTab(tab);
 });
--- a/devtools/client/responsive.html/test/browser/browser_touch_device.js
+++ b/devtools/client/responsive.html/test/browser/browser_touch_device.js
@@ -17,72 +17,72 @@ const testDevice = {
   "firefoxOS": true,
   "os": "custom",
   "featured": true,
 };
 
 // Add the new device to the list
 addDeviceForTest(testDevice);
 
-addRDMTask(TEST_URL, function* ({ ui, manager }) {
-  yield waitStartup(ui);
+addRDMTask(TEST_URL, async function ({ ui, manager }) {
+  await waitStartup(ui);
 
-  yield testDefaults(ui);
-  yield testChangingDevice(ui);
-  yield testResizingViewport(ui, true, false);
-  yield testEnableTouchSimulation(ui);
-  yield testResizingViewport(ui, false, true);
-  yield testDisableTouchSimulation(ui);
+  await testDefaults(ui);
+  await testChangingDevice(ui);
+  await testResizingViewport(ui, true, false);
+  await testEnableTouchSimulation(ui);
+  await testResizingViewport(ui, false, true);
+  await testDisableTouchSimulation(ui);
 });
 
-function* waitStartup(ui) {
+async function waitStartup(ui) {
   let { store } = ui.toolWindow;
 
   // Wait until the viewport has been added and the device list has been loaded
-  yield waitUntilState(store, state => state.viewports.length == 1
+  await waitUntilState(store, state => state.viewports.length == 1
     && state.devices.listState == Types.deviceListState.LOADED);
 }
 
-function* testDefaults(ui) {
+async function testDefaults(ui) {
   info("Test Defaults");
 
-  yield testTouchEventsOverride(ui, false);
+  await testTouchEventsOverride(ui, false);
   testViewportDeviceSelectLabel(ui, "no device selected");
 }
 
-function* testChangingDevice(ui) {
+async function testChangingDevice(ui) {
   info("Test Changing Device");
 
-  yield selectDevice(ui, testDevice.name);
-  yield waitForViewportResizeTo(ui, testDevice.width, testDevice.height);
-  yield testTouchEventsOverride(ui, true);
+  await selectDevice(ui, testDevice.name);
+  await waitForViewportResizeTo(ui, testDevice.width, testDevice.height);
+  await testTouchEventsOverride(ui, true);
   testViewportDeviceSelectLabel(ui, testDevice.name);
 }
 
-function* testResizingViewport(ui, device, touch) {
+async function testResizingViewport(ui, device, touch) {
   info(`Test resizing the viewport, device ${device}, touch ${touch}`);
 
   let deviceRemoved;
   if (device) {
     deviceRemoved = once(ui, "device-association-removed");
   }
-  yield testViewportResize(ui, ".viewport-vertical-resize-handle",
+  await testViewportResize(ui, ".viewport-vertical-resize-handle",
     [-10, -10], [testDevice.width, testDevice.height - 10], [0, -10], ui);
   if (device) {
-    yield deviceRemoved;
+    await deviceRemoved;
   }
-  yield testTouchEventsOverride(ui, touch);
+  await testTouchEventsOverride(ui, touch);
   testViewportDeviceSelectLabel(ui, "no device selected");
 }
 
-function* testEnableTouchSimulation(ui) {
+async function testEnableTouchSimulation(ui) {
   info("Test enabling touch simulation via button");
 
-  yield toggleTouchSimulation(ui);
-  yield testTouchEventsOverride(ui, true);
+  await toggleTouchSimulation(ui);
+  await testTouchEventsOverride(ui, true);
 }
 
-function* testDisableTouchSimulation(ui) {
+async function testDisableTouchSimulation(ui) {
   info("Test disabling touch simulation via button");
 
-  yield toggleTouchSimulation(ui);
-  yield testTouchEventsOverride(ui, false);
+  await toggleTouchSimulation(ui);
+  await testTouchEventsOverride(ui, false);
 }
--- a/devtools/client/responsive.html/test/browser/browser_touch_simulation.js
+++ b/devtools/client/responsive.html/test/browser/browser_touch_simulation.js
@@ -3,161 +3,161 @@
 
 "use strict";
 
 // Test global touch simulation button
 
 const TEST_URL = `${URL_ROOT}touch.html`;
 const PREF_DOM_META_VIEWPORT_ENABLED = "dom.meta-viewport.enabled";
 
-addRDMTask(TEST_URL, function* ({ ui }) {
-  yield injectEventUtilsInContentTask(ui.getViewportBrowser());
+addRDMTask(TEST_URL, async function ({ ui }) {
+  await injectEventUtilsInContentTask(ui.getViewportBrowser());
 
-  yield waitBootstrap(ui);
-  yield testWithNoTouch(ui);
-  yield toggleTouchSimulation(ui);
-  yield testWithTouch(ui);
-  yield testWithMetaViewportEnabled(ui);
-  yield testWithMetaViewportDisabled(ui);
+  await waitBootstrap(ui);
+  await testWithNoTouch(ui);
+  await toggleTouchSimulation(ui);
+  await testWithTouch(ui);
+  await testWithMetaViewportEnabled(ui);
+  await testWithMetaViewportDisabled(ui);
   testTouchButton(ui);
 });
 
-function* testWithNoTouch(ui) {
-  yield ContentTask.spawn(ui.getViewportBrowser(), {}, function* () {
+async function testWithNoTouch(ui) {
+  await ContentTask.spawn(ui.getViewportBrowser(), {}, async function () {
     let div = content.document.querySelector("div");
     let x = 0, y = 0;
 
     info("testWithNoTouch: Initial test parameter and mouse mouse outside div");
     x = -1; y = -1;
-    yield EventUtils.synthesizeMouse(div, x, y,
+    await EventUtils.synthesizeMouse(div, x, y,
           { type: "mousemove", isSynthesized: false }, content);
     div.style.transform = "none";
     div.style.backgroundColor = "";
 
     info("testWithNoTouch: Move mouse into the div element");
-    yield EventUtils.synthesizeMouseAtCenter(div,
+    await EventUtils.synthesizeMouseAtCenter(div,
           { type: "mousemove", isSynthesized: false }, content);
     is(div.style.backgroundColor, "red", "mouseenter or mouseover should work");
 
     info("testWithNoTouch: Drag the div element");
-    yield EventUtils.synthesizeMouseAtCenter(div,
+    await EventUtils.synthesizeMouseAtCenter(div,
           { type: "mousedown", isSynthesized: false }, content);
     x = 100; y = 100;
-    yield EventUtils.synthesizeMouse(div, x, y,
+    await EventUtils.synthesizeMouse(div, x, y,
           { type: "mousemove", isSynthesized: false }, content);
     is(div.style.transform, "none", "touchmove shouldn't work");
-    yield EventUtils.synthesizeMouse(div, x, y,
+    await EventUtils.synthesizeMouse(div, x, y,
           { type: "mouseup", isSynthesized: false }, content);
 
     info("testWithNoTouch: Move mouse out of the div element");
     x = -1; y = -1;
-    yield EventUtils.synthesizeMouse(div, x, y,
+    await EventUtils.synthesizeMouse(div, x, y,
           { type: "mousemove", isSynthesized: false }, content);
     is(div.style.backgroundColor, "blue", "mouseout or mouseleave should work");
 
     info("testWithNoTouch: Click the div element");
-    yield EventUtils.synthesizeClick(div);
+    await EventUtils.synthesizeClick(div);
     is(div.dataset.isDelay, "false",
       "300ms delay between touch events and mouse events should not work");
   });
 }
 
-function* testWithTouch(ui) {
-  yield ContentTask.spawn(ui.getViewportBrowser(), {}, function* () {
+async function testWithTouch(ui) {
+  await ContentTask.spawn(ui.getViewportBrowser(), {}, async function () {
     let div = content.document.querySelector("div");
     let x = 0, y = 0;
 
     info("testWithTouch: Initial test parameter and mouse mouse outside div");
     x = -1; y = -1;
-    yield EventUtils.synthesizeMouse(div, x, y,
+    await EventUtils.synthesizeMouse(div, x, y,
           { type: "mousemove", isSynthesized: false }, content);
     div.style.transform = "none";
     div.style.backgroundColor = "";
 
     info("testWithTouch: Move mouse into the div element");
-    yield EventUtils.synthesizeMouseAtCenter(div,
+    await EventUtils.synthesizeMouseAtCenter(div,
           { type: "mousemove", isSynthesized: false }, content);
     isnot(div.style.backgroundColor, "red",
       "mouseenter or mouseover should not work");
 
     info("testWithTouch: Drag the div element");
-    yield EventUtils.synthesizeMouseAtCenter(div,
+    await EventUtils.synthesizeMouseAtCenter(div,
           { type: "mousedown", isSynthesized: false }, content);
     x = 100; y = 100;
-    yield EventUtils.synthesizeMouse(div, x, y,
+    await EventUtils.synthesizeMouse(div, x, y,
           { type: "mousemove", isSynthesized: false }, content);
     isnot(div.style.transform, "none", "touchmove should work");
-    yield EventUtils.synthesizeMouse(div, x, y,
+    await EventUtils.synthesizeMouse(div, x, y,
           { type: "mouseup", isSynthesized: false }, content);
 
     info("testWithTouch: Move mouse out of the div element");
     x = -1; y = -1;
-    yield EventUtils.synthesizeMouse(div, x, y,
+    await EventUtils.synthesizeMouse(div, x, y,
           { type: "mousemove", isSynthesized: false }, content);
     isnot(div.style.backgroundColor, "blue",
       "mouseout or mouseleave should not work");
   });
 }
 
-function* testWithMetaViewportEnabled(ui) {
-  yield SpecialPowers.pushPrefEnv({set: [[PREF_DOM_META_VIEWPORT_ENABLED, true]]});
+async function testWithMetaViewportEnabled(ui) {
+  await SpecialPowers.pushPrefEnv({set: [[PREF_DOM_META_VIEWPORT_ENABLED, true]]});
 
-  yield ContentTask.spawn(ui.getViewportBrowser(), {}, function* () {
+  await ContentTask.spawn(ui.getViewportBrowser(), {}, async function () {
     let { synthesizeClick } = EventUtils;
 
     let meta = content.document.querySelector("meta[name=viewport]");
     let div = content.document.querySelector("div");
     div.dataset.isDelay = "false";
 
     info("testWithMetaViewportEnabled: " +
          "click the div element with <meta name='viewport'>");
     meta.content = "";
-    yield synthesizeClick(div);
+    await synthesizeClick(div);
     is(div.dataset.isDelay, "true",
       "300ms delay between touch events and mouse events should work");
 
     info("testWithMetaViewportEnabled: " +
          "click the div element with " +
          "<meta name='viewport' content='user-scalable=no'>");
     meta.content = "user-scalable=no";
-    yield synthesizeClick(div);
+    await synthesizeClick(div);
     is(div.dataset.isDelay, "false",
       "300ms delay between touch events and mouse events should not work");
 
     info("testWithMetaViewportEnabled: " +
          "click the div element with " +
          "<meta name='viewport' content='minimum-scale=maximum-scale'>");
     meta.content = "minimum-scale=maximum-scale";
-    yield synthesizeClick(div);
+    await synthesizeClick(div);
     is(div.dataset.isDelay, "false",
       "300ms delay between touch events and mouse events should not work");
 
     info("testWithMetaViewportEnabled: " +
          "click the div element with " +
          "<meta name='viewport' content='width=device-width'>");
     meta.content = "width=device-width";
-    yield synthesizeClick(div);
+    await synthesizeClick(div);
     is(div.dataset.isDelay, "false",
       "300ms delay between touch events and mouse events should not work");
   });
 }
 
-function* testWithMetaViewportDisabled(ui) {
-  yield SpecialPowers.pushPrefEnv({set: [[PREF_DOM_META_VIEWPORT_ENABLED, false]]});
+async function testWithMetaViewportDisabled(ui) {
+  await SpecialPowers.pushPrefEnv({set: [[PREF_DOM_META_VIEWPORT_ENABLED, false]]});
 
-  yield ContentTask.spawn(ui.getViewportBrowser(), {}, function* () {
+  await ContentTask.spawn(ui.getViewportBrowser(), {}, async function () {
     let { synthesizeClick } = EventUtils;
 
     let meta = content.document.querySelector("meta[name=viewport]");
     let div = content.document.querySelector("div");
     div.dataset.isDelay = "false";
 
     info("testWithMetaViewportDisabled: click the div with <meta name='viewport'>");
     meta.content = "";
-    yield synthesizeClick(div);
+    await synthesizeClick(div);
     is(div.dataset.isDelay, "true",
       "300ms delay between touch events and mouse events should work");
   });
 }
 
 function testTouchButton(ui) {
   let { document } = ui.toolWindow;
   let touchButton = document.querySelector("#global-touch-simulation-button");
@@ -171,14 +171,14 @@ function testTouchButton(ui) {
     "Touch simulation is stopped on click.");
 
   touchButton.click();
 
   ok(touchButton.classList.contains("checked"),
     "Touch simulation is started on click.");
 }
 
-function* waitBootstrap(ui) {
+async function waitBootstrap(ui) {
   let { store } = ui.toolWindow;
 
-  yield waitUntilState(store, state => state.viewports.length == 1);
-  yield waitForFrameLoad(ui, TEST_URL);
+  await waitUntilState(store, state => state.viewports.length == 1);
+  await waitForFrameLoad(ui, TEST_URL);
 }
--- a/devtools/client/responsive.html/test/browser/browser_viewport_basics.js
+++ b/devtools/client/responsive.html/test/browser/browser_viewport_basics.js
@@ -2,29 +2,29 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test viewports basics after opening, like size and location
 
 const TEST_URL = "http://example.org/";
 
-addRDMTask(TEST_URL, function* ({ ui }) {
+addRDMTask(TEST_URL, async function ({ ui }) {
   let store = ui.toolWindow.store;
 
   // Wait until the viewport has been added
-  yield waitUntilState(store, state => state.viewports.length == 1);
+  await waitUntilState(store, state => state.viewports.length == 1);
 
   // A single viewport of default size appeared
   let viewport = ui.toolWindow.document.querySelector(".viewport-content");
 
   is(ui.toolWindow.getComputedStyle(viewport).getPropertyValue("width"),
      "320px", "Viewport has default width");
   is(ui.toolWindow.getComputedStyle(viewport).getPropertyValue("height"),
      "480px", "Viewport has default height");
 
   // Browser's location should match original tab
-  yield waitForFrameLoad(ui, TEST_URL);
-  let location = yield spawnViewportTask(ui, {}, function* () {
+  await waitForFrameLoad(ui, TEST_URL);
+  let location = await spawnViewportTask(ui, {}, function () {
     return content.location.href; // eslint-disable-line
   });
   is(location, TEST_URL, "Viewport location matches");
 });
--- a/devtools/client/responsive.html/test/browser/browser_window_close.js
+++ b/devtools/client/responsive.html/test/browser/browser_window_close.js
@@ -1,25 +1,25 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
-add_task(function* () {
+add_task(async function () {
   let newWindowPromise = BrowserTestUtils.waitForNewWindow();
   window.open("data:text/html;charset=utf-8,", "_blank");
-  let newWindow = yield newWindowPromise;
+  let newWindow = await newWindowPromise;
 
   newWindow.focus();
-  yield BrowserTestUtils.browserLoaded(newWindow.gBrowser.selectedBrowser);
+  await BrowserTestUtils.browserLoaded(newWindow.gBrowser.selectedBrowser);
 
   let tab = newWindow.gBrowser.selectedTab;
-  yield openRDM(tab);
+  await openRDM(tab);
 
   // Close the window on a tab with an active responsive design UI and
   // wait for the UI to gracefully shutdown.  This has leaked the window
   // in the past.
   ok(ResponsiveUIManager.isActiveForTab(tab),
      "ResponsiveUI should be active for tab when the window is closed");
   let offPromise = once(ResponsiveUIManager, "off");
-  yield BrowserTestUtils.closeWindow(newWindow);
-  yield offPromise;
+  await BrowserTestUtils.closeWindow(newWindow);
+  await offPromise;
 });
--- a/devtools/client/responsive.html/test/browser/head.js
+++ b/devtools/client/responsive.html/test/browser/head.js
@@ -60,82 +60,82 @@ registerCleanupFunction(async () => {
   await removeLocalDevices();
 });
 
 loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true);
 
 /**
  * Open responsive design mode for the given tab.
  */
-var openRDM = Task.async(function* (tab) {
+var openRDM = async function (tab) {
   info("Opening responsive design mode");
   let manager = ResponsiveUIManager;
-  let ui = yield manager.openIfNeeded(tab.ownerGlobal, tab);
+  let ui = await manager.openIfNeeded(tab.ownerGlobal, tab);
   info("Responsive design mode opened");
   return { ui, manager };
-});
+};
 
 /**
  * Close responsive design mode for the given tab.
  */
-var closeRDM = Task.async(function* (tab, options) {
+var closeRDM = async function (tab, options) {
   info("Closing responsive design mode");
   let manager = ResponsiveUIManager;
-  yield manager.closeIfNeeded(tab.ownerGlobal, tab, options);
+  await manager.closeIfNeeded(tab.ownerGlobal, tab, options);
   info("Responsive design mode closed");
-});
+};
 
 /**
  * Adds a new test task that adds a tab with the given URL, opens responsive
  * design mode, runs the given generator, closes responsive design mode, and
  * removes the tab.
  *
  * Example usage:
  *
  *   addRDMTask(TEST_URL, function*({ ui, manager }) {
  *     // Your tests go here...
  *   });
  */
 function addRDMTask(url, generator) {
-  add_task(function* () {
-    const tab = yield addTab(url);
-    const results = yield openRDM(tab);
+  add_task(async function () {
+    const tab = await addTab(url);
+    const results = await openRDM(tab);
 
     try {
-      yield* generator(results);
+      await generator(results);
     } catch (err) {
       ok(false, "Got an error: " + DevToolsUtils.safeErrorString(err));
     }
 
-    yield closeRDM(tab);
-    yield removeTab(tab);
+    await closeRDM(tab);
+    await removeTab(tab);
   });
 }
 
 function spawnViewportTask(ui, args, task) {
   return ContentTask.spawn(ui.getViewportBrowser(), args, task);
 }
 
 function waitForFrameLoad(ui, targetURL) {
-  return spawnViewportTask(ui, { targetURL }, function* (args) {
+  return spawnViewportTask(ui, { targetURL }, async function (args) {
     if ((content.document.readyState == "complete" ||
          content.document.readyState == "interactive") &&
         content.location.href == args.targetURL) {
       return;
     }
-    yield ContentTaskUtils.waitForEvent(this, "DOMContentLoaded");
+    await ContentTaskUtils.waitForEvent(this, "DOMContentLoaded");
   });
 }
 
 function waitForViewportResizeTo(ui, width, height) {
-  return new Promise(Task.async(function* (resolve) {
+  return new Promise(async function (resolve) {
     let isSizeMatching = (data) => data.width == width && data.height == height;
 
     // If the viewport has already the expected size, we resolve the promise immediately.
-    let size = yield getContentSize(ui);
+    let size = await getContentSize(ui);
     if (isSizeMatching(size)) {
       resolve();
       return;
     }
 
     // Otherwise, we'll listen to both content's resize event and browser's load end;
     // since a racing condition can happen, where the content's listener is added after
     // the resize, because the content's document was reloaded; therefore the test would
@@ -147,38 +147,38 @@ function waitForViewportResizeTo(ui, wid
         return;
       }
       ui.off("content-resize", onResize);
       browser.removeEventListener("mozbrowserloadend", onBrowserLoadEnd);
       info(`Got content-resize to ${width} x ${height}`);
       resolve();
     };
 
-    let onBrowserLoadEnd = Task.async(function* () {
-      let data = yield getContentSize(ui);
+    let onBrowserLoadEnd = async function () {
+      let data = await getContentSize(ui);
       onResize(undefined, data);
-    });
+    };
 
     info(`Waiting for content-resize to ${width} x ${height}`);
     ui.on("content-resize", onResize);
     browser.addEventListener("mozbrowserloadend",
       onBrowserLoadEnd, { once: true });
-  }));
+  });
 }
 
-var setViewportSize = Task.async(function* (ui, manager, width, height) {
+var setViewportSize = async function (ui, manager, width, height) {
   let size = ui.getViewportSize();
   info(`Current size: ${size.width} x ${size.height}, ` +
        `set to: ${width} x ${height}`);
   if (size.width != width || size.height != height) {
     let resized = waitForViewportResizeTo(ui, width, height);
     ui.setViewportSize({ width, height });
-    yield resized;
+    await resized;
   }
-});
+};
 
 function getElRect(selector, win) {
   let el = win.document.querySelector(selector);
   return el.getBoundingClientRect();
 }
 
 /**
  * Drag an element identified by 'selector' by [x,y] amount. Returns
@@ -201,22 +201,22 @@ function dragElementBy(selector, x, y, w
 
   // mousemove and mouseup are regular DOM listeners
   EventUtils.synthesizeMouseAtPoint(...endPoint, { type: "mousemove" }, win);
   EventUtils.synthesizeMouseAtPoint(...endPoint, { type: "mouseup" }, win);
 
   return rect;
 }
 
-function* testViewportResize(ui, selector, moveBy,
+async function testViewportResize(ui, selector, moveBy,
                              expectedViewportSize, expectedHandleMove) {
   let win = ui.toolWindow;
   let resized = waitForViewportResizeTo(ui, ...expectedViewportSize);
   let startRect = dragElementBy(selector, ...moveBy, win);
-  yield resized;
+  await resized;
 
   let endRect = getElRect(selector, win);
   is(endRect.left - startRect.left, expectedHandleMove[0],
     `The x move of ${selector} is as expected`);
   is(endRect.top - startRect.top, expectedHandleMove[1],
     `The y move of ${selector} is as expected`);
 }
 
@@ -264,17 +264,17 @@ const selectDevicePixelRatio = (ui, valu
   changeSelectValue(ui, "#global-device-pixel-ratio-selector", value);
 
 const selectNetworkThrottling = (ui, value) => Promise.all([
   once(ui, "network-throttling-changed"),
   changeSelectValue(ui, "#global-network-throttling-selector", value)
 ]);
 
 function getSessionHistory(browser) {
-  return ContentTask.spawn(browser, {}, function* () {
+  return ContentTask.spawn(browser, {}, async function () {
     /* eslint-disable no-undef */
     let { utils: Cu } = Components;
     const { SessionHistory } =
       Cu.import("resource://gre/modules/sessionstore/SessionHistory.jsm", {});
     return SessionHistory.collect(docShell);
     /* eslint-enable no-undef */
   });
 }
@@ -333,50 +333,50 @@ function addDeviceForTest(device) {
 }
 
 async function waitForClientClose(ui) {
   info("Waiting for RDM debugger client to close");
   await ui.client.addOneTimeListener("closed");
   info("RDM's debugger client is now closed");
 }
 
-function* testTouchEventsOverride(ui, expected) {
+async function testTouchEventsOverride(ui, expected) {
   let { document } = ui.toolWindow;
   let touchButton = document.querySelector("#global-touch-simulation-button");
 
-  let flag = yield ui.emulationFront.getTouchEventsOverride();
+  let flag = await ui.emulationFront.getTouchEventsOverride();
   is(flag === Ci.nsIDocShell.TOUCHEVENTS_OVERRIDE_ENABLED, expected,
     `Touch events override should be ${expected ? "enabled" : "disabled"}`);
   is(touchButton.classList.contains("checked"), expected,
     `Touch simulation button should be ${expected ? "" : "in"}active.`);
 }
 
 function testViewportDeviceSelectLabel(ui, expected) {
   info("Test viewport's device select label");
 
   let select = ui.toolWindow.document.querySelector(".viewport-device-selector");
   is(select.selectedOptions[0].textContent, expected,
      `Device Select value should be: ${expected}`);
 }
 
-function* toggleTouchSimulation(ui) {
+async function toggleTouchSimulation(ui) {
   let { document } = ui.toolWindow;
   let touchButton = document.querySelector("#global-touch-simulation-button");
   let changed = once(ui, "touch-simulation-changed");
   let loaded = waitForViewportLoad(ui);
   touchButton.click();
-  yield Promise.all([ changed, loaded ]);
+  await Promise.all([ changed, loaded ]);
 }
 
 function testUserAgent(ui, expected) {
   testUserAgentFromBrowser(ui.getViewportBrowser(), expected);
 }
 
 async function testUserAgentFromBrowser(browser, expected) {
-  let ua = await ContentTask.spawn(browser, {}, function* () {
+  let ua = await ContentTask.spawn(browser, {}, async function () {
     return content.navigator.userAgent;
   });
   is(ua, expected, `UA should be set to ${expected}`);
 }
 
 /**
  * Assuming the device modal is open and the device adder form is shown, this helper
  * function adds `device` via the form, saves it, and waits for it to appear in the store.