Bug 1475840 - Don't fail browser_preferences_usage.js because browser.startup.record is only accessed on startup. r=florian
authorJohann Hofmann <jhofmann@mozilla.com>
Wed, 29 Aug 2018 05:44:35 +0000
changeset 491512 4e42a6a201f067a107d0bc0e28508dc2585be87f
parent 491511 7edf18c31ee0e0f598cfd2ae9371ba7c3161afcc
child 491513 510decfb443d585f9913e12227764fecaad5ea8d
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1475840
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1475840 - Don't fail browser_preferences_usage.js because browser.startup.record is only accessed on startup. r=florian Differential Revision: https://phabricator.services.mozilla.com/D4327
browser/base/content/test/performance/browser_preferences_usage.js
--- a/browser/base/content/test/performance/browser_preferences_usage.js
+++ b/browser/base/content/test/performance/browser_preferences_usage.js
@@ -45,16 +45,23 @@ function checkPrefGetters(stats, max, wh
       if (whitelistItem.max) {
         Assert.lessOrEqual(count, whitelistItem.max,
           `Whitelist item ${pref} should be accessed at most ${whitelistItem.max} times.`);
       }
       delete whitelist[pref];
     }
   }
 
+  // This pref will be accessed by mozJSComponentLoader when loading modules,
+  // which fails TV runs since they run the test multiple times without restarting.
+  // We just ignore this pref, since it's for testing only anyway.
+  if (whitelist["browser.startup.record"]) {
+    delete whitelist["browser.startup.record"];
+  }
+
   let remainingWhitelist = Object.keys(whitelist);
   is(remainingWhitelist.length, 0, `Should have checked all whitelist items. Remaining: ${remainingWhitelist}`);
 }
 
 /**
  * A helper function to read preference access data
  * using the Services.prefs.readStats() function.
  */