diff --git a/calendar/test/modules/CalendarUtils.jsm b/calendar/test/modules/CalendarUtils.jsm index 8411b35a82..b9a0357b00 100755 --- a/calendar/test/modules/CalendarUtils.jsm +++ b/calendar/test/modules/CalendarUtils.jsm @@ -49,6 +49,7 @@ this.EXPORTED_SYMBOLS = [ var elementslib = ChromeUtils.import("resource://testing-common/mozmill/elementslib.jsm"); var mozmill = ChromeUtils.import("resource://testing-common/mozmill/mozmill.jsm"); var utils = ChromeUtils.import("resource://testing-common/mozmill/utils.jsm"); +var controller = ChromeUtils.import("resource://testing-common/mozmill/controller.jsm"); var { close_pref_tab, open_pref_tab } = ChromeUtils.import( "resource://testing-common/mozmill/PrefTabHelpers.jsm" @@ -297,17 +298,17 @@ function goToDate(controller, year, month, day) { * Opens the event dialog by clicking on the (optional) box and executing the * body. The event dialog must be closed in the body function. * - * @param controller Main window controller + * @param mainWindowController - Main window controller * @param clickBox The box to click on, or null if no box to click on. * @param body The function to execute while the event dialog is open. */ -async function invokeEventDialog(controller, clickBox, body) { +async function invokeEventDialog(mainWindowController, clickBox, body) { if (clickBox) { - controller.waitForElement(clickBox); - controller.doubleClick(clickBox, 1, 1); + mainWindowController.waitForElement(clickBox); + mainWindowController.doubleClick(clickBox, 1, 1); } - controller.waitFor( + mainWindowController.waitFor( () => { return mozmill.utils.getWindows("Calendar:EventDialog").length > 0; }, @@ -316,7 +317,7 @@ async function invokeEventDialog(controller, clickBox, body) { ); let eventWindow = mozmill.utils.getWindows("Calendar:EventDialog")[0]; - let eventController = new mozmill.controller.MozMillController(eventWindow); + let eventController = new controller.MozMillController(eventWindow); let iframe = eventController.window.document.getElementById("lightning-item-panel-iframe"); eventController.waitFor( @@ -334,7 +335,7 @@ async function invokeEventDialog(controller, clickBox, body) { await body(eventController, mockIframeController); // Wait for close. - controller.waitFor(() => mozmill.utils.getWindows("Calendar:EventDialog").length == 0); + mainWindowController.waitFor(() => mozmill.utils.getWindows("Calendar:EventDialog").length == 0); } /** diff --git a/mail/test/browser/session-store/browser_sessionStore.js b/mail/test/browser/session-store/browser_sessionStore.js index ced86e77d9..ce490cef99 100644 --- a/mail/test/browser/session-store/browser_sessionStore.js +++ b/mail/test/browser/session-store/browser_sessionStore.js @@ -209,7 +209,7 @@ function test_restore_single_3pane_persistence() { let abwc = openAddressBook(); // close the 3pane window - close_window(new mozmill.controller.MozMillController(mail3PaneWindow)); + close_window(new controller.MozMillController(mail3PaneWindow)); // Wait for window close async session write to finish. controller.sleep(asyncFileWriteDelayMS); @@ -278,7 +278,7 @@ add_task(function test_message_pane_height_persistence() { let abwc = openAddressBook(); // The 3pane window is closed. - close_window(new mozmill.controller.MozMillController(mail3PaneWindow)); + close_window(new controller.MozMillController(mail3PaneWindow)); // Wait for window close async session write to finish. controller.sleep(asyncFileWriteDelayMS); @@ -386,7 +386,7 @@ add_task(function test_message_pane_width_persistence() { let abwc = openAddressBook(); // The 3pane window is closed. - close_window(new mozmill.controller.MozMillController(mail3PaneWindow)); + close_window(new controller.MozMillController(mail3PaneWindow)); // Wait for window close async session write to finish. controller.sleep(asyncFileWriteDelayMS); @@ -541,7 +541,7 @@ add_task(function test_clean_shutdown_session_persistence_simple() { lastWindowState = window.getWindowStateForSessionPersistence(); } - close_window(new mozmill.controller.MozMillController(window)); + close_window(new controller.MozMillController(window)); } // Wait for session file to be created (removed in prior test) after diff --git a/mail/test/browser/shared-modules/mozmill.jsm b/mail/test/browser/shared-modules/mozmill.jsm index f0663492e8..22d1b8fef2 100644 --- a/mail/test/browser/shared-modules/mozmill.jsm +++ b/mail/test/browser/shared-modules/mozmill.jsm @@ -36,7 +36,7 @@ // // ***** END LICENSE BLOCK ***** -var EXPORTED_SYMBOLS = ["controller", "utils", "getMail3PaneController"]; +var EXPORTED_SYMBOLS = ["utils", "getMail3PaneController"]; const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");