Bug 1285903 - Force one content process for browser_use_counters.js because the test doesn't work if different tabs load in different processes. r=gabor

This commit is contained in:
Blake Kaplan 2016-07-20 14:28:00 +02:00
Родитель ea69125244
Коммит 2c5580d8a2
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -11,7 +11,12 @@ const gHttpTestRoot = "http://example.com/browser/dom/base/test/";
*/
var gOldContentCanRecord = false;
add_task(function* test_initialize() {
gOldContentCanRecord = yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
// Because canRecordExtended is a per-process variable, we need to make sure
// that all of the pages load in the same content process. Limit the number
// of content processes to at most 1 (or 0 if e10s is off entirely).
yield SpecialPowers.pushPrefEnv({ set: [[ "dom.ipc.processCount", 1 ]] });
gOldContentCanRecord = yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
let telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
let old = telemetry.canRecordExtended;
telemetry.canRecordExtended = true;