Bug 1501041 - Fix browser_UsageTelemetry_content*.js to consistently fail if there is an issue with the navigation event probe, and disable them due to current expiry. r=adw

Differential Revision: https://phabricator.services.mozilla.com/D10070

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mark Banner 2018-10-29 18:48:52 +00:00
parent 08a80deaa6
commit 3df3ea0b86
3 changed files with 12 additions and 0 deletions

View File

@ -50,5 +50,7 @@ support-files =
usageTelemetrySearchSuggestions.sjs
usageTelemetrySearchSuggestions.xml
[browser_UsageTelemetry_content.js]
disabled = bug 1496764 - Telemetry probe needs extension
[browser_UsageTelemetry_content_aboutHome.js]
disabled = bug 1496764 - Telemetry probe needs extension
[browser_UsageTelemetry_content_aboutRestartRequired.js]

View File

@ -27,6 +27,10 @@ add_task(async function setup() {
["dom.select_events.enabled", true], // We want select events to be fired.
]});
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
// Enable event recording for the events tested here.
Services.telemetry.setEventRecordingEnabled("navigation", true);
@ -37,6 +41,7 @@ add_task(async function setup() {
Services.search.removeEngine(engineOneOff);
await PlacesUtils.history.clear();
Services.telemetry.setEventRecordingEnabled("navigation", false);
Services.telemetry.canRecordExtended = oldCanRecord;
});
});

View File

@ -27,6 +27,10 @@ add_task(async function setup() {
let engineOneOff = Services.search.getEngineByName("MozSearch2");
Services.search.moveEngine(engineOneOff, 0);
// Enable local telemetry recording for the duration of the tests.
let oldCanRecord = Services.telemetry.canRecordExtended;
Services.telemetry.canRecordExtended = true;
// Enable event recording for the events tested here.
Services.telemetry.setEventRecordingEnabled("navigation", true);
@ -37,6 +41,7 @@ add_task(async function setup() {
Services.search.removeEngine(engineOneOff);
await PlacesUtils.history.clear();
Services.telemetry.setEventRecordingEnabled("navigation", false);
Services.telemetry.canRecordExtended = oldCanRecord;
});
});