Bug 1704671 - Expect a TRR mode change from undefined to 0 after restarting DoHController. r=valentin

Some of the changes in bug 1626083 result in a more deterministic flow that uncovers a race
and an incorrect underlying assumption in the test.

The underlying assumption is that clearing mode on shutdown is disabled in tests, which is false - it's enabled.
The race is that we assume that the mode is already 0 and try to ensure it doesn't change, whereas it actually
starts empty (undefined) and changes to 0, because of the incorrect underlying assumption.

This mistake only exists in browser_cleanFlow.js, the other tests are correctly waiting for the final TRR mode
without trying to ensure no change.

Differential Revision: https://phabricator.services.mozilla.com/D114592
This commit is contained in:
Nihanth Subramanya 2021-05-09 19:10:41 +00:00
Родитель 716d7cd80b
Коммит 2c5afd4214
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -62,7 +62,8 @@ add_task(async function testCleanFlow() {
// Restart the controller for good measure.
await restartDoHController();
ensureNoTRRSelectionTelemetry();
await ensureNoTRRModeChange(0);
// The mode technically changes from undefined/empty to 0 here.
await ensureTRRMode(0);
await checkHeuristicsTelemetry("disable_doh", "startup");
// Set a passing environment and simulate a network change.