Bug 1449072: Stop modifying mtime after install. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Mon, 26 Mar 2018 23:36:09 -0700
changeset 773010 02b24582926bdf59611679461ee571daecb035f1
parent 773009 42994ae6cd77a4c6cd5c4448894424d89d3306d8
push id104097
push usermaglione.k@gmail.com
push dateTue, 27 Mar 2018 06:36:31 +0000
reviewersaswan
bugs1449072
milestone61.0a1
Bug 1449072: Stop modifying mtime after install. r?aswan It makes no sense for bootstrapped installs (and little-to-no sense for bootstrapped installs), and causes intermittent test failures when it causes the add-on manager to detect the add-on as changed during startup and throw away metadata like the sourceURI. MozReview-Commit-ID: K8Tf2YQ6JMO
toolkit/mozapps/extensions/test/xpcshell/test_install.js
toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
--- a/toolkit/mozapps/extensions/test/xpcshell/test_install.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install.js
@@ -206,25 +206,19 @@ add_task(async function test_1() {
     try {
       ok(zipReader.hasEntry(uri.JAREntry));
     } finally {
       zipReader.close();
     }
   } else {
     let iconFile = uri.QueryInterface(Ci.nsIFileURL).file;
     ok(iconFile.exists());
-    // Make the iconFile predictably old.
-    iconFile.lastModifiedTime = Date.now() - MAKE_FILE_OLD_DIFFERENCE;
   }
 
-  // Make the pending install have a sensible date
   let updateDate = Date.now();
-  let extURI = addon.getResourceURI("");
-  let ext = extURI.QueryInterface(Ci.nsIFileURL).file;
-  setExtensionModifiedTime(ext, updateDate);
 
   ok(!hasFlag(addon.permissions, AddonManager.PERM_CAN_ENABLE));
   ok(hasFlag(addon.permissions, AddonManager.PERM_CAN_DISABLE));
 
   await promiseRestartManager();
 
   activeInstalls = await AddonManager.getAllInstalls();
   equal(activeInstalls, 0);
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
@@ -178,17 +178,16 @@ tags = blocklist
 [test_gfxBlacklist_prefs.js]
 # Bug 1248787 - consistently fails
 skip-if = true
 tags = blocklist
 [test_gmpProvider.js]
 skip-if = appname != "firefox"
 [test_harness.js]
 [test_install.js]
-skip-if = os == 'win' # Too frequent intermittent failures
 [test_install_from_sources.js]
 [test_install_icons.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 [test_invalid_install_rdf.js]
 [test_isDebuggable.js]
 [test_isReady.js]
 [test_json_updatecheck.js]