Bug 611177: Intermittent failure in xpcshell/test_bootstrap.js and xpcshell-unpack/test_bootstrap.js. r=robstrong, a=tests
authorDave Townsend <dtownsend@oxymoronical.com>
Tue, 08 Mar 2011 09:50:13 -0800
changeset 63355 acdd32f121999b26e0554cfdef5f01c59ed4c269
parent 63354 bf2db29072f48f8f267a929cba518ce37d76f0dc
child 63356 53f4bee0bc1192c9a0d95fe72ba7f7675a28f47b
push idunknown
push userunknown
push dateunknown
reviewersrobstrong, tests
bugs611177
milestone2.0b13pre
Bug 611177: Intermittent failure in xpcshell/test_bootstrap.js and xpcshell-unpack/test_bootstrap.js. r=robstrong, a=tests
toolkit/mozapps/extensions/test/xpcshell/head_addons.js
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -600,19 +600,21 @@ function writeInstallRDFForExtension(aDa
  * the extension contains only the install.rdf file.
  *
  * @param aExt   a file pointing to either the packed extension or its unpacked directory.
  * @param aTime  the time to which we set the lastModifiedTime of the extension
  */
 function setExtensionModifiedTime(aExt, aTime) {
   aExt.lastModifiedTime = aTime;
   if (aExt.isDirectory()) {
-    aExt = aExt.clone();
-    aExt.append("install.rdf");
-    aExt.lastModifiedTime = aTime;
+    let entries = aExt.directoryEntries
+                      .QueryInterface(AM_Ci.nsIDirectoryEnumerator);
+    while (entries.hasMoreElements())
+      setExtensionModifiedTime(entries.nextFile, aTime);
+    entries.close();
   }
 }
 
 function registerDirectory(aKey, aDir) {
   var dirProvider = {
     getFile: function(aProp, aPersistent) {
       aPersistent.value = true;
       if (aProp == aKey)