From 2549498db19ddbe85f9e94c99313259d137cbded Mon Sep 17 00:00:00 2001 From: Richard Newman Date: Fri, 18 Oct 2013 17:43:42 -0700 Subject: [PATCH] Bug 925521 - Part 3: follow-up to fix browser tests. r=trivial --- browser/base/content/test/general/browser_aboutHome.js | 2 +- browser/components/search/test/browser_healthreport.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/browser/base/content/test/general/browser_aboutHome.js b/browser/base/content/test/general/browser_aboutHome.js index 85cd863282f..10a268bd153 100644 --- a/browser/base/content/test/general/browser_aboutHome.js +++ b/browser/base/content/test/general/browser_aboutHome.js @@ -486,7 +486,7 @@ function getNumberOfSearches(aEngineName) { let provider = reporter.getProvider("org.mozilla.searches"); ok(provider, "Searches provider is available."); - let m = provider.getMeasurement("counts", 2); + let m = provider.getMeasurement("counts", 3); return m.getValues().then(data => { let now = new Date(); let yday = new Date(now); diff --git a/browser/components/search/test/browser_healthreport.js b/browser/components/search/test/browser_healthreport.js index 0cbe2e88c21..58e55ba21ec 100644 --- a/browser/components/search/test/browser_healthreport.js +++ b/browser/components/search/test/browser_healthreport.js @@ -27,14 +27,15 @@ function test() { ok(reporter, "Health Reporter available."); reporter.onInit().then(function onInit() { let provider = reporter.getProvider("org.mozilla.searches"); - let m = provider.getMeasurement("counts", 2); + let m = provider.getMeasurement("counts", 3); m.getValues().then(function onData(data) { let now = new Date(); let oldCount = 0; - // Foo engine goes into "other" bucket. - let field = "other.searchbar"; + // Find the right bucket for the "Foo" engine. + let engine = Services.search.getEngineByName("Foo"); + let field = (engine.identifier || "other-Foo") + ".searchbar"; if (data.days.hasDay(now)) { let day = data.days.getDay(now);