Bug 1305777 - Clean up tests that supported both RDMs. r=ochameau draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 26 Sep 2017 18:54:14 -0500
changeset 670858 045ef4322933fe06eebac40b91917ed1e91e533a
parent 670857 2a189b584414daaf8df2eb5971f894f88a97b674
child 733338 98af2b819f414d308c084d1d1c712a41578d6e07
push id81741
push userbmo:jryans@gmail.com
push dateWed, 27 Sep 2017 00:07:01 +0000
reviewersochameau
bugs1305777
milestone58.0a1
Bug 1305777 - Clean up tests that supported both RDMs. r=ochameau MozReview-Commit-ID: 4coCvC4KHtn
devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js
--- a/devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js
+++ b/devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js
@@ -100,30 +100,22 @@ function doFinalChecks(editor) {
 
 /* Helpers */
 function waitForResizeTo(rdmUI, type, value) {
   return new Promise(resolve => {
     let onResize = (_, data) => {
       if (data[type] != value) {
         return;
       }
-      ResponsiveUIManager.off("content-resize", onResize);
-      if (rdmUI.off) {
-        rdmUI.off("content-resize", onResize);
-      }
+      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}`);
-    // Old RDM emits on manager
-    ResponsiveUIManager.on("content-resize", onResize);
-    // New RDM emits on ui
-    if (rdmUI.on) {
-      rdmUI.on("content-resize", onResize);
-    }
+    rdmUI.on("content-resize", onResize);
   });
 }
 
 function* getSizing(rdmUI) {
   let browser = rdmUI.getViewportBrowser();
   let sizing = yield ContentTask.spawn(browser, {}, function* () {
     return {
       width: content.innerWidth,