Bug 1357517 - TelemetrySend crash annotations are controlled by TelemetryEnabled pref on Android, FhrUploadEnabled on other platforms. r=me
authorMarco Castelluccio <mcastelluccio@mozilla.com>
Mon, 31 Jul 2017 15:53:10 +0200
changeset 420778 e0029dcf7b3eb7c1ab8db350c3d2b9fb2feadc3a
parent 420777 bf3ae82e04e69085be7f226b88917f3f36e0677b
child 420779 10de190a839b48b4271d5bcc6272bd68c74c9d81
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1357517
milestone56.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 1357517 - TelemetrySend crash annotations are controlled by TelemetryEnabled pref on Android, FhrUploadEnabled on other platforms. r=me
toolkit/components/telemetry/tests/unit/test_TelemetrySend.js
--- a/toolkit/components/telemetry/tests/unit/test_TelemetrySend.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetrySend.js
@@ -566,21 +566,23 @@ add_task(async function test_pref_observ
       do_register_cleanup(function() {
         MockRegistrar.unregister(gMockCrs);
       });
 
       trigger();
     });
   }
 
-  await waitAnnotateCrashReport(true, () => Services.prefs.setBoolPref(TelemetryUtils.Preferences.TelemetryEnabled, false));
+  const IS_UNIFIED_TELEMETRY = Services.prefs.getBoolPref(TelemetryUtils.Preferences.Unified, false);
+
+  await waitAnnotateCrashReport(IS_UNIFIED_TELEMETRY ? true : false, () => Services.prefs.setBoolPref(TelemetryUtils.Preferences.TelemetryEnabled, false));
 
   await waitAnnotateCrashReport(true, () => Services.prefs.setBoolPref(TelemetryUtils.Preferences.TelemetryEnabled, true));
 
-  await waitAnnotateCrashReport(false, () => Services.prefs.setBoolPref(TelemetryUtils.Preferences.FhrUploadEnabled, false));
+  await waitAnnotateCrashReport(IS_UNIFIED_TELEMETRY ? false : true, () => Services.prefs.setBoolPref(TelemetryUtils.Preferences.FhrUploadEnabled, false));
 
   await waitAnnotateCrashReport(true, () => Services.prefs.setBoolPref(TelemetryUtils.Preferences.FhrUploadEnabled, true));
 
   Services.prefs.setBoolPref(TelemetryUtils.Preferences.TelemetryEnabled, origTelemetryEnabled);
   Services.prefs.setBoolPref(TelemetryUtils.Preferences.FhrUploadEnabled, origFhrUploadEnabled);
 });
 
 add_task(async function cleanup() {