Backed out 2 changesets (bug 1690105) for causing bc failures in browser_rollback.js
CLOSED TREE Backed out changeset f6fbf6487e6d (bug 1690105) Backed out changeset c2d171d79b6d (bug 1690105)
This commit is contained in:
@@ -8,8 +8,6 @@ head = head.js
|
||||
[browser_NextDNSMigration.js]
|
||||
[browser_policyOverride.js]
|
||||
[browser_providerSteering.js]
|
||||
[browser_remoteSettings_newProfile.js]
|
||||
[browser_remoteSettings_rollout.js]
|
||||
[browser_rollback.js]
|
||||
[browser_trrMode_migration.js]
|
||||
[browser_trrSelect.js]
|
||||
|
||||
@@ -17,7 +17,7 @@ add_task(async function testCleanFlow() {
|
||||
is(Preferences.get(prefs.BREADCRUMB_PREF), true, "Breadcrumb saved.");
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/dns-query",
|
||||
"https://dummytrr.com/query",
|
||||
"TRR selection complete."
|
||||
);
|
||||
await checkTRRSelectionTelemetry();
|
||||
|
||||
@@ -17,7 +17,7 @@ add_task(async function testDoorhangerUserReject() {
|
||||
is(Preferences.get(prefs.BREADCRUMB_PREF), true, "Breadcrumb saved.");
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/dns-query",
|
||||
"https://dummytrr.com/query",
|
||||
"TRR selection complete."
|
||||
);
|
||||
await checkTRRSelectionTelemetry();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"use strict";
|
||||
|
||||
const TEST_DOMAIN = "doh.test.";
|
||||
const AUTO_TRR_URI = "https://example.com/dns-query";
|
||||
const AUTO_TRR_URI = "https://dummytrr.com/query";
|
||||
|
||||
add_task(setup);
|
||||
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
add_task(setup);
|
||||
add_task(setupRegion);
|
||||
|
||||
add_task(async function testNewProfile() {
|
||||
is(
|
||||
DoHConfigController.currentConfig.enabled,
|
||||
false,
|
||||
"Rollout should not be enabled"
|
||||
);
|
||||
|
||||
let provider1 = {
|
||||
id: "provider1",
|
||||
uri: "https://example.org/1",
|
||||
autoDefault: true,
|
||||
};
|
||||
let provider2 = {
|
||||
id: "provider2",
|
||||
uri: "https://example.org/2",
|
||||
canonicalName: "https://example.org/cname",
|
||||
};
|
||||
let provider3 = {
|
||||
id: "provider3",
|
||||
uri: "https://example.org/3",
|
||||
autoDefault: true,
|
||||
};
|
||||
|
||||
await DoHTestUtils.loadRemoteSettingsProviders([
|
||||
provider1,
|
||||
provider2,
|
||||
provider3,
|
||||
]);
|
||||
|
||||
await DoHTestUtils.loadRemoteSettingsConfig({
|
||||
id: kTestRegion.toLowerCase(),
|
||||
rolloutEnabled: true,
|
||||
providers: "provider1, provider3",
|
||||
steeringEnabled: true,
|
||||
steeringProviders: "provider2",
|
||||
autoDefaultEnabled: true,
|
||||
autoDefaultProviders: "provider1, provider3",
|
||||
});
|
||||
|
||||
is(
|
||||
DoHConfigController.currentConfig.enabled,
|
||||
true,
|
||||
"Rollout should be enabled"
|
||||
);
|
||||
await ensureTRRMode(2);
|
||||
Assert.deepEqual(
|
||||
DoHConfigController.currentConfig.providerList,
|
||||
[provider1, provider3],
|
||||
"Provider list should be loaded"
|
||||
);
|
||||
is(
|
||||
DoHConfigController.currentConfig.providerSteering.enabled,
|
||||
true,
|
||||
"Steering should be enabled"
|
||||
);
|
||||
Assert.deepEqual(
|
||||
DoHConfigController.currentConfig.providerSteering.providerList,
|
||||
[provider2],
|
||||
"Steering provider list should be loaded"
|
||||
);
|
||||
is(
|
||||
DoHConfigController.currentConfig.trrSelection.enabled,
|
||||
true,
|
||||
"TRR Selection should be enabled"
|
||||
);
|
||||
Assert.deepEqual(
|
||||
DoHConfigController.currentConfig.trrSelection.providerList,
|
||||
[provider1, provider3],
|
||||
"TRR Selection provider list should be loaded"
|
||||
);
|
||||
is(
|
||||
DoHConfigController.currentConfig.fallbackProviderURI,
|
||||
provider1.uri,
|
||||
"Fallback provider URI should be that of the first one"
|
||||
);
|
||||
|
||||
await DoHTestUtils.resetRemoteSettingsConfig();
|
||||
|
||||
is(
|
||||
DoHConfigController.currentConfig.enabled,
|
||||
false,
|
||||
"Rollout should be disabled"
|
||||
);
|
||||
await ensureTRRMode(undefined);
|
||||
});
|
||||
@@ -1,69 +0,0 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
add_task(setup);
|
||||
add_task(setupRegion);
|
||||
|
||||
add_task(async function testPrefFirstRollout() {
|
||||
setPassingHeuristics();
|
||||
|
||||
is(
|
||||
DoHConfigController.currentConfig.enabled,
|
||||
false,
|
||||
"Rollout should not be enabled"
|
||||
);
|
||||
|
||||
let configFlushedPromise = DoHTestUtils.waitForConfigFlush();
|
||||
Preferences.set(`${kRegionalPrefNamespace}.enabled`, true);
|
||||
await configFlushedPromise;
|
||||
|
||||
is(
|
||||
DoHConfigController.currentConfig.enabled,
|
||||
true,
|
||||
"Rollout should be enabled"
|
||||
);
|
||||
await ensureTRRMode(2);
|
||||
|
||||
await DoHTestUtils.loadRemoteSettingsProviders([
|
||||
{
|
||||
id: "provider1",
|
||||
uri: "https://example.org/1",
|
||||
autoDefault: true,
|
||||
},
|
||||
]);
|
||||
|
||||
await DoHTestUtils.loadRemoteSettingsConfig({
|
||||
id: kTestRegion.toLowerCase(),
|
||||
rolloutEnabled: true,
|
||||
providers: "provider1",
|
||||
});
|
||||
|
||||
is(
|
||||
DoHConfigController.currentConfig.enabled,
|
||||
true,
|
||||
"Rollout should still be enabled"
|
||||
);
|
||||
|
||||
let configUpdatedPromise = DoHTestUtils.waitForConfigUpdate();
|
||||
Preferences.reset(`${kRegionalPrefNamespace}.enabled`);
|
||||
await configUpdatedPromise;
|
||||
|
||||
is(
|
||||
DoHConfigController.currentConfig.enabled,
|
||||
true,
|
||||
"Rollout should still be enabled"
|
||||
);
|
||||
await ensureTRRMode(2);
|
||||
|
||||
await DoHTestUtils.resetRemoteSettingsConfig();
|
||||
|
||||
is(
|
||||
DoHConfigController.currentConfig.enabled,
|
||||
false,
|
||||
"Rollout should not be enabled"
|
||||
);
|
||||
await ensureTRRMode(undefined);
|
||||
});
|
||||
@@ -19,7 +19,7 @@ add_task(async function testRollback() {
|
||||
is(Preferences.get(prefs.BREADCRUMB_PREF), true, "Breadcrumb saved.");
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/dns-query",
|
||||
"https://dummytrr.com/query",
|
||||
"TRR selection complete."
|
||||
);
|
||||
await checkTRRSelectionTelemetry();
|
||||
|
||||
@@ -7,6 +7,20 @@
|
||||
add_task(setup);
|
||||
|
||||
add_task(async function testTRRSelect() {
|
||||
// Set up the resolver lists in the default and user pref branches.
|
||||
// dummyTRR3 which only exists in the user-branch value should be ignored.
|
||||
let oldResolverList = Services.prefs.getCharPref("network.trr.resolvers");
|
||||
Services.prefs
|
||||
.getDefaultBranch("")
|
||||
.setCharPref(
|
||||
"network.trr.resolvers",
|
||||
`[{"url": "https://dummytrr.com/query"}, {"url": "https://dummytrr2.com/query"}]`
|
||||
);
|
||||
Services.prefs.setCharPref(
|
||||
"network.trr.resolvers",
|
||||
`[{"url": "https://dummytrr.com/query"}, {"url": "https://dummytrr2.com/query"}, {"url": "https://dummytrr3.com/query"}]`
|
||||
);
|
||||
|
||||
// Clean start: doh-rollout.uri should be set after init.
|
||||
setPassingHeuristics();
|
||||
let prefPromise = TestUtils.waitForPrefChange(prefs.BREADCRUMB_PREF);
|
||||
@@ -15,7 +29,7 @@ add_task(async function testTRRSelect() {
|
||||
is(Preferences.get(prefs.BREADCRUMB_PREF), true, "Breadcrumb saved.");
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/dns-query",
|
||||
"https://dummytrr.com/query",
|
||||
"TRR selection complete."
|
||||
);
|
||||
|
||||
@@ -32,7 +46,7 @@ add_task(async function testTRRSelect() {
|
||||
await prefPromise;
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/dns-query",
|
||||
"https://dummytrr.com/query",
|
||||
"TRR selection complete."
|
||||
);
|
||||
|
||||
@@ -40,17 +54,13 @@ add_task(async function testTRRSelect() {
|
||||
await ensureTRRMode(2);
|
||||
await checkHeuristicsTelemetry("enable_doh", "startup");
|
||||
|
||||
// Disable committing and reset. The committed URI should be reset to the
|
||||
// default provider and the dry-run-result should persist.
|
||||
// Disable committing and reset. The committed URI should be cleared but the
|
||||
// dry-run-result should persist.
|
||||
Preferences.set(prefs.TRR_SELECT_COMMIT_PREF, false);
|
||||
prefPromise = TestUtils.waitForPrefChange(prefs.TRR_SELECT_URI_PREF);
|
||||
await restartDoHController();
|
||||
await prefPromise;
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/1",
|
||||
"Default TRR selected."
|
||||
);
|
||||
ok(!Preferences.isSet(prefs.TRR_SELECT_URI_PREF), "TRR selection cleared.");
|
||||
try {
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
return !Preferences.isSet(prefs.TRR_SELECT_DRY_RUN_RESULT_PREF);
|
||||
@@ -61,7 +71,7 @@ add_task(async function testTRRSelect() {
|
||||
}
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_DRY_RUN_RESULT_PREF),
|
||||
"https://example.com/dns-query",
|
||||
"https://dummytrr.com/query",
|
||||
"dry-run result has the correct value."
|
||||
);
|
||||
|
||||
@@ -76,23 +86,15 @@ add_task(async function testTRRSelect() {
|
||||
await restartDoHController();
|
||||
try {
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
return (
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF) ==
|
||||
"https://example.com/dns-query"
|
||||
);
|
||||
return Preferences.get(prefs.TRR_SELECT_URI_PREF);
|
||||
});
|
||||
ok(false, "Dry run result got committed, fail!");
|
||||
} catch (e) {
|
||||
ok(true, "Dry run result did not get committed");
|
||||
}
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/1",
|
||||
"Default TRR selected."
|
||||
);
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_DRY_RUN_RESULT_PREF),
|
||||
"https://example.com/dns-query",
|
||||
"https://dummytrr.com/query",
|
||||
"TRR selection complete, dry-run result recorded."
|
||||
);
|
||||
Preferences.set(prefs.TRR_SELECT_COMMIT_PREF, true);
|
||||
@@ -106,17 +108,14 @@ add_task(async function testTRRSelect() {
|
||||
Preferences.reset(prefs.TRR_SELECT_URI_PREF);
|
||||
Preferences.set(
|
||||
prefs.TRR_SELECT_DRY_RUN_RESULT_PREF,
|
||||
"https://example.com/2"
|
||||
);
|
||||
prefPromise = TestUtils.waitForPrefChange(
|
||||
prefs.TRR_SELECT_URI_PREF,
|
||||
newVal => newVal == "https://example.com/2"
|
||||
"https://dummytrr2.com/query"
|
||||
);
|
||||
prefPromise = TestUtils.waitForPrefChange(prefs.TRR_SELECT_URI_PREF);
|
||||
await restartDoHController();
|
||||
await prefPromise;
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/2",
|
||||
"https://dummytrr2.com/query",
|
||||
"TRR selection complete, existing dry-run-result committed."
|
||||
);
|
||||
|
||||
@@ -129,18 +128,23 @@ add_task(async function testTRRSelect() {
|
||||
Preferences.reset(prefs.TRR_SELECT_URI_PREF);
|
||||
Preferences.set(
|
||||
prefs.TRR_SELECT_DRY_RUN_RESULT_PREF,
|
||||
"https://example.com/4"
|
||||
"https://dummytrr3.com/query"
|
||||
);
|
||||
prefPromise = TestUtils.waitForPrefChange(prefs.TRR_SELECT_URI_PREF);
|
||||
await restartDoHController();
|
||||
await prefPromise;
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/dns-query",
|
||||
"https://dummytrr.com/query",
|
||||
"TRR selection complete, existing dry-run-result discarded and refreshed."
|
||||
);
|
||||
|
||||
// Wait for heuristics to complete.
|
||||
await ensureTRRMode(2);
|
||||
await checkHeuristicsTelemetry("enable_doh", "startup");
|
||||
|
||||
Services.prefs
|
||||
.getDefaultBranch("")
|
||||
.setCharPref("network.trr.resolvers", oldResolverList);
|
||||
Services.prefs.clearUserPref("network.trr.resolvers");
|
||||
});
|
||||
|
||||
@@ -23,8 +23,8 @@ add_task(async function testTrrSelectionDisable() {
|
||||
);
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/1",
|
||||
"doh-rollout.uri set to first provider in the list."
|
||||
undefined,
|
||||
"doh-rollout.uri remained unset."
|
||||
);
|
||||
ensureNoTRRSelectionTelemetry();
|
||||
|
||||
@@ -62,8 +62,8 @@ add_task(async function testTrrSelectionDisable() {
|
||||
);
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/1",
|
||||
"doh-rollout.uri set to first provider in the list."
|
||||
undefined,
|
||||
"doh-rollout.uri remained unset."
|
||||
);
|
||||
await ensureTRRMode(2);
|
||||
await checkHeuristicsTelemetry("enable_doh", "startup");
|
||||
|
||||
@@ -17,7 +17,7 @@ add_task(async function testUserInterference() {
|
||||
is(Preferences.get(prefs.BREADCRUMB_PREF), true, "Breadcrumb saved.");
|
||||
is(
|
||||
Preferences.get(prefs.TRR_SELECT_URI_PREF),
|
||||
"https://example.com/dns-query",
|
||||
"https://dummytrr.com/query",
|
||||
"TRR selection complete."
|
||||
);
|
||||
await checkTRRSelectionTelemetry();
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
ASRouter: "resource://activity-stream/lib/ASRouter.jsm",
|
||||
DoHController: "resource:///modules/DoHController.jsm",
|
||||
DoHConfigController: "resource:///modules/DoHConfig.jsm",
|
||||
DoHTestUtils: "resource://testing-common/DoHTestUtils.jsm",
|
||||
Preferences: "resource://gre/modules/Preferences.jsm",
|
||||
Region: "resource://gre/modules/Region.jsm",
|
||||
RegionTestUtils: "resource://testing-common/RegionTestUtils.jsm",
|
||||
RemoteSettings: "resource://services-settings/remote-settings.js",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"ASRouter",
|
||||
"resource://activity-stream/lib/ASRouter.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"DoHController",
|
||||
"resource:///modules/DoHController.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"Preferences",
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
this,
|
||||
@@ -45,7 +52,6 @@ const prefs = {
|
||||
FIRST_RUN_PREF: "doh-rollout.doneFirstRun",
|
||||
BALROG_MIGRATION_PREF: "doh-rollout.balrog-migration-done",
|
||||
PREVIOUS_TRR_MODE_PREF: "doh-rollout.previous.trr.mode",
|
||||
PROVIDER_LIST_PREF: "doh-rollout.provider-list",
|
||||
TRR_SELECT_ENABLED_PREF: "doh-rollout.trr-selection.enabled",
|
||||
TRR_SELECT_URI_PREF: "doh-rollout.uri",
|
||||
TRR_SELECT_COMMIT_PREF: "doh-rollout.trr-selection.commit-result",
|
||||
@@ -68,8 +74,6 @@ const CFR_JSON = {
|
||||
};
|
||||
|
||||
async function setup() {
|
||||
await DoHController._uninit();
|
||||
await DoHConfigController._uninit();
|
||||
SpecialPowers.pushPrefEnv({
|
||||
set: [["security.notification_enable_delay", 0]],
|
||||
});
|
||||
@@ -124,13 +128,6 @@ async function setup() {
|
||||
// Global canary
|
||||
gDNSOverride.addIPOverride("use-application-dns.net.", "4.1.1.1");
|
||||
|
||||
await DoHTestUtils.resetRemoteSettingsConfig(false);
|
||||
|
||||
await DoHConfigController.init();
|
||||
await DoHController.init();
|
||||
|
||||
await waitForStateTelemetry(["rollback"]);
|
||||
|
||||
registerCleanupFunction(async () => {
|
||||
Services.telemetry.canRecordExtended = oldCanRecord;
|
||||
Services.telemetry.clearEvents();
|
||||
@@ -144,23 +141,10 @@ async function setup() {
|
||||
await DoHController._uninit();
|
||||
Services.telemetry.clearEvents();
|
||||
Preferences.reset(Object.values(prefs));
|
||||
await DoHTestUtils.resetRemoteSettingsConfig(false);
|
||||
await DoHController.init();
|
||||
});
|
||||
}
|
||||
|
||||
const kTestRegion = "DE";
|
||||
const kRegionalPrefNamespace = `doh-rollout.${kTestRegion.toLowerCase()}`;
|
||||
|
||||
async function setupRegion() {
|
||||
Region._home = null;
|
||||
RegionTestUtils.setNetworkRegion(kTestRegion);
|
||||
await Region._fetchRegion();
|
||||
is(Region.home, kTestRegion, "Should have correct region");
|
||||
Preferences.reset("doh-rollout.home-region");
|
||||
await DoHConfigController.loadRegion();
|
||||
}
|
||||
|
||||
async function checkTRRSelectionTelemetry() {
|
||||
let events;
|
||||
await TestUtils.waitForCondition(() => {
|
||||
@@ -178,7 +162,7 @@ async function checkTRRSelectionTelemetry() {
|
||||
is(events.length, 1, "Found the expected trrselect event.");
|
||||
is(
|
||||
events[0][4],
|
||||
"https://example.com/dns-query",
|
||||
"https://dummytrr.com/query",
|
||||
"The event records the expected decision"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ const { TestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/TestUtils.jsm"
|
||||
);
|
||||
|
||||
let h2Port, trrServer1, trrServer2, trrList;
|
||||
let h2Port, trrServer1, trrServer2;
|
||||
let DNSLookup, LookupAggregator, TRRRacer;
|
||||
|
||||
function readFile(file) {
|
||||
@@ -63,7 +63,6 @@ function setup() {
|
||||
// use the h2 server as DOH provider
|
||||
trrServer1 = `https://foo.example.com:${h2Port}/doh?responseIP=1.1.1.1`;
|
||||
trrServer2 = `https://foo.example.com:${h2Port}/doh?responseIP=2.2.2.2`;
|
||||
trrList = [trrServer1, trrServer2];
|
||||
// make all native resolve calls "secretly" resolve localhost instead
|
||||
Services.prefs.setBoolPref("network.dns.native-is-localhost", true);
|
||||
|
||||
@@ -86,6 +85,16 @@ function setup() {
|
||||
"firefox-dns-perf-test.net."
|
||||
);
|
||||
|
||||
let defaultPrefBranch = Services.prefs.getDefaultBranch("");
|
||||
let origResolverList = defaultPrefBranch.getCharPref("network.trr.resolvers");
|
||||
|
||||
Services.prefs
|
||||
.getDefaultBranch("")
|
||||
.setCharPref(
|
||||
"network.trr.resolvers",
|
||||
`[{"url": "${trrServer1}"}, {"url": "${trrServer2}"}]`
|
||||
);
|
||||
|
||||
let TRRPerformance = ChromeUtils.import(
|
||||
"resource:///modules/TRRPerformance.jsm"
|
||||
);
|
||||
@@ -101,6 +110,7 @@ function setup() {
|
||||
Services.prefs.clearUserPref("network.http.spdy.enabled");
|
||||
Services.prefs.clearUserPref("network.http.spdy.enabled.http2");
|
||||
Services.prefs.clearUserPref("network.dns.native-is-localhost");
|
||||
defaultPrefBranch.setCharPref("network.trr.resolvers", origResolverList);
|
||||
|
||||
Services.telemetry.canRecordExtended = oldCanRecord;
|
||||
});
|
||||
|
||||
@@ -13,7 +13,7 @@ async function helper_SuccessfulLookupAggregator(
|
||||
captivePortal = false
|
||||
) {
|
||||
let deferred = PromiseUtils.defer();
|
||||
let aggregator = new LookupAggregator(() => deferred.resolve(), trrList);
|
||||
let aggregator = new LookupAggregator(() => deferred.resolve());
|
||||
// The aggregator's domain list should correctly reflect our set
|
||||
// prefs for number of random subdomains (2) and the list of
|
||||
// popular domains.
|
||||
@@ -124,7 +124,7 @@ add_task(async function test_SuccessfulLookupAggregator() {
|
||||
|
||||
add_task(async function test_AbortedLookupAggregator() {
|
||||
let deferred = PromiseUtils.defer();
|
||||
let aggregator = new LookupAggregator(() => deferred.resolve(), trrList);
|
||||
let aggregator = new LookupAggregator(() => deferred.resolve());
|
||||
// The aggregator's domain list should correctly reflect our set
|
||||
// prefs for number of random subdomains (2) and the list of
|
||||
// popular domains.
|
||||
|
||||
@@ -11,7 +11,7 @@ add_task(async function test_TRRRacer_cleanRun() {
|
||||
let racer = new TRRRacer(() => {
|
||||
deferred.resolve();
|
||||
deferred.resolved = true;
|
||||
}, trrList);
|
||||
});
|
||||
racer.run();
|
||||
|
||||
await deferred.promise;
|
||||
@@ -60,7 +60,7 @@ async function test_TRRRacer_networkFlux_helper(captivePortal = false) {
|
||||
let racer = new TRRRacer(() => {
|
||||
deferred.resolve();
|
||||
deferred.resolved = true;
|
||||
}, trrList);
|
||||
});
|
||||
racer.run();
|
||||
|
||||
if (captivePortal) {
|
||||
@@ -109,7 +109,7 @@ async function test_TRRRacer_maxRetries_helper(captivePortal = false) {
|
||||
let racer = new TRRRacer(() => {
|
||||
deferred.resolve();
|
||||
deferred.resolved = true;
|
||||
}, trrList);
|
||||
});
|
||||
racer.run();
|
||||
info("ran new racer");
|
||||
// Start at i = 1 since we're already at retry #1.
|
||||
@@ -179,7 +179,7 @@ add_task(async function test_TRRRacer_getFastestTRRFromResults() {
|
||||
{ trr: "trr5", time: 20 },
|
||||
{ trr: "trr5", time: 1000 },
|
||||
];
|
||||
let racer = new TRRRacer(undefined, trrList);
|
||||
let racer = new TRRRacer();
|
||||
let fastest = racer._getFastestTRRFromResults(results);
|
||||
// trr1's geometric mean is 100
|
||||
// trr2's geometric mean is 110
|
||||
|
||||
Reference in New Issue
Block a user