Bug 1403037 - Don't test attribution data in applications that don't use it. r=Dexter, a=test-only DEVEDITION_57_0b9_RELEASE FENNEC_57_0b9_BUILD1 FENNEC_57_0b9_RELEASE FIREFOX_57_0b9_BUILD1 FIREFOX_57_0b9_RELEASE
authorMatt Howell <mhowell@mozilla.com>
Mon, 25 Sep 2017 19:39:58 -0700
changeset 432553 4b93f26c85540a41eeef07e1116770e47b78e104
parent 432552 51ee30adc28a355a9516a8a83c255d6b6ebf4bc1
child 432554 6e834c377cddc19d3c8afc45d87edeecc29e7843
push id7985
push userryanvm@gmail.com
push dateMon, 16 Oct 2017 18:51:29 +0000
treeherdermozilla-beta@4b93f26c8554 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersDexter, test-only
bugs1403037
milestone57.0
Bug 1403037 - Don't test attribution data in applications that don't use it. r=Dexter, a=test-only MozReview-Commit-ID: Giy2ZRlMVa2
toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ -445,17 +445,17 @@ function checkSettingsSection(data) {
   Assert.equal(typeof update.autoDownload, "boolean");
 
   // Check "defaultSearchEngine" separately, as it can either be undefined or string.
   if ("defaultSearchEngine" in data.settings) {
     checkString(data.settings.defaultSearchEngine);
     Assert.equal(typeof data.settings.defaultSearchEngineData, "object");
   }
 
-  if (gIsWindows) {
+  if (gIsWindows && AppConstants.MOZ_BUILD_APP == "browser") {
     Assert.equal(typeof data.settings.attribution, "object");
     Assert.equal(data.settings.attribution.source, "google.com");
   }
 }
 
 function checkProfileSection(data) {
   Assert.ok("profile" in data, "There must be a profile section in Environment.");
   Assert.equal(data.profile.creationDate, truncateToDays(PROFILE_CREATION_DATE_MS));