Bug 1075319 - Use native add_task in devtools mochitests rather than custom asyncTest. r=miker
authorPatrick Brosset <pbrosset@mozilla.com>
Mon, 15 Dec 2014 03:37:00 -0500
changeset 219739 0011a1d087cae5fc785df59fb18b955e12e03144
parent 219738 63c3a30697cbdec9d873c91f661394bf0ec17bf0
child 219740 cab12d762123475d5d2f8a04ff5230c19273f29b
push id10401
push userryanvm@gmail.com
push dateMon, 15 Dec 2014 19:19:53 +0000
treeherderfx-team@9772a3da28b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmiker
bugs1075319
milestone37.0a1
Bug 1075319 - Use native add_task in devtools mochitests rather than custom asyncTest. r=miker
browser/devtools/commandline/test/browser_cmd_csscoverage_oneshot.js
browser/devtools/commandline/test/browser_cmd_csscoverage_startstop.js
browser/devtools/commandline/test/browser_cmd_csscoverage_util.js
browser/devtools/commandline/test/head.js
browser/devtools/eyedropper/test/browser_eyedropper_basic.js
browser/devtools/eyedropper/test/head.js
browser/devtools/fontinspector/test/browser_fontinspector.js
browser/devtools/fontinspector/test/head.js
browser/devtools/framework/test/browser_toolbox_getpanelwhenready.js
browser/devtools/framework/test/browser_toolbox_options.js
browser/devtools/framework/test/browser_toolbox_options_devedition.js
browser/devtools/framework/test/browser_toolbox_options_disable_cache.js
browser/devtools/framework/test/head.js
browser/devtools/inspector/test/browser_inspector_gcli-inspect-command.js
browser/devtools/inspector/test/browser_inspector_highlight_after_transition.js
browser/devtools/markupview/test/browser_markupview_anonymous_01.js
browser/devtools/markupview/test/browser_markupview_anonymous_02.js
browser/devtools/markupview/test/browser_markupview_anonymous_03.js
browser/devtools/markupview/test/browser_markupview_copy_image_data.js
browser/devtools/markupview/test/browser_markupview_css_completion_style_attribute.js
browser/devtools/markupview/test/browser_markupview_events-overflow.js
browser/devtools/markupview/test/browser_markupview_events.js
browser/devtools/markupview/test/browser_markupview_events_jquery_1.0.js
browser/devtools/markupview/test/browser_markupview_events_jquery_1.1.js
browser/devtools/markupview/test/browser_markupview_events_jquery_1.11.1.js
browser/devtools/markupview/test/browser_markupview_events_jquery_1.2.js
browser/devtools/markupview/test/browser_markupview_events_jquery_1.3.js
browser/devtools/markupview/test/browser_markupview_events_jquery_1.4.js
browser/devtools/markupview/test/browser_markupview_events_jquery_1.6.js
browser/devtools/markupview/test/browser_markupview_events_jquery_1.7.js
browser/devtools/markupview/test/browser_markupview_events_jquery_2.1.1.js
browser/devtools/markupview/test/browser_markupview_html_edit_01.js
browser/devtools/markupview/test/browser_markupview_html_edit_02.js
browser/devtools/markupview/test/browser_markupview_html_edit_03.js
browser/devtools/markupview/test/browser_markupview_image_tooltip.js
browser/devtools/markupview/test/browser_markupview_mutation_01.js
browser/devtools/markupview/test/browser_markupview_mutation_02.js
browser/devtools/markupview/test/browser_markupview_navigation.js
browser/devtools/markupview/test/browser_markupview_node_not_displayed_01.js
browser/devtools/markupview/test/browser_markupview_node_not_displayed_02.js
browser/devtools/markupview/test/browser_markupview_pagesize_01.js
browser/devtools/markupview/test/browser_markupview_pagesize_02.js
browser/devtools/markupview/test/browser_markupview_search_01.js
browser/devtools/markupview/test/browser_markupview_tag_edit_01.js
browser/devtools/markupview/test/browser_markupview_tag_edit_02.js
browser/devtools/markupview/test/browser_markupview_tag_edit_03.js
browser/devtools/markupview/test/browser_markupview_tag_edit_04.js
browser/devtools/markupview/test/browser_markupview_tag_edit_05.js
browser/devtools/markupview/test/browser_markupview_tag_edit_06.js
browser/devtools/markupview/test/browser_markupview_tag_edit_07.js
browser/devtools/markupview/test/browser_markupview_tag_edit_08.js
browser/devtools/markupview/test/browser_markupview_tag_edit_09.js
browser/devtools/markupview/test/browser_markupview_tag_edit_10.js
browser/devtools/markupview/test/browser_markupview_tag_edit_11.js
browser/devtools/markupview/test/browser_markupview_textcontent_edit_01.js
browser/devtools/markupview/test/browser_markupview_toggle_01.js
browser/devtools/markupview/test/browser_markupview_toggle_02.js
browser/devtools/markupview/test/browser_markupview_toggle_03.js
browser/devtools/markupview/test/head.js
browser/devtools/projecteditor/test/browser_projecteditor_app_options.js
browser/devtools/projecteditor/test/browser_projecteditor_confirm_unsaved.js
browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_01.js
browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_02.js
browser/devtools/projecteditor/test/browser_projecteditor_delete_file.js
browser/devtools/projecteditor/test/browser_projecteditor_editing_01.js
browser/devtools/projecteditor/test/browser_projecteditor_editors_image.js
browser/devtools/projecteditor/test/browser_projecteditor_external_change.js
browser/devtools/projecteditor/test/browser_projecteditor_immediate_destroy.js
browser/devtools/projecteditor/test/browser_projecteditor_menubar_01.js
browser/devtools/projecteditor/test/browser_projecteditor_menubar_02.js
browser/devtools/projecteditor/test/browser_projecteditor_new_file.js
browser/devtools/projecteditor/test/browser_projecteditor_stores.js
browser/devtools/projecteditor/test/browser_projecteditor_tree_selection_01.js
browser/devtools/projecteditor/test/browser_projecteditor_tree_selection_02.js
browser/devtools/projecteditor/test/head.js
browser/devtools/styleeditor/test/browser_styleeditor_fetch-from-cache.js
browser/devtools/styleeditor/test/browser_styleeditor_highlight-selector.js
browser/devtools/styleeditor/test/browser_styleeditor_media_sidebar.js
browser/devtools/styleeditor/test/browser_styleeditor_media_sidebar_sourcemaps.js
browser/devtools/styleeditor/test/browser_styleeditor_new.js
browser/devtools/styleeditor/test/browser_styleeditor_sourcemaps.js
browser/devtools/styleeditor/test/browser_styleeditor_transition_rule.js
browser/devtools/styleeditor/test/browser_styleeditor_xul.js
browser/devtools/styleeditor/test/head.js
browser/devtools/styleinspector/test/head.js
browser/devtools/webconsole/test/browser_webconsole_inspect-parsed-documents.js
browser/devtools/webconsole/test/browser_webconsole_output_table.js
browser/devtools/webconsole/test/head.js
--- a/browser/devtools/commandline/test/browser_cmd_csscoverage_oneshot.js
+++ b/browser/devtools/commandline/test/browser_cmd_csscoverage_oneshot.js
@@ -9,17 +9,17 @@ const PAGE_1 = TEST_BASE_HTTPS + "browse
 const PAGE_2 = TEST_BASE_HTTPS + "browser_cmd_csscoverage_page2.html";
 const PAGE_3 = TEST_BASE_HTTPS + "browser_cmd_csscoverage_page3.html";
 
 const SHEET_A = TEST_BASE_HTTPS + "browser_cmd_csscoverage_sheetA.css";
 const SHEET_B = TEST_BASE_HTTPS + "browser_cmd_csscoverage_sheetB.css";
 const SHEET_C = TEST_BASE_HTTPS + "browser_cmd_csscoverage_sheetC.css";
 const SHEET_D = TEST_BASE_HTTPS + "browser_cmd_csscoverage_sheetD.css";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let options = yield helpers.openTab(PAGE_3);
   yield helpers.openToolbar(options);
 
   let usage = yield csscoverage.getUsage(options.target);
 
   yield navigate(usage, options);
   yield checkPages(usage);
   yield checkEditorReport(usage);
--- a/browser/devtools/commandline/test/browser_cmd_csscoverage_startstop.js
+++ b/browser/devtools/commandline/test/browser_cmd_csscoverage_startstop.js
@@ -9,17 +9,17 @@ const PAGE_1 = TEST_BASE_HTTPS + "browse
 const PAGE_2 = TEST_BASE_HTTPS + "browser_cmd_csscoverage_page2.html";
 const PAGE_3 = TEST_BASE_HTTPS + "browser_cmd_csscoverage_page3.html";
 
 const SHEET_A = TEST_BASE_HTTPS + "browser_cmd_csscoverage_sheetA.css";
 const SHEET_B = TEST_BASE_HTTPS + "browser_cmd_csscoverage_sheetB.css";
 const SHEET_C = TEST_BASE_HTTPS + "browser_cmd_csscoverage_sheetC.css";
 const SHEET_D = TEST_BASE_HTTPS + "browser_cmd_csscoverage_sheetD.css";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let options = yield helpers.openTab("about:blank");
   yield helpers.openToolbar(options);
 
   let usage = yield csscoverage.getUsage(options.target);
 
   yield navigate(usage, options);
   yield checkPages(usage);
   yield checkEditorReport(usage);
--- a/browser/devtools/commandline/test/browser_cmd_csscoverage_util.js
+++ b/browser/devtools/commandline/test/browser_cmd_csscoverage_util.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests that the addon commands works as they should
 
 const csscoverage = require("devtools/server/actors/csscoverage");
 
-let test = asyncTest(function*() {
+add_task(function*() {
   testDeconstructRuleId();
 });
 
 function testDeconstructRuleId() {
   // This is the easy case
   let rule = csscoverage.deconstructRuleId("http://thing/blah|10|20");
   is(rule.url, "http://thing/blah", "1 url");
   is(rule.line, 10, "1 line");
--- a/browser/devtools/commandline/test/head.js
+++ b/browser/devtools/commandline/test/head.js
@@ -32,12 +32,8 @@ function whenDelayedStartupFinished(aWin
  * collector in some situations, which causes test failures in later tests
  * Bug 774619 is an example.
  */
 registerCleanupFunction(function tearDown() {
   window.QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIDOMWindowUtils)
       .garbageCollect();
 });
-
-function asyncTest(generator) {
-  return () => Task.spawn(generator).catch(ok.bind(null, false)).then(finish);
-}
--- a/browser/devtools/eyedropper/test/browser_eyedropper_basic.js
+++ b/browser/devtools/eyedropper/test/browser_eyedropper_basic.js
@@ -5,17 +5,17 @@
 const TESTCASE_URI = TEST_BASE + "color-block.html";
 const DIV_COLOR = "#0000FF";
 
 /**
  * Test basic eyedropper widget functionality:
  *  - Opening eyedropper and pressing ESC closes the eyedropper
  *  - Opening eyedropper and clicking copies the center color
  */
-let test = asyncTest(function*() {
+add_task(function*() {
   yield addTab(TESTCASE_URI);
 
   info("added tab");
 
   yield testEscape();
 
   info("testing selecting a color");
 
--- a/browser/devtools/eyedropper/test/head.js
+++ b/browser/devtools/eyedropper/test/head.js
@@ -8,23 +8,16 @@ let { devtools } = Components.utils.impo
 const { Eyedropper, EyedropperManager } = devtools.require("devtools/eyedropper/eyedropper");
 const { Promise: promise } = devtools.require("resource://gre/modules/Promise.jsm");
 
 let testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/"));
 Services.scriptloader.loadSubScript(testDir + "../../../commandline/test/helpers.js", this);
 
 waitForExplicitFinish();
 
-/**
- * Define an async test based on a generator function
- */
-function asyncTest(generator) {
-  return () => Task.spawn(generator).then(null, ok.bind(null, false)).then(finish);
-}
-
 function cleanup()
 {
   while (gBrowser.tabs.length > 1) {
     gBrowser.removeCurrentTab();
   }
 }
 
 registerCleanupFunction(cleanup);
--- a/browser/devtools/fontinspector/test/browser_fontinspector.js
+++ b/browser/devtools/fontinspector/test/browser_fontinspector.js
@@ -5,17 +5,17 @@ let tempScope = {};
 let {gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
 let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
 let TargetFactory = devtools.TargetFactory;
 
 let TEST_URI = "http://mochi.test:8888/browser/browser/devtools/fontinspector/test/browser_fontinspector.html";
 
 let view, viewDoc;
 
-let test = asyncTest(function*() {
+add_task(function*() {
   yield loadTab(TEST_URI);
   let {toolbox, inspector} = yield openInspector();
 
   info("Selecting the test node");
   yield selectNode("body", inspector);
 
   let updated = inspector.once("fontinspector-updated");
   inspector.sidebar.select("fontinspector");
--- a/browser/devtools/fontinspector/test/head.js
+++ b/browser/devtools/fontinspector/test/head.js
@@ -26,23 +26,16 @@ registerCleanupFunction(function*() {
   yield gDevTools.closeToolbox(target);
 
   while (gBrowser.tabs.length > 1) {
     gBrowser.removeCurrentTab();
   }
 });
 
 /**
- * Define an async test based on a generator function
- */
-function asyncTest(generator) {
-  return () => Task.spawn(generator).then(null, ok.bind(null, false)).then(finish);
-}
-
-/**
  * Add a new test tab in the browser and load the given url.
  * @param {String} url The url to be loaded in the new tab
  * @return a promise that resolves to the tab object when the url is loaded
  */
 function loadTab(url) {
   let deferred = promise.defer();
 
   let tab = gBrowser.selectedTab = gBrowser.addTab(url);
--- a/browser/devtools/framework/test/browser_toolbox_getpanelwhenready.js
+++ b/browser/devtools/framework/test/browser_toolbox_getpanelwhenready.js
@@ -3,17 +3,17 @@
 
 // Tests that getPanelWhenReady returns the correct panel in promise
 // resolutions regardless of whether it has opened first.
 
 let toolbox = null;
 
 const URL = "data:text/html;charset=utf8,test for getPanelWhenReady";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let tab = yield addTab(URL);
   let target = TargetFactory.forTab(tab);
   toolbox = yield gDevTools.showToolbox(target);
 
   let debuggerPanelPromise = toolbox.getPanelWhenReady("jsdebugger");
   yield toolbox.selectTool("jsdebugger");
   let debuggerPanel = yield debuggerPanelPromise;
 
--- a/browser/devtools/framework/test/browser_toolbox_options.js
+++ b/browser/devtools/framework/test/browser_toolbox_options.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests that changing preferences in the options panel updates the prefs
 // and toggles appropriate things in the toolbox.
 
 let doc = null, toolbox = null, panelWin = null, modifiedPrefs = [];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   const URL = "data:text/html;charset=utf8,test for dynamically registering and unregistering tools";
   registerNewTool();
   let tab = yield addTab(URL);
   let target = TargetFactory.forTab(tab);
   toolbox = yield gDevTools.showToolbox(target);
   doc = toolbox.doc;
   yield testSelectTool();
   yield testOptionsShortcut();
--- a/browser/devtools/framework/test/browser_toolbox_options_devedition.js
+++ b/browser/devtools/framework/test/browser_toolbox_options_devedition.js
@@ -6,17 +6,17 @@
 
 let doc = null, toolbox = null, panelWin = null;
 
 const PREF_ENABLED = "browser.devedition.theme.enabled";
 const PREF_SHOW = "browser.devedition.theme.showCustomizeButton";
 
 const URL = "data:text/html;charset=utf8,test for toggling dev edition browser theme toggling";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   // Set preference to false by default so this could
   // run in Developer Edition which has it on by default.
   Services.prefs.setBoolPref(PREF_ENABLED, false);
   Services.prefs.setBoolPref(PREF_SHOW, true);
 
   let tab = yield addTab(URL);
   let target = TargetFactory.forTab(tab);
   toolbox = yield gDevTools.showToolbox(target);
--- a/browser/devtools/framework/test/browser_toolbox_options_disable_cache.js
+++ b/browser/devtools/framework/test/browser_toolbox_options_disable_cache.js
@@ -22,17 +22,17 @@ let tabs = [
   startToolbox: false
 },
 {
   title: "Tab 3",
   desc: "No toolbox",
   startToolbox: false
 }];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   // Initialise tabs: 1 and 2 with a toolbox, 3 and 4 without.
   for (let tab of tabs) {
     yield initTab(tab, tab.startToolbox);
   }
 
   // Ensure cache is enabled for all tabs.
   yield checkCacheStateForAllTabs([true, true, true, true]);
 
--- a/browser/devtools/framework/test/head.js
+++ b/browser/devtools/framework/test/head.js
@@ -28,23 +28,16 @@ function getFrameScript() {
 
 gDevTools.testing = true;
 SimpleTest.registerCleanupFunction(() => {
   gDevTools.testing = false;
   Services.prefs.clearUserPref("devtools.dump.emit");
 });
 
 /**
- * Define an async test based on a generator function
- */
-function asyncTest(generator) {
-  return () => Task.spawn(generator).then(null, ok.bind(null, false)).then(finish);
-}
-
-/**
  * Add a new test tab in the browser and load the given url.
  * @param {String} url The url to be loaded in the new tab
  * @return a promise that resolves to the tab object when the url is loaded
  */
 function addTab(url) {
   info("Adding a new tab with URL: '" + url + "'");
   let def = promise.defer();
 
--- a/browser/devtools/inspector/test/browser_inspector_gcli-inspect-command.js
+++ b/browser/devtools/inspector/test/browser_inspector_gcli-inspect-command.js
@@ -126,9 +126,9 @@ add_task(function* () {
           input:  'inspect :root',
           hints:               '',
           markup: 'VVVVVVVVVVVVV',
           status: 'VALID'
         },
       },
     ]); // helpers.audit
   }); // helpers.addTabWithToolbar
-}); // asyncTest
+}); // add_task
--- a/browser/devtools/inspector/test/browser_inspector_highlight_after_transition.js
+++ b/browser/devtools/inspector/test/browser_inspector_highlight_after_transition.js
@@ -4,17 +4,17 @@
 
 "use strict";
 
 const TEST_URI = "http://example.com/browser/browser/devtools/inspector/" +
                  "test/browser_inspector_highlight_after_transition.html";
 
 // Test that the nodeinfobar is never displayed above the top or below the
 // bottom of the content area.
-let test = asyncTest(function*() {
+add_task(function*() {
   info("Loading the test document and opening the inspector");
 
   yield addTab(TEST_URI);
 
   let {inspector} = yield openInspector();
 
   yield checkDivHeight(inspector);
 
--- a/browser/devtools/markupview/test/browser_markupview_anonymous_01.js
+++ b/browser/devtools/markupview/test/browser_markupview_anonymous_01.js
@@ -2,17 +2,17 @@
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test native anonymous content in the markupview.
 const TEST_URL = TEST_URL_ROOT + "doc_markup_anonymous.html";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   let pseudo = yield getNodeFront("#pseudo", inspector);
 
   // Markup looks like: <div><::before /><span /><::after /></div>
   let children = yield inspector.walker.children(pseudo);
   is (children.nodes.length, 3, "Children returned from walker");
 
--- a/browser/devtools/markupview/test/browser_markupview_anonymous_02.js
+++ b/browser/devtools/markupview/test/browser_markupview_anonymous_02.js
@@ -2,17 +2,17 @@
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test XBL anonymous content in the markupview
 const TEST_URL = "chrome://browser/content/devtools/scratchpad.xul";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   let toolbarbutton = yield getNodeFront("toolbarbutton", inspector);
   let children = yield inspector.walker.children(toolbarbutton);
 
   is(toolbarbutton.numChildren, 3, "Correct number of children");
   is (children.nodes.length, 3, "Children returned from walker");
 
--- a/browser/devtools/markupview/test/browser_markupview_anonymous_03.js
+++ b/browser/devtools/markupview/test/browser_markupview_anonymous_03.js
@@ -4,17 +4,17 @@
 
 "use strict";
 
 // Test shadow DOM content in the markupview.
 // Note that many features are not yet enabled, but basic listing
 // of elements should be working.
 const TEST_URL = TEST_URL_ROOT + "doc_markup_anonymous.html";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   Services.prefs.setBoolPref("dom.webcomponents.enabled", true);
 
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   let shadow = yield getNodeFront("#shadow", inspector.markup);
   let children = yield inspector.walker.children(shadow);
 
   is (shadow.numChildren, 3, "Children of the shadow root are counted");
--- a/browser/devtools/markupview/test/browser_markupview_copy_image_data.js
+++ b/browser/devtools/markupview/test/browser_markupview_copy_image_data.js
@@ -8,17 +8,17 @@
 // and that clicking it puts the image data into the clipboard
 
 const PAGE_CONTENT = [
   '<div></div>',
   '<img class="data" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAdYElEQVRogVWYZ3QV5pWuz6y5694pKzNzZ26SyWQyccpkJo5jx8GOHXcbgzHYgOkgJECIYoQAIQkhoYoaoIKEQEK9HUnnqJxedXpvOk3l6OiogkB0XOLkzpo/z/2BV9a6P971re/ffvbe6/32twVB3QFC+oMEdcmMa/cT0uxnwpBCwnaEZc8J7npPMDO2n8Dop3iHNhIc2URUtoVp1XYS2iSiol3E5UeZ12YRNxSz6G1idXaU5Xk9E5MqEvNO4vMu4gk7iYSVpYSRlYSelVk1t+Mqlue1LM1pWE5ouJPQcG9WxaNZNU/ier6aNfF1wspKUM29yTGeLNq4k9CyEJdxa0HC4vwwgoDmWeBBXTJBXTIRXQqTxgPELanM2Y8QUe4krNhBWLadSfVO5saSWLaksGw5yLLpEM62j/F17SQ6cpQ5UzHLgSZuTw1yZ17L6oqd+TkLc3M25uYsLM2ZuTVnYGVOy524gltxOUuzapa+hVlNqFidkbASEbHg6SZubWfJPcgXcT1P5wysTCm5HVdxO6FkcVbK8oIMQXjsAOGxZCL6Z5mfNB5gynSQKUMKE/r9hBW7mBnbz5L1MCvOYzzwZ/A0coZH/gxuW45gbHwfbe372Dt2sWAu5PFkK6tTvdyeFnN3QcPctJK5mIaFuI7lhI47CQ2rCRX3EjJW43LuJLTcndPxYE7Dw1kJtyO9TBirMfZnMXw9FU3nGR5MDPD1kpqliJg7cQWri3rmZ+QsJlQIosYDhPT7CWn3EdYlEf0WJqzZS1C5i1lLKnc86Tzwn+Zh4AxfTeTyf+OFfBHMYslwGHvLR0grX2O44i08A4e467vC41gHD2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PZukWdQ1Sfx5SlCMGcu5kFXzMr4Q7uT/Vwf6Kb5UATs/aaZxCGYsZV53AOp2PoPYi6fS+Kll0omrchb9rCSMNGRq5tYKThE0avbWH0+jZkTXuRtySjbE1F232Csb4MTKIsbCO5OKX5uOUFuBT5uBTnMY+cwiY9jVOWiXXoFKa+4xi7jmHvO4l3MJOINI+o4gJT6iIm9UVEdAUE9QWExgqJmIsQxJxNxN1N3Brv4GFMyMNYH7eCN5l11jJtrWLKXE5YX4hPnol9+Dgm4SH03cmoO3ajaH0GIW/+FOXN7ahbd6Pt3I+hJ+3bR+00Lsl5XJJ8XJICXJKCPwN4FIV4VPk4FWdxKTNxK7LwyHPwSXIJSi8QlRcxpSojrqsiPnaJ2NglpgwVhPQl+PRFeHUFuLTnEUzaGpl23GDJ38bDmJBHM/3fAlxl2lpFSFdMQJ2HT56FS5KOXXwMc38q+p4kNJ270HXsQt+1E2PPfqz9qdjFx/BKMgko8gipCwmoSvApinBJCrAPfzsbSfJwywvwqi8QNFzAqz+HX5NLSFdEzFTBnLWaJUs9C6Y65k1XmbPUM2e5SsxSTdR0iYCxFLe2AKs6l/8HXK32/y5m8HIAAAAASUVORK5CYII=" />',
   '<canvas class="canvas" width="600" height="600"></canvas>'
 ].join("\n");
 
-let test = asyncTest(function*() {
+add_task(function*() {
   yield addTab("data:text/html,markup view copy image as data-uri");
   createDocument();
   let doc = content.document;
 
   let {inspector} = yield openInspector();
 
   yield selectNode("div", inspector);
   yield assertCopyImageDataNotAvailable(inspector);
--- a/browser/devtools/markupview/test/browser_markupview_css_completion_style_attribute.js
+++ b/browser/devtools/markupview/test/browser_markupview_css_completion_style_attribute.js
@@ -58,17 +58,17 @@ const TEST_DATA = [
   ['VK_DOWN', 'style="display:  inherit; color :chartreuse ', 34, 43, true],
   ['VK_RIGHT', 'style="display:  inherit; color :chartreuse ', 43, 43, false],
   [' ', 'style="display:  inherit; color :chartreuse !important; ', 44, 55, true],
   ['!', 'style="display:  inherit; color :chartreuse !important; ', 45, 55, false],
   ['VK_RIGHT', 'style="display:  inherit; color :chartreuse !important; ', 55, 55, false],
   ['VK_RETURN', 'style="display:  inherit; color :chartreuse !important;"', -1, -1, false]
 ];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   info("Opening the inspector on the test URL");
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   yield inspector.markup.expandAll();
 
   let nodeFront = yield getNodeFront("#node14", inspector);
   let container = getContainerForNodeFront(nodeFront, inspector);
   let attr = container.editor.newAttr;
--- a/browser/devtools/markupview/test/browser_markupview_events-overflow.js
+++ b/browser/devtools/markupview/test/browser_markupview_events-overflow.js
@@ -23,17 +23,17 @@ const TEST_DATA = [
     desc: "neither header nor editor overflows the container",
     initialScrollTop: 2,
     headerToClick: 5,
     alignBottom: false,
     alignTop: false,
   },
 ];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let { inspector } = yield addTab(TEST_URL).then(openInspector);
 
   let markupContainer = yield getContainerForSelector("#events", inspector);
   let evHolder = markupContainer.elt.querySelector(".markupview-events");
   let tooltip = inspector.markup.tooltip;
 
   info("Clicking to open event tooltip.");
   EventUtils.synthesizeMouseAtCenter(evHolder, {}, inspector.markup.doc.defaultView);
--- a/browser/devtools/markupview/test/browser_markupview_events.js
+++ b/browser/devtools/markupview/test/browser_markupview_events.js
@@ -149,9 +149,9 @@ const TEST_DATA = [
         handler: 'function boundClickHandler(event) {\n' +
                  '  alert("Bound event clicked");\n' +
                  '}'
       }
     ]
   },
 ];
 
-let test = asyncTest(runEventPopupTests);
+add_task(runEventPopupTests);
--- a/browser/devtools/markupview/test/browser_markupview_events_jquery_1.0.js
+++ b/browser/devtools/markupview/test/browser_markupview_events_jquery_1.0.js
@@ -226,9 +226,9 @@ const TEST_DATA = [
                  "\n" +
                  "  return returnValue;\n" +
                  "}"
       }
     ]
   },
 ];
 
-let test = asyncTest(runEventPopupTests);
+add_task(runEventPopupTests);
--- a/browser/devtools/markupview/test/browser_markupview_events_jquery_1.1.js
+++ b/browser/devtools/markupview/test/browser_markupview_events_jquery_1.1.js
@@ -260,9 +260,9 @@ const TEST_DATA = [
                  "\n" +
                  "  return returnValue;\n" +
                  "}"
       }
     ]
   }
 ];
 
-let test = asyncTest(runEventPopupTests);
+add_task(runEventPopupTests);
--- a/browser/devtools/markupview/test/browser_markupview_events_jquery_1.11.1.js
+++ b/browser/devtools/markupview/test/browser_markupview_events_jquery_1.11.1.js
@@ -184,9 +184,9 @@ const TEST_DATA = [
         handler: "var handler6 = function liveDivDragOver() {\n" +
                  "  alert(6);\n" +
                  "}"
       }
     ]
   },
 ];
 
-let test = asyncTest(runEventPopupTests);
+add_task(runEventPopupTests);
--- a/browser/devtools/markupview/test/browser_markupview_events_jquery_1.2.js
+++ b/browser/devtools/markupview/test/browser_markupview_events_jquery_1.2.js
@@ -179,9 +179,9 @@ const TEST_DATA = [
                  "  val = jQuery.event.handle.apply(element, arguments);\n" +
                  "  return val;\n" +
                  "}"
       }
     ]
   },
 ];
 
-let test = asyncTest(runEventPopupTests);
+add_task(runEventPopupTests);
--- a/browser/devtools/markupview/test/browser_markupview_events_jquery_1.3.js
+++ b/browser/devtools/markupview/test/browser_markupview_events_jquery_1.3.js
@@ -212,9 +212,9 @@ const TEST_DATA = [
         handler: "var handler2 = function liveDivDragStart() {\n" +
                  "  alert(2);\n" +
                  "}"
       }
     ]
   },
 ];
 
-let test = asyncTest(runEventPopupTests);
+add_task(runEventPopupTests);
--- a/browser/devtools/markupview/test/browser_markupview_events_jquery_1.4.js
+++ b/browser/devtools/markupview/test/browser_markupview_events_jquery_1.4.js
@@ -275,9 +275,9 @@ const TEST_DATA = [
                  "  }\n" +
                  "  return b\n" +
                  "}"
       }
     ]
   },
 ];
 
-let test = asyncTest(runEventPopupTests);
+add_task(runEventPopupTests);
--- a/browser/devtools/markupview/test/browser_markupview_events_jquery_1.6.js
+++ b/browser/devtools/markupview/test/browser_markupview_events_jquery_1.6.js
@@ -374,9 +374,9 @@ const TEST_DATA = [
                  "    return b\n" +
                  "  }\n" +
                  "}"
       }
     ]
   },
 ];
 
-let test = asyncTest(runEventPopupTests);
+add_task(runEventPopupTests);
--- a/browser/devtools/markupview/test/browser_markupview_events_jquery_1.7.js
+++ b/browser/devtools/markupview/test/browser_markupview_events_jquery_1.7.js
@@ -220,9 +220,9 @@ const TEST_DATA = [
         handler: "var handler6 = function liveDivDragOver() {\n" +
                  "  alert(6);\n" +
                  "}"
       }
     ]
   },
 ];
 
-let test = asyncTest(runEventPopupTests);
+add_task(runEventPopupTests);
--- a/browser/devtools/markupview/test/browser_markupview_events_jquery_2.1.1.js
+++ b/browser/devtools/markupview/test/browser_markupview_events_jquery_2.1.1.js
@@ -182,9 +182,9 @@ const TEST_DATA = [
         handler: "var handler6 = function liveDivDragOver() {\n" +
                  "  alert(6);\n" +
                  "}"
       }
     ]
   },
 ];
 
-let test = asyncTest(runEventPopupTests);
+add_task(runEventPopupTests);
--- a/browser/devtools/markupview/test/browser_markupview_html_edit_01.js
+++ b/browser/devtools/markupview/test/browser_markupview_html_edit_01.js
@@ -65,13 +65,13 @@ const TEST_DATA = [
 const TEST_URL = "data:text/html," +
   "<!DOCTYPE html>" +
   "<head><meta charset='utf-8' /></head>" +
   "<body>" +
   [outer.oldHTML for (outer of TEST_DATA)].join("\n") +
   "</body>" +
   "</html>";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
   inspector.markup._frame.focus();
   yield runEditOuterHTMLTests(TEST_DATA, inspector);
 });
--- a/browser/devtools/markupview/test/browser_markupview_html_edit_02.js
+++ b/browser/devtools/markupview/test/browser_markupview_html_edit_02.js
@@ -88,13 +88,13 @@ const TEST_DATA = [
 const TEST_URL = "data:text/html," +
   "<!DOCTYPE html>" +
   "<head><meta charset='utf-8' /></head>" +
   "<body>" +
   [outer.oldHTML for (outer of TEST_DATA)].join("\n") +
   "</body>" +
   "</html>";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
   inspector.markup._frame.focus();
   yield runEditOuterHTMLTests(TEST_DATA, inspector);
 });
--- a/browser/devtools/markupview/test/browser_markupview_html_edit_03.js
+++ b/browser/devtools/markupview/test/browser_markupview_html_edit_03.js
@@ -13,17 +13,17 @@ const TEST_URL = "data:text/html," +
   "<body>" +
   "<div id=\"keyboard\"></div>" +
   "</body>" +
   "</html>";
 const SELECTOR = "#keyboard";
 const OLD_HTML = '<div id="keyboard"></div>';
 const NEW_HTML = '<div id="keyboard">Edited</div>';
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   inspector.markup._frame.focus();
 
   info("Checking that pressing escape cancels edits");
   yield testEscapeCancels(inspector);
 
   info("Checking that pressing F2 commits edits");
--- a/browser/devtools/markupview/test/browser_markupview_image_tooltip.js
+++ b/browser/devtools/markupview/test/browser_markupview_image_tooltip.js
@@ -17,17 +17,17 @@ const PAGE_CONTENT = [
 
 const TEST_NODES = [
   {selector: "img.local", size: "192 x 192"},
   {selector: "img.data", size: "64 x 64"},
   {selector: "img.remote", size: "22 x 23"},
   {selector: ".canvas", size: "600 x 600"}
 ];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   yield addTab("data:text/html,markup view tooltip test");
   createPage();
 
   let {inspector} = yield openInspector();
 
   info("Selecting the first <img> tag");
   yield selectNode("img", inspector);
 
--- a/browser/devtools/markupview/test/browser_markupview_mutation_01.js
+++ b/browser/devtools/markupview/test/browser_markupview_mutation_01.js
@@ -141,17 +141,17 @@ const TEST_DATA = [
 
       let node18 = node20Children.childNodes[1];
       is(node18.querySelector(".open .attreditor .attr-value").textContent.trim(),
         "node18", "Node20's second child is indeed node18");
     }
   }
 ];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {toolbox, inspector} = yield addTab(TEST_URL).then(openInspector);
 
   info("Expanding all markup-view nodes");
   yield inspector.markup.expandAll();
 
   for (let {desc, test, check} of TEST_DATA) {
     info("Starting test: " + desc);
 
--- a/browser/devtools/markupview/test/browser_markupview_mutation_02.js
+++ b/browser/devtools/markupview/test/browser_markupview_mutation_02.js
@@ -47,17 +47,17 @@ const TEST_DATA = [{
   }
 }, {
   desc: "Removing an attribute should flash the node",
   mutate: (doc, rootNode) => {
     rootNode.removeAttribute("class");
   }
 }];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   // Make sure mutated nodes flash for a very long time so we can more easily
   // assert they do
   inspector.markup.CONTAINER_FLASHING_DURATION = 1000 * 60 * 60;
 
   info("Getting the <ul.list> root node to test mutations on");
   let rootNode = getNode(".list");
--- a/browser/devtools/markupview/test/browser_markupview_navigation.js
+++ b/browser/devtools/markupview/test/browser_markupview_navigation.js
@@ -63,17 +63,17 @@ const TEST_DATA = [
   ["down", "node10"],
   ["pageup", "node2"],
   ["pageup", "*doctype*"],
   ["down", "html"],
   ["left", "html"],
   ["down", "html"]
 ];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   info("Making sure the markup-view frame is focused");
   inspector.markup._frame.focus();
 
   info("Starting to iterate through the test data");
   for (let [key, className] of TEST_DATA) {
     info("Testing step: " + key + " to navigate to " + className);
--- a/browser/devtools/markupview/test/browser_markupview_node_not_displayed_01.js
+++ b/browser/devtools/markupview/test/browser_markupview_node_not_displayed_01.js
@@ -16,17 +16,17 @@ const TEST_URL = TEST_URL_ROOT + "doc_ma
 const TEST_DATA = [
   {selector: "#normal-div", isDisplayed: true},
   {selector: "head", isDisplayed: false},
   {selector: "#display-none", isDisplayed: false},
   {selector: "#hidden-true", isDisplayed: false},
   {selector: "#visibility-hidden", isDisplayed: true}
 ];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   for (let {selector, isDisplayed} of TEST_DATA) {
     info("Getting node " + selector);
     let nodeFront = yield getNodeFront(selector, inspector);
     let container = getContainerForNodeFront(nodeFront, inspector);
     is(!container.elt.classList.contains("not-displayed"), isDisplayed,
       "The container for " + selector + " is marked as displayed " + isDisplayed);
--- a/browser/devtools/markupview/test/browser_markupview_node_not_displayed_02.js
+++ b/browser/devtools/markupview/test/browser_markupview_node_not_displayed_02.js
@@ -84,17 +84,17 @@ const TEST_DATA = [
       doc.styleSheets[0].insertRule(
         ".a-new-class {display: none;}", 2);
       node.classList.add("a-new-class");
     },
     after: false
   }
 ];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   for (let data of TEST_DATA) {
     info("Running test case: " + data.desc);
     yield runTestData(inspector, data);
   }
 });
 
--- a/browser/devtools/markupview/test/browser_markupview_pagesize_01.js
+++ b/browser/devtools/markupview/test/browser_markupview_pagesize_01.js
@@ -32,17 +32,17 @@ const TEST_DATA = [{
   desc: "Verify childrenDirty reloads the page",
   selector: "#w",
   forceReload: true,
   // But now that we don't already have a loaded page, selecting
   // w should center around w.
   expected: "*more*uvwxy*more*"
 }];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   info("Start iterating through the test data");
   for (let step of TEST_DATA) {
     info("Start test: " + step.desc);
 
     if (step.forceReload) {
       yield forceReload(inspector);
--- a/browser/devtools/markupview/test/browser_markupview_pagesize_02.js
+++ b/browser/devtools/markupview/test/browser_markupview_pagesize_02.js
@@ -8,17 +8,17 @@
 // by the devtools.markup.pagesize preference and that pressing the "show all nodes"
 // actually shows the nodes
 
 const TEST_URL = TEST_URL_ROOT + "doc_markup_pagesize_02.html";
 
 // Make sure nodes are hidden when there are more than 5 in a row
 Services.prefs.setIntPref("devtools.markup.pagesize", 5);
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   info("Selecting the UL node");
   yield clickContainer("ul", inspector);
   info("Reloading the page with the UL node selected will expand its children");
   yield reloadPage(inspector);
   yield inspector.markup._waitForChildren();
 
--- a/browser/devtools/markupview/test/browser_markupview_search_01.js
+++ b/browser/devtools/markupview/test/browser_markupview_search_01.js
@@ -5,17 +5,17 @@
 "use strict";
 
 // Test that searching for nodes using the selector-search input expands and
 // selects the right nodes in the markup-view, even when those nodes are deeply
 // nested (and therefore not attached yet when the markup-view is initialized).
 
 const TEST_URL = TEST_URL_ROOT + "doc_markup_search.html";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector, toolbox} = yield addTab(TEST_URL).then(openInspector);
 
   let container = yield getContainerForSelector("em", inspector);
   ok(!container, "The <em> tag isn't present yet in the markup-view");
 
   // Searching for the innermost element first makes sure that the inspector
   // back-end is able to attach the resulting node to the tree it knows at the
   // moment. When the inspector is started, the <body> is the default selected
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_01.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_01.js
@@ -57,12 +57,12 @@ let TEST_DATA = [{
   name: "id",
   value: 'id="node24" class="""',
   expectedAttributes: {
     id: "node24",
     class: ""
   }
 }];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
   yield runEditAttributesTests(TEST_DATA, inspector);
 });
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_02.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_02.js
@@ -3,17 +3,17 @@
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Tests that an existing attribute can be modified
 
 const TEST_URL = "data:text/html,<div id='test-div'>Test modifying my ID attribute</div>";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   info("Opening the inspector on the test page");
   let {toolbox, inspector} = yield addTab(TEST_URL).then(openInspector);
 
   info("Selecting the test node");
   yield selectNode("#test-div", inspector);
 
   info("Verify attributes, only ID should be there for now");
   assertAttributes("#test-div", {
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_03.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_03.js
@@ -3,17 +3,17 @@
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Tests that a node's tagname can be edited in the markup-view
 
 const TEST_URL = "data:text/html;charset=utf-8,<div id='retag-me'><div id='retag-me-2'></div></div>";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {toolbox, inspector} = yield addTab(TEST_URL).then(openInspector);
 
   yield inspector.markup.expandAll();
 
   info("Selecting the test node");
   let node = content.document.querySelector("#retag-me");
   let child = content.document.querySelector("#retag-me-2");
   yield selectNode("#retag-me", inspector);
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_04.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_04.js
@@ -26,17 +26,17 @@ function* checkDeleteAndSelection(inspec
 
   info("Checking that it's gone, baby gone!");
   ok(!content.document.querySelector(nodeSelector), "The test node does not exist");
 
   yield undoChange(inspector);
   ok(content.document.querySelector(nodeSelector), "The test node is back!");
 }
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   info("Selecting the test node by clicking on it to make sure it receives focus");
 
   yield checkDeleteAndSelection(inspector, "delete", "#first", "#second");
   yield checkDeleteAndSelection(inspector, "delete", "#second", "#third");
   yield checkDeleteAndSelection(inspector, "delete", "#third", "#second");
 
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_05.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_05.js
@@ -66,12 +66,12 @@ let TEST_DATA = [{
 }, {
   desc: "Add attribute with xmlns",
   text: "xmlns:edi='http://ecommerce.example.org/schema'",
   expectedAttributes: {
     'xmlns:edi': "http://ecommerce.example.org/schema"
   }
 }];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
   yield runAddAttributesTests(TEST_DATA, "div", inspector)
 });
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_06.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_06.js
@@ -73,12 +73,12 @@ let TEST_DATA = [{
   desc: "Add event handlers",
   text: "onclick=\"javascript: throw new Error('wont fire');\" onload=\"alert('here');\"",
   expectedAttributes: {
     onclick: "javascript: throw new Error('wont fire');",
     onload: "alert('here');"
   }
 }];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
   yield runAddAttributesTests(TEST_DATA, "div", inspector)
 });
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_07.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_07.js
@@ -69,12 +69,12 @@ let TEST_DATA = [{
   },
   validate: (element, container, inspector) => {
     let editor = container.editor;
     let visibleAttrText = editor.attrs["src"].querySelector(".attr-value").textContent;
     is (visibleAttrText, DATA_URL_ATTRIBUTE_COLLAPSED);
   }
 }];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
   yield runAddAttributesTests(TEST_DATA, "div", inspector)
 });
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_08.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_08.js
@@ -6,17 +6,17 @@
 
 // Test editing various markup-containers' attribute fields, in particular
 // attributes with long values and quotes
 
 const TEST_URL = TEST_URL_ROOT + "doc_markup_edit.html";
 const LONG_ATTRIBUTE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ";
 const LONG_ATTRIBUTE_COLLAPSED = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEF\u2026UVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   yield inspector.markup.expandAll();
   yield testCollapsedLongAttribute(inspector);
   yield testModifyInlineStyleWithQuotes(inspector);
   yield testEditingAttributeWithMixedQuotes(inspector);
 });
 
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_09.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_09.js
@@ -3,17 +3,17 @@
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test that editing a mixed-case attribute preserves the case
 
 const TEST_URL = TEST_URL_ROOT + "doc_markup_svg_attributes.html";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   yield inspector.markup.expandAll();
   yield selectNode("svg", inspector);
 
   yield testWellformedMixedCase(inspector);
   yield testMalformedMixedCase(inspector);
 });
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_10.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_10.js
@@ -3,17 +3,17 @@
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Tests that invalid tagname updates are handled correctly
 
 const TEST_URL = "data:text/html;charset=utf-8,<div></div>";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {toolbox, inspector} = yield addTab(TEST_URL).then(openInspector);
   yield inspector.markup.expandAll();
   yield selectNode("div", inspector);
 
   info("Updating the DIV tagname to an invalid value");
   let container = yield getContainerForSelector("div", inspector);
   let onCancelReselect = inspector.markup.once("canceledreselectonremoved");
   let tagEditor = container.editor.tag;
--- a/browser/devtools/markupview/test/browser_markupview_tag_edit_11.js
+++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_11.js
@@ -4,17 +4,17 @@
 
 "use strict";
 
 // Bug 1090874 - Tests that a node is not recreated when it's tagname editor
 // is blurred and no changes were done.
 
 const TEST_URL = "data:text/html;charset=utf-8,<div></div>";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let isEditTagNameCalled = false;
 
   let {toolbox, inspector} = yield addTab(TEST_URL).then(openInspector);
 
   // Overriding the editTagName walkerActor method here to check that it isn't
   // called when blurring the tagname field.
   inspector.walker.editTagName = function() { isEditTagNameCalled = true; }
 
--- a/browser/devtools/markupview/test/browser_markupview_textcontent_edit_01.js
+++ b/browser/devtools/markupview/test/browser_markupview_textcontent_edit_01.js
@@ -3,17 +3,17 @@
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test editing a node's text content
 
 const TEST_URL = TEST_URL_ROOT + "doc_markup_edit.html";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   info("Expanding all nodes");
   yield inspector.markup.expandAll();
   yield waitForMultipleChildrenUpdates(inspector);
 
   let node = getNode(".node6").firstChild;
   is(node.nodeValue, "line6", "The test node's text content is correct");
--- a/browser/devtools/markupview/test/browser_markupview_toggle_01.js
+++ b/browser/devtools/markupview/test/browser_markupview_toggle_01.js
@@ -3,17 +3,17 @@
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test toggling (expand/collapse) elements by clicking on twisties
 
 const TEST_URL = TEST_URL_ROOT + "doc_markup_toggle.html";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   info("Getting the container for the UL parent element");
   let container = yield getContainerForSelector("ul", inspector);
 
   info("Clicking on the UL parent expander, and waiting for children");
   let onChildren = waitForChildrenUpdated(inspector);
   let onUpdated = inspector.once("inspector-updated");
--- a/browser/devtools/markupview/test/browser_markupview_toggle_02.js
+++ b/browser/devtools/markupview/test/browser_markupview_toggle_02.js
@@ -3,17 +3,17 @@
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test toggling (expand/collapse) elements by dbl-clicking on tag lines
 
 const TEST_URL = TEST_URL_ROOT + "doc_markup_toggle.html";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   info("Getting the container for the UL parent element");
   let container = yield getContainerForSelector("ul", inspector);
 
   info("Dbl-clicking on the UL parent expander, and waiting for children");
   let onChildren = waitForChildrenUpdated(inspector);
   let onUpdated = inspector.once("inspector-updated");
--- a/browser/devtools/markupview/test/browser_markupview_toggle_03.js
+++ b/browser/devtools/markupview/test/browser_markupview_toggle_03.js
@@ -4,17 +4,17 @@
 
 "use strict";
 
 // Test toggling (expand/collapse) elements by alt-clicking on twisties, which
 // should expand all the descendants
 
 const TEST_URL = TEST_URL_ROOT + "doc_markup_toggle.html";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {inspector} = yield addTab(TEST_URL).then(openInspector);
 
   info("Getting the container for the UL parent element");
   let container = yield getContainerForSelector("ul", inspector);
 
   info("Alt-clicking on the UL parent expander, and waiting for children");
   let onUpdated = inspector.once("inspector-updated");
   EventUtils.synthesizeMouseAtCenter(container.expander, {altKey: true},
--- a/browser/devtools/markupview/test/head.js
+++ b/browser/devtools/markupview/test/head.js
@@ -43,23 +43,16 @@ registerCleanupFunction(function*() {
     gBrowser.removeCurrentTab();
   }
 });
 
 const TEST_URL_ROOT = "http://mochi.test:8888/browser/browser/devtools/markupview/test/";
 const CHROME_BASE = "chrome://mochitests/content/browser/browser/devtools/markupview/test/";
 
 /**
- * Define an async test based on a generator function
- */
-function asyncTest(generator) {
-  return () => Task.spawn(generator).then(null, ok.bind(null, false)).then(finish);
-}
-
-/**
  * Add a new test tab in the browser and load the given url.
  * @param {String} url The url to be loaded in the new tab
  * @return a promise that resolves to the tab object when the url is loaded
  */
 function addTab(url) {
   info("Adding a new tab with URL: '" + url + "'");
   let def = promise.defer();
 
--- a/browser/devtools/projecteditor/test/browser_projecteditor_app_options.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_app_options.js
@@ -1,17 +1,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test that options can be changed without resetting the whole
 // editor.
-let test = asyncTest(function*() {
+add_task(function*() {
 
   let TEMP_PATH = buildTempDirectoryStructure();
   let projecteditor = yield addProjectEditorTab();
 
   let resourceBeenAdded = promise.defer();
   projecteditor.project.once("resource-added", () => {
     info ("A resource has been added");
     resourceBeenAdded.resolve();
--- a/browser/devtools/projecteditor/test/browser_projecteditor_confirm_unsaved.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_confirm_unsaved.js
@@ -2,17 +2,17 @@
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 loadHelperScript("helper_edits.js");
 
 // Test that a prompt shows up when requested if a file is unsaved.
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory();
   ok(true, "ProjectEditor has loaded");
 
   let resources = projecteditor.project.allResources();
   yield selectFile(projecteditor, resources[2]);
   let editor = projecteditor.currentEditor;
   let originalText = editor.editor.getText();
 
--- a/browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_01.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_01.js
@@ -1,17 +1,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test that context menus append to the correct document.
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory({
     menubar: false
   });
   ok(projecteditor, "ProjectEditor has loaded");
 
   let contextMenuPopup = projecteditor.document.querySelector("#context-menu-popup");
   let textEditorContextMenuPopup = projecteditor.document.querySelector("#texteditor-context-popup");
   ok (contextMenuPopup, "The menu has loaded in the projecteditor document");
--- a/browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_02.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_02.js
@@ -3,17 +3,17 @@
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 loadHelperScript("helper_edits.js");
 
 // Test context menu enabled / disabled state in editor
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory();
   ok (projecteditor, "ProjectEditor has loaded");
 
   let {textEditorContextMenuPopup} = projecteditor;
 
   let cmdDelete = textEditorContextMenuPopup.querySelector("[command=cmd_delete]");
   let cmdSelectAll = textEditorContextMenuPopup.querySelector("[command=cmd_selectAll]");
   let cmdCut = textEditorContextMenuPopup.querySelector("[command=cmd_cut]");
--- a/browser/devtools/projecteditor/test/browser_projecteditor_delete_file.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_delete_file.js
@@ -1,17 +1,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test tree selection functionality
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory();
   ok(true, "ProjectEditor has loaded");
 
   let root = [...projecteditor.project.allStores()][0].root;
   is(root.path, TEMP_PATH, "The root store is set to the correct temp path.");
   for (let child of root.children) {
     yield deleteWithContextMenu(projecteditor, projecteditor.projectTree.getViewContainer(child));
   }
--- a/browser/devtools/projecteditor/test/browser_projecteditor_editing_01.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_editing_01.js
@@ -9,17 +9,17 @@
 // Whitelisting this test.
 // As part of bug 1077403, the leaking uncaught rejection should be fixed.
 //
 thisTestLeaksUncaughtRejectionsAndShouldBeFixed("destroy");
 
 loadHelperScript("helper_edits.js");
 
 // Test ProjectEditor basic functionality
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory();
   let TEMP_PATH = projecteditor.project.allPaths()[0];
 
   is (getTempFile("").path, TEMP_PATH, "Temp path is set correctly.");
 
   ok (projecteditor.currentEditor, "There is an editor for projecteditor");
   let resources = projecteditor.project.allResources();
 
--- a/browser/devtools/projecteditor/test/browser_projecteditor_editors_image.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_editors_image.js
@@ -9,17 +9,17 @@
 // Whitelisting this test.
 // As part of bug 1077403, the leaking uncaught rejection should be fixed.
 //
 thisTestLeaksUncaughtRejectionsAndShouldBeFixed("destroy");
 
 loadHelperScript("helper_edits.js");
 
 // Test ProjectEditor image editor functionality
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory();
   let TEMP_PATH = projecteditor.project.allPaths()[0];
 
   is (getTempFile("").path, TEMP_PATH, "Temp path is set correctly.");
 
   ok (projecteditor.currentEditor, "There is an editor for projecteditor");
   let resources = projecteditor.project.allResources();
 
--- a/browser/devtools/projecteditor/test/browser_projecteditor_external_change.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_external_change.js
@@ -3,17 +3,17 @@
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 loadHelperScript("helper_edits.js");
 
 // Test ProjectEditor reaction to external changes (made outside of the)
 // editor.
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory();
   let TEMP_PATH = projecteditor.project.allPaths()[0];
 
   is (getTempFile("").path, TEMP_PATH, "Temp path is set correctly.");
 
   ok (projecteditor.currentEditor, "There is an editor for projecteditor");
   let resources = projecteditor.project.allResources();
 
--- a/browser/devtools/projecteditor/test/browser_projecteditor_immediate_destroy.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_immediate_destroy.js
@@ -10,17 +10,17 @@
 // As part of bug 1077403, the leaking uncaught rejection should be fixed.
 //
 thisTestLeaksUncaughtRejectionsAndShouldBeFixed("destroy");
 thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: this.window is null");
 
 // Test that projecteditor can be destroyed in various states of loading
 // without causing any leaks or exceptions.
 
-let test = asyncTest(function* () {
+add_task(function* () {
 
   info ("Testing tab closure when projecteditor is in various states");
   let loaderUrl = "chrome://browser/content/devtools/projecteditor-test.xul";
 
   yield addTab(loaderUrl).then(() => {
     let iframe = content.document.getElementById("projecteditor-iframe");
     ok (iframe, "Tab has placeholder iframe for projecteditor");
 
--- a/browser/devtools/projecteditor/test/browser_projecteditor_menubar_01.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_menubar_01.js
@@ -1,17 +1,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test that menu bar appends to the correct document.
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory({
     menubar: false
   });
   ok(projecteditor, "ProjectEditor has loaded");
 
   let fileMenu = projecteditor.document.getElementById("file-menu");
   let editMenu = projecteditor.document.getElementById("edit-menu");
   ok (fileMenu, "The menu has loaded in the projecteditor document");
--- a/browser/devtools/projecteditor/test/browser_projecteditor_menubar_02.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_menubar_02.js
@@ -3,17 +3,17 @@
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 loadHelperScript("helper_edits.js");
 
 // Test menu bar enabled / disabled state.
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory();
   let menubar = projecteditor.menubar;
 
   // let projecteditor = yield addProjectEditorTabForTempDirectory();
   ok(projecteditor, "ProjectEditor has loaded");
 
   let fileMenu = menubar.querySelector("#file-menu");
   let editMenu = menubar.querySelector("#edit-menu");
--- a/browser/devtools/projecteditor/test/browser_projecteditor_new_file.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_new_file.js
@@ -1,13 +1,13 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test tree selection functionality
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory();
   ok(projecteditor, "ProjectEditor has loaded");
 
 });
\ No newline at end of file
--- a/browser/devtools/projecteditor/test/browser_projecteditor_stores.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_stores.js
@@ -1,16 +1,16 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test ProjectEditor basic functionality
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory();
   let TEMP_PATH = projecteditor.project.allPaths()[0];
   is (getTempFile("").path, TEMP_PATH, "Temp path is set correctly.");
 
   is (projecteditor.project.allPaths().length, 1, "1 path is set");
   projecteditor.project.removeAllStores();
   is (projecteditor.project.allPaths().length, 0, "No paths are remaining");
 });
--- a/browser/devtools/projecteditor/test/browser_projecteditor_tree_selection_01.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_tree_selection_01.js
@@ -1,17 +1,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test tree selection functionality
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory();
   let TEMP_PATH = projecteditor.project.allPaths()[0];
 
   is (getTempFile("").path, TEMP_PATH, "Temp path is set correctly.");
 
   ok (projecteditor.currentEditor, "There is an editor for projecteditor");
   let resources = projecteditor.project.allResources();
 
--- a/browser/devtools/projecteditor/test/browser_projecteditor_tree_selection_02.js
+++ b/browser/devtools/projecteditor/test/browser_projecteditor_tree_selection_02.js
@@ -9,17 +9,17 @@
 // Whitelisting this test.
 // As part of bug 1077403, the leaking uncaught rejection should be fixed.
 //
 thisTestLeaksUncaughtRejectionsAndShouldBeFixed("destroy");
 
 // Test that files get reselected in the tree when their editor
 // is focused.  https://bugzilla.mozilla.org/show_bug.cgi?id=1011116.
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let projecteditor = yield addProjectEditorTabForTempDirectory();
   let TEMP_PATH = projecteditor.project.allPaths()[0];
 
   is (getTempFile("").path, TEMP_PATH, "Temp path is set correctly.");
 
   ok (projecteditor.currentEditor, "There is an editor for projecteditor");
   let resources = projecteditor.project.allResources();
 
--- a/browser/devtools/projecteditor/test/head.js
+++ b/browser/devtools/projecteditor/test/head.js
@@ -42,23 +42,16 @@ registerCleanupFunction(() => {
     dump(ex);
   }
   while (gBrowser.tabs.length > 1) {
     gBrowser.removeCurrentTab();
   }
 });
 
 /**
- * Define an async test based on a generator function
- */
-function asyncTest(generator) {
-  return () => Task.spawn(generator).then(null, ok.bind(null, false)).then(finish);
-}
-
-/**
  * Add a new test tab in the browser and load the given url.
  * @param {String} url The url to be loaded in the new tab
  * @return a promise that resolves to the tab object when the url is loaded
  */
 function addTab(url) {
   info("Adding a new tab with URL: '" + url + "'");
   let def = promise.defer();
 
--- a/browser/devtools/styleeditor/test/browser_styleeditor_fetch-from-cache.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_fetch-from-cache.js
@@ -3,17 +3,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 "use strict";
 
 // A test to ensure Style Editor doesn't bybass cache when loading style sheet
 // contents (bug 978688).
 
 const TEST_URL = TEST_BASE_HTTP + "doc_uncached.html";
 
-let test = asyncTest(function() {
+add_task(function() {
   waitForExplicitFinish();
 
   info("Opening netmonitor");
   let tab = yield addTab("about:blank");
   let target = TargetFactory.forTab(tab);
   let toolbox = yield gDevTools.showToolbox(target, "netmonitor");
   let netmonitor = toolbox.getPanel("netmonitor");
 
--- a/browser/devtools/styleeditor/test/browser_styleeditor_highlight-selector.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_highlight-selector.js
@@ -12,17 +12,17 @@ thisTestLeaksUncaughtRejectionsAndShould
 // Test that hovering over a simple selector in the style-editor requests the
 // highlighting of the corresponding nodes
 
 waitForExplicitFinish();
 
 const TEST_URL = "data:text/html;charset=utf8," +
                  "<style>div{color:red}</style><div>highlighter test</div>";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {UI} = yield addTabAndOpenStyleEditors(1, null, TEST_URL);
   let editor = UI.editors[0];
 
   // Mock the highlighter so we can locally assert that things happened
   // correctly instead of accessing the highlighter elements
   editor.highlighter = {
     isShown: false,
     options: null,
--- a/browser/devtools/styleeditor/test/browser_styleeditor_media_sidebar.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_media_sidebar.js
@@ -8,17 +8,17 @@ const MEDIA_PREF = "devtools.styleeditor
 
 const RESIZE = 300;
 const LABELS = ["not all", "all", "(max-width: 400px)", "(max-width: 600px)"];
 const LINE_NOS = [1, 7, 19, 25];
 const NEW_RULE = "\n@media (max-width: 600px) { div { color: blue; } }";
 
 waitForExplicitFinish();
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {UI} = yield addTabAndOpenStyleEditors(2, null, TESTCASE_URI);
 
   is(UI.editors.length, 2, "correct number of editors");
 
   // Test first plain css editor
   let plainEditor = UI.editors[0];
   yield openEditor(plainEditor);
   testPlainEditor(plainEditor);
--- a/browser/devtools/styleeditor/test/browser_styleeditor_media_sidebar_sourcemaps.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_media_sidebar_sourcemaps.js
@@ -7,17 +7,17 @@ const TESTCASE_URI = TEST_BASE_HTTPS + "
 const MAP_PREF = "devtools.styleeditor.source-maps-enabled";
 
 const LABELS = ["screen and (max-width: 320px)",
                 "screen and (min-width: 1200px)"];
 const LINE_NOS = [5, 8];
 
 waitForExplicitFinish();
 
-let test = asyncTest(function*() {
+add_task(function*() {
   Services.prefs.setBoolPref(MAP_PREF, true);
 
   let {UI} = yield addTabAndOpenStyleEditors(2, null, TESTCASE_URI);
 
   yield listenForMediaChange(UI);
 
   is(UI.editors.length, 1, "correct number of editors");
 
--- a/browser/devtools/styleeditor/test/browser_styleeditor_new.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_new.js
@@ -13,17 +13,17 @@ const TESTCASE_URI = TEST_BASE + "simple
 
 let TESTCASE_CSS_SOURCE = "body{background-color:red;";
 
 let gOriginalHref;
 let gUI;
 
 waitForExplicitFinish();
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let panel = yield addTabAndOpenStyleEditors(2, null, TESTCASE_URI);
   gUI = panel.UI;
 
   let editor = yield createNew();
   testInitialState(editor);
 
   let waitForPropertyChange = onPropertyChange(editor);
 
--- a/browser/devtools/styleeditor/test/browser_styleeditor_sourcemaps.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_sourcemaps.js
@@ -63,17 +63,17 @@ const contents = {
   ].join("\n")
 }
 
 const cssNames = ["sourcemaps.css", "contained.css", "test-stylus.css"];
 const origNames = ["sourcemaps.scss", "contained.scss", "test-stylus.styl"];
 
 waitForExplicitFinish();
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {UI} = yield addTabAndOpenStyleEditors(7, null, TESTCASE_URI);
 
   is(UI.editors.length, 4,
     "correct number of editors with source maps enabled");
 
   // Test first plain css editor
   testFirstEditor(UI.editors[0]);
 
--- a/browser/devtools/styleeditor/test/browser_styleeditor_transition_rule.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_transition_rule.js
@@ -3,17 +3,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const TESTCASE_URI = TEST_BASE_HTTPS + "simple.html";
 
 waitForExplicitFinish();
 
 const NEW_RULE = "body { background-color: purple; }";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let {UI} = yield addTabAndOpenStyleEditors(2, null, TESTCASE_URI);
 
   is(UI.editors.length, 2, "correct number of editors");
 
   let editor = UI.editors[0];
   yield openEditor(editor);
 
   // Set text twice in a row
--- a/browser/devtools/styleeditor/test/browser_styleeditor_xul.js
+++ b/browser/devtools/styleeditor/test/browser_styleeditor_xul.js
@@ -3,17 +3,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Test that the style-editor initializes correctly for XUL windows.
 
 waitForExplicitFinish();
 
 const TEST_URL = "about:config";
 
-let test = asyncTest(function*() {
+add_task(function*() {
   let tab = yield addTab(TEST_URL);
   let target = TargetFactory.forTab(tab);
 
   let toolbox = yield gDevTools.showToolbox(target, "styleeditor");
   let panel = toolbox.getCurrentPanel();
   yield panel.UI.once("editor-added");
 
   ok(panel, "The style-editor panel did initialize correctly for the XUL window");
--- a/browser/devtools/styleeditor/test/head.js
+++ b/browser/devtools/styleeditor/test/head.js
@@ -22,23 +22,16 @@ let testDir = gTestPath.substr(0, gTestP
 Services.scriptloader.loadSubScript(testDir + "../../../commandline/test/helpers.js", this);
 
 gDevTools.testing = true;
 SimpleTest.registerCleanupFunction(() => {
   gDevTools.testing = false;
 });
 
 /**
- * Define an async test based on a generator function
- */
-function asyncTest(generator) {
-  return () => Task.spawn(generator).then(null, ok.bind(null, false)).then(finish);
-}
-
-/**
  * Add a new test tab in the browser and load the given url.
  * @param {String} url The url to be loaded in the new tab
  * @return a promise that resolves to the tab object when the url is loaded
  */
 function addTab(url) {
   info("Adding a new tab with URL: '" + url + "'");
   let def = promise.defer();
 
--- a/browser/devtools/styleinspector/test/head.js
+++ b/browser/devtools/styleinspector/test/head.js
@@ -60,28 +60,28 @@ registerCleanupFunction(() => {
  * add_task(function*() {
  *   yield addTab(TEST_URI);
  *   let {toolbox, inspector, view} = yield openComputedView();
  *
  *   yield selectNode("#test", inspector);
  *   yield someAsyncTestFunction(view);
  * });
  *
- * asyncTest is the way to define the testcase in the test file. It accepts
+ * add_task is the way to define the testcase in the test file. It accepts
  * a single generator-function argument.
  * The generator function should yield any async call.
  *
  * There is no need to clean tabs up at the end of a test as this is done
  * automatically.
  *
  * It is advised not to store any references on the global scope. There shouldn't
- * be a need to anyway. Thanks to asyncTest, test steps, even though asynchronous,
+ * be a need to anyway. Thanks to add_task, test steps, even though asynchronous,
  * can be described in a nice flat way, and if/for/while/... control flow can be
  * used as in sync code, making it possible to write the outline of the test case
- * all in asyncTest, and delegate actual processing and assertions to other
+ * all in add_task, and delegate actual processing and assertions to other
  * functions.
  */
 
 /* *********************************************
  * UTILS
  * *********************************************
  * General test utilities.
  * Add new tabs, open the toolbox and switch to the various panels, select
--- a/browser/devtools/webconsole/test/browser_webconsole_inspect-parsed-documents.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_inspect-parsed-documents.js
@@ -21,13 +21,13 @@ const TEST_CASES = [
     input: '(new DOMParser()).parseFromString("<svg></svg>", "image/svg+xml")',
     output: "SVGDocument",
     inspectable: true,
   },
 ];
 
 const TEST_URI = "data:text/html;charset=utf8," +
   "browser_webconsole_inspect-parsed-documents.js";
-let test = asyncTest(function* () {
+add_task(function* () {
     let {tab} = yield loadTab(TEST_URI);
     let hud = yield openConsole(tab);
     yield checkOutputForInputs(hud, TEST_CASES);
 });
--- a/browser/devtools/webconsole/test/browser_webconsole_output_table.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_output_table.js
@@ -106,17 +106,17 @@ const TEST_DATA = [
     data: [
       { _index: 0, _key: "\"a string\"", _value: "\"value associated with 'a string'\"" },
       { _index: 1, _key: "5", _value: "\"value associated with 5\"" },
     ],
     columns: { _index: "(iteration index)", _key: "Key", _value: "Values" }
   }
 ];
 
-let test = asyncTest(function*() {
+add_task(function*() {
   const {tab} = yield loadTab(TEST_URI);
   let hud = yield openConsole(tab);
 
   for (let testdata of TEST_DATA) {
     hud.jsterm.clearOutput();
 
     info("Executing " + testdata.command);
 
--- a/browser/devtools/webconsole/test/head.js
+++ b/browser/devtools/webconsole/test/head.js
@@ -39,23 +39,16 @@ const GROUP_INDENT = 12;
 const WEBCONSOLE_STRINGS_URI = "chrome://browser/locale/devtools/webconsole.properties";
 let WCU_l10n = new WebConsoleUtils.l10n(WEBCONSOLE_STRINGS_URI);
 
 gDevTools.testing = true;
 SimpleTest.registerCleanupFunction(() => {
   gDevTools.testing = false;
 });
 
-/**
- * Define an async test based on a generator function
- */
-function asyncTest(generator) {
-  return () => Task.spawn(generator).then(null, ok.bind(null, false)).then(finishTest);
-}
-
 function log(aMsg)
 {
   dump("*** WebConsoleTest: " + aMsg + "\n");
 }
 
 function pprint(aObj)
 {
   for (let prop in aObj) {