Bug 1604190 - don't needlessly cross-import between the mozmill.jsm and init.jsm. r=bustage-fix
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Tue, 17 Dec 2019 15:48:31 +0200
changeset 37765 e83883bc47e7c91905c56cf5fcebf0284ff20b95
parent 37764 69b26858a2598926d9a8cad4b499b34a19250520
child 37766 680552a461aa0285eb83fe9d9ef2ffa9ddae471c
push id397
push userclokep@gmail.com
push dateMon, 10 Feb 2020 21:16:13 +0000
reviewersbustage-fix
bugs1604190
Bug 1604190 - don't needlessly cross-import between the mozmill.jsm and init.jsm. r=bustage-fix Try: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=49ec9d993f638d2491f09bd1f34494a472ef2dc9
mail/test/resources/mozmill/mozmill/extension/content/modules/init.jsm
--- a/mail/test/resources/mozmill/mozmill/extension/content/modules/init.jsm
+++ b/mail/test/resources/mozmill/mozmill/extension/content/modules/init.jsm
@@ -32,26 +32,24 @@
  * 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 = ["mozmill"];
+var EXPORTED_SYMBOLS = [];
 
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 const controller = ChromeUtils.import(
   "resource://testing-common/mozmill/controller.jsm"
 );
-const mozmill = ChromeUtils.import(
-  "resource://testing-common/mozmill/mozmill.jsm"
-);
+
 const utils = ChromeUtils.import("resource://testing-common/mozmill/utils.jsm");
 
 // Observer when a new top-level window is ready
 var windowReadyObserver = {
   observe(subject, topic, data) {
     attachEventListeners(subject);
   },
 };
@@ -94,17 +92,17 @@ function attachEventListeners(aWindow) {
       aWindow.gBrowser.addEventListener(
         "DOMContentLoaded",
         function(event) {
           var doc = event.originalTarget;
 
           var errorRegex = /about:.+(error)|(blocked)\?/;
           if (errorRegex.exec(doc.baseURI)) {
             // Wait about 1s to be sure the DOM is ready
-            mozmill.utils.sleep(1000);
+            utils.sleep(1000);
 
             // Only update the flag if we have a document as target
             if ("defaultView" in doc) {
               var id = utils.getWindowId(doc.defaultView);
               controller.windowMap.update(id, "loaded", true);
               // dump("*** load event: " + id + ", " + doc.location + ", baseURI=" + doc.baseURI + "\n");
             }
           }