Bug 1449170 - Remove old-event-emitter usage from responsive.html; r=jryans.
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Tue, 27 Mar 2018 15:46:41 +0200
changeset 775175 3f37287132bff08037b75b07e5485fcaa29ee886
parent 775174 336801376f35e2410f27d1f4fb1dc9bc90584e9a
child 775176 b7fa9d95150ec24e3c8d11106153f76be4507356
child 775330 94637505ced6855eff5ff9c2da4a97e57212a45f
push id104638
push userbmo:jlorenzo@mozilla.com
push dateFri, 30 Mar 2018 13:27:33 +0000
reviewersjryans
bugs1449170
milestone61.0a1
Bug 1449170 - Remove old-event-emitter usage from responsive.html; r=jryans. MozReview-Commit-ID: KREEQYpIVh6
devtools/client/responsive.html/manager.js
devtools/client/responsive.html/test/browser/head.js
devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js
--- a/devtools/client/responsive.html/manager.js
+++ b/devtools/client/responsive.html/manager.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const { Ci } = require("chrome");
 const promise = require("promise");
 const Services = require("Services");
-const EventEmitter = require("devtools/shared/old-event-emitter");
+const EventEmitter = require("devtools/shared/event-emitter");
 
 const TOOL_URL = "chrome://devtools/content/responsive.html/index.xhtml";
 
 loader.lazyRequireGetter(this, "DebuggerClient", "devtools/shared/client/debugger-client", true);
 loader.lazyRequireGetter(this, "DebuggerServer", "devtools/server/main", true);
 loader.lazyRequireGetter(this, "throttlingProfiles", "devtools/client/shared/network-throttling-profiles");
 loader.lazyRequireGetter(this, "swapToInnerBrowser", "devtools/client/responsive.html/browser/swap", true);
 loader.lazyRequireGetter(this, "startup", "devtools/client/responsive.html/utils/window", true);
--- a/devtools/client/responsive.html/test/browser/head.js
+++ b/devtools/client/responsive.html/test/browser/head.js
@@ -143,17 +143,17 @@ function waitForViewportResizeTo(ui, wid
     }
 
     // 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
     // hang forever. See bug 1302879.
     let browser = ui.getViewportBrowser();
 
-    let onResize = (_, data) => {
+    let onResize = data => {
       if (!isSizeMatching(data)) {
         return;
       }
       ui.off("content-resize", onResize);
       browser.removeEventListener("mozbrowserloadend", onBrowserLoadEnd);
       info(`Got content-resize to ${width} x ${height}`);
       resolve();
     };
--- a/devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js
+++ b/devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js
@@ -96,17 +96,17 @@ function doFinalChecks(editor) {
      "The width condition should now be unmatched");
   ok(conditions[3].classList.contains("media-condition-unmatched"),
      "The height condition should now be unmatched");
 }
 
 /* Helpers */
 function waitForResizeTo(rdmUI, type, value) {
   return new Promise(resolve => {
-    let onResize = (_, data) => {
+    let onResize = data => {
       if (data[type] != value) {
         return;
       }
       rdmUI.off("content-resize", onResize);
       info(`Got content-resize to a ${type} of ${value}`);
       resolve();
     };
     info(`Waiting for content-resize to a ${type} of ${value}`);