Bug 1617887 - part4 - stop exporting mozmill.utils. r=khushil
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Sat, 07 Mar 2020 11:56:54 +0200
changeset 37498 db70bd44f6e258f9b753efb40a056e6138ddc9b9
parent 37497 d5f2f34c0d013bd9cc5ca804a71fd44f73aa7b5d
child 37499 fb950872cc0f0eec24900ac6c45e767c0ed72307
push id2566
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:20:31 +0000
treeherdercomm-beta@a352facfa0a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhushil
bugs1617887
Bug 1617887 - part4 - stop exporting mozmill.utils. r=khushil
calendar/test/modules/CalendarUtils.jsm
mail/test/browser/shared-modules/mozmill.jsm
mail/test/browser/shared-modules/utils.jsm
--- a/calendar/test/modules/CalendarUtils.jsm
+++ b/calendar/test/modules/CalendarUtils.jsm
@@ -305,23 +305,23 @@ function goToDate(controller, year, mont
 async function invokeEventDialog(mainWindowController, clickBox, body) {
   if (clickBox) {
     mainWindowController.waitForElement(clickBox);
     mainWindowController.doubleClick(clickBox, 1, 1);
   }
 
   mainWindowController.waitFor(
     () => {
-      return mozmill.utils.getWindows("Calendar:EventDialog").length > 0;
+      return utils.getWindows("Calendar:EventDialog").length > 0;
     },
     "event-dialog did not load in time",
     MID_SLEEP
   );
 
-  let eventWindow = mozmill.utils.getWindows("Calendar:EventDialog")[0];
+  let eventWindow = utils.getWindows("Calendar:EventDialog")[0];
   let eventController = new controller.MozMillController(eventWindow);
   let iframe = eventController.window.document.getElementById("lightning-item-panel-iframe");
 
   eventController.waitFor(
     () => {
       return iframe.contentWindow.onLoad && iframe.contentWindow.onLoad.hasLoaded;
     },
     "event-dialog did not load in time",
@@ -330,17 +330,17 @@ async function invokeEventDialog(mainWin
 
   // We can't use a full mozmill controller on an iframe, but we need
   // something for helpersForController.
   let mockIframeController = { window: iframe.contentWindow };
 
   await body(eventController, mockIframeController);
 
   // Wait for close.
-  mainWindowController.waitFor(() => mozmill.utils.getWindows("Calendar:EventDialog").length == 0);
+  mainWindowController.waitFor(() => utils.getWindows("Calendar:EventDialog").length == 0);
 }
 
 /**
  * Gets the path for an event box.
  *
  * @param controller    main window controller
  * @param view          day, week, multiweek or month
  * @param option        CANVAS_BOX or ALLDAY for creating event, EVENT_BOX for existing event
@@ -464,17 +464,17 @@ function viewBack(controller, n) {
   }
   ensureViewLoaded(controller);
 }
 
 /**
  * Closes all EventDialogs that may remain open after a failed test
  */
 function closeAllEventDialogs() {
-  for (let win of mozmill.utils.getWindows("Calendar:EventDialog")) {
+  for (let win of utils.getWindows("Calendar:EventDialog")) {
     close_window(win);
   }
 }
 
 /**
  * Deletes all calendars with given name.
  *
  * @param controller    Mozmill window controller
--- a/mail/test/browser/shared-modules/mozmill.jsm
+++ b/mail/test/browser/shared-modules/mozmill.jsm
@@ -31,17 +31,17 @@
 // use your version of this file under the terms of the MPL, indicate your
 // decision by deleting the provisions above and replace them with the notice
 // and other provisions required by the GPL or the LGPL. If you do not delete
 // the provisions above, a recipient may use your version of this file under
 // the terms of any one of the MPL, the GPL or the LGPL.
 //
 // ***** END LICENSE BLOCK *****
 
-var EXPORTED_SYMBOLS = ["utils", "getMail3PaneController"];
+var EXPORTED_SYMBOLS = ["getMail3PaneController"];
 
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 ChromeUtils.import("resource://testing-common/mozmill/init.jsm");
 var controller = ChromeUtils.import(
   "resource://testing-common/mozmill/controller.jsm"
 );
 var utils = ChromeUtils.import("resource://testing-common/mozmill/utils.jsm");
--- a/mail/test/browser/shared-modules/utils.jsm
+++ b/mail/test/browser/shared-modules/utils.jsm
@@ -124,17 +124,17 @@ function getWindowId(aWindow) {
   } catch (e) {
     // ... but for observer notifications we need another interface
     return aWindow.QueryInterface(Ci.nsISupportsPRUint64).data;
   }
 }
 
 function tempfile(appention) {
   if (appention == undefined) {
-    appention = "mozmill.utils.tempfile";
+    appention = "utils.tempfile";
   }
   var tempfile = Services.dirsvc.get("TmpD", Ci.nsIFile);
   tempfile.append(
     uuidgen
       .generateUUID()
       .toString()
       .replace("-", "")
       .replace("{", "")