Bug 1585162 - follow-up: Fix MozMill initialisation for running tests locally on Windows. r=jorgk
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 03 Oct 2019 22:59:22 +1300
changeset 37062 de5d9afa75a37c95bb6118cfdd168efea0b1e3fe
parent 37061 7cd8521f4423f9c5c86aa03ab58ef73960737352
child 37063 744faf96603152d6b844286171955eb066bcddf0
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
reviewersjorgk
bugs1585162
Bug 1585162 - follow-up: Fix MozMill initialisation for running tests locally on Windows. r=jorgk
mail/test/resources/mozmill/mozmill/extension/bootstrap.js
mail/test/resources/mozmill/setup.py
--- a/mail/test/resources/mozmill/mozmill/extension/bootstrap.js
+++ b/mail/test/resources/mozmill/mozmill/extension/bootstrap.js
@@ -15,21 +15,26 @@ function uninstall() {}
 function startup(data, reason) {
   let env = Cc["@mozilla.org/process/environment;1"].getService(
     Ci.nsIEnvironment
   );
   let protocolHandler = Services.io
     .getProtocolHandler("resource")
     .QueryInterface(Ci.nsIResProtocolHandler);
 
-  let modulesFile = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
-  modulesFile.initWithPath(env.get("TESTING_MODULES_DIR"));
+  let modulesPath = env.get("TESTING_MODULES_DIR");
+  if (Services.appinfo.OS == "WINNT") {
+    modulesPath = modulesPath.replace(/\//g, "\\");
+  }
+
+  let modulesDir = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
+  modulesDir.initWithPath(modulesPath);
   protocolHandler.setSubstitution(
     "testing-common",
-    Services.io.newFileURI(modulesFile)
+    Services.io.newFileURI(modulesDir)
   );
 
   loadDefaultPrefs();
 
   ExtensionSupport.registerWindowListener(data.id, {
     chromeURLs: ["chrome://messenger/content/messenger.xul"],
     onLoadWindow: setupUI,
   });
--- a/mail/test/resources/mozmill/setup.py
+++ b/mail/test/resources/mozmill/setup.py
@@ -36,17 +36,17 @@
 # ***** END LICENSE BLOCK *****
 
 from setuptools import setup, find_packages
 
 desc = """UI Automation tool for Mozilla applications."""
 summ = """A tool for full UI automation of Mozilla applications."""
 
 PACKAGE_NAME = "mozmill_thunderbird"
-PACKAGE_VERSION = "1.7"
+PACKAGE_VERSION = "1.7.1"
 
 setup(name=PACKAGE_NAME,
       version=PACKAGE_VERSION,
       description=desc,
       long_description=summ,
       author='Mozilla, Mikeal Rogers',
       author_email='mikeal.rogers@gmail.com',
       url='http://github.com/mozautomation/mozmill',