Commit Graph

58 Commits

Author SHA1 Message Date
Nihanth Subramanya
c74861512f Bug 1734542 - [DoH] In steering detection, replace references to the provider's "name" property with "id" instead. r=necko-reviewers,valentin
The name property that existed back when providers were defined in a JSON blob pref
is no longer included in the Remote Settings provider records. This means that
null-checking the property effectively suppresses the steering feature for our
current Remote Settings config. This patch changes `name` to `id` which RS records
DO include.

Differential Revision: https://phabricator.services.mozilla.com/D127927
2021-10-11 23:24:21 +00:00
Geoff Brown
a00c449c2d Bug 1730213 - Explicitly skip tests under browser/ on android; r=ahal
These tests are excluded from android test runs in moz.build. Including
an explicit annotation in each manifest avoids scheduling confusion.
browser-chrome and plain-chrome tests in browser/ are of no concern,
since those test types are never scheduled on android.

Differential Revision: https://phabricator.services.mozilla.com/D125266
2021-09-13 15:22:27 +00:00
Nihanth Subramanya
377aee9853 Bug 1719851 - Allow default-branch regional pref values in DoH Config. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D119516
2021-07-09 17:09:03 +00:00
Nihanth Subramanya
9bf83194d0 Bug 1714486 - [DoH] Allow pref values to override Remote Settings. r=necko-reviewers,jaws,dragana
Differential Revision: https://phabricator.services.mozilla.com/D116798
2021-06-23 23:28:16 +00:00
Dorel Luca
c0d5cda63d Backed out 2 changesets (bug 1713036, bug 1714486) for XPCshell failures in netwerk/test/unit/test_trr.js. CLOSED TREE
Backed out changeset 06c40198b074 (bug 1713036)
Backed out changeset 41800e77c675 (bug 1714486)
2021-06-23 23:02:46 +03:00
Nihanth Subramanya
2031dd08e4 Bug 1714486 - [DoH] Allow pref values to override Remote Settings. r=necko-reviewers,jaws,dragana
Differential Revision: https://phabricator.services.mozilla.com/D116798
2021-06-23 15:24:01 +00:00
Cosmin Sabou
cb3fbb9a1f Backed out 3 changesets (bug 1714486, bug 1713036) for xpcshell failures on test_trr.js. CLOSED TREE
Backed out changeset 5161c4f25f80 (bug 1713036)
Backed out changeset 6ce07df62710 (bug 1713036)
Backed out changeset c824fe9b4adb (bug 1714486)
2021-06-23 08:00:36 +03:00
Nihanth Subramanya
2c72a2f1e1 Bug 1713036 - Fix some test failures. a=fix
CLOSED TREE

Ensure we only remove the DoH config update observer once in the connection dialog code.
await resetPrefs when cleaning up in the dialog test - it's an async function.
Don't forget to reset the regional pref in browser_remoteSettings_newProfile.js
Use the new default provider pref in test_trr_confirmation.js
2021-06-23 06:51:54 +03:00
Nihanth Subramanya
162c9ee540 Bug 1714486 - [DoH] Allow pref values to override Remote Settings. r=necko-reviewers,jaws,dragana
Differential Revision: https://phabricator.services.mozilla.com/D116798
2021-06-23 02:29:18 +00:00
Nihanth Subramanya
82f2c23967 Bug 1690105 - Implement RemoteSettings client in DoHConfig.jsm for provider and config data collections. r=dragana,preferences-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D103714
2021-05-29 23:36:45 +00:00
Alexandru Michis
628ce9a6dd 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)
2021-05-29 00:29:23 +03:00
Nihanth Subramanya
19add3141b Bug 1690105 - Implement RemoteSettings client in DoHConfig.jsm for provider and config data collections. r=dragana,preferences-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D103714
2021-05-28 11:28:40 +00:00
Csoregi Natalia
00af23a280 Backed out 2 changesets (bug 1690105) for failures on browser_remoteSettings_rollout.js. CLOSED TREE
Backed out changeset 656fd67b37fb (bug 1690105)
Backed out changeset 9e61ccce8c00 (bug 1690105)
2021-05-28 13:35:15 +03:00
Nihanth Subramanya
11bb89d6b0 Bug 1690105 - Implement RemoteSettings client in DoHConfig.jsm for provider and config data collections. r=dragana,preferences-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D103714
2021-05-27 22:30:25 +00:00
Nihanth Subramanya
639a8be8af 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
2021-05-09 19:10:41 +00:00
Dorel Luca
d97f63d64a Backed out changeset 9467c8b26103 (bug 1704671) for Browser-chrome failures in browser/components/doh/test/browser/browser_cleanFlow.js. CLOSED TREE 2021-05-07 18:18:47 +03:00
Nihanth Subramanya
9621ed6bd1 Bug 1704671 - Expect a TRR mode change from 0 to 2 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 2 and try to ensure it doesn't change, whereas it actually
starts at 0 and changes to 2, 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
2021-05-07 14:22:31 +00:00
Nihanth Subramanya
db1e6bc9f8 Bug 1626083 - Rate-limit DoH heuristics runs. r=necko-reviewers,johannh,dragana
This prevents clients on volatile networks from running heuristics repeatedly,
which has two consequences: performance hit due to the DNS lookups performed by
heuristics, as well as flooding telemetry since we record an event each time.

With this patch, when a heuristics run is first triggered, we run it as usual
but start a timer in the background. Any runs triggered before the timer fires
are coalesced into a count. When the timer fires, if the count exceeded a limit,
we restart the timer and also the count. If the count was within the limit, we
run heuristics just once if it was triggered at least once while throttling.

To make this testable deterministically, I had to make a few subtle changes,
e.g. to not await calls to runHeuristics.

I also took the opportunity to replace BrowserTestUtils.waitForCondition with
the more canonical copy that lives in TestUtils, and to put the confirmationNS
pref into the prefs object so it doesn't need to be explicitly cleaned up.

Differential Revision: https://phabricator.services.mozilla.com/D110358
2021-04-12 16:48:42 +00:00
Nihanth Subramanya
8af2f914c0 Bug 1704158 - [DoH] Turn on provider steering by default. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D111464
2021-04-12 08:00:53 +00:00
Nihanth Subramanya
b93b678023 Bug 1703989 - Add unit test for DoH parental controls heuristic. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D111352
2021-04-09 11:25:58 +00:00
Valentin Gosu
086f34b47e Bug 1658278 - Split TRR's CONFIRM_TRYING into CONFIRM_TRYING_OK and CONFIRM_TRYING_FAILED r=necko-reviewers,nhnt11,dragana,preferences-reviewers
- Adds CONFIRM_TRYING_FAILED confirmation state. We use this state when we retry confirmation after confirmation fails.
- Rename CONFIRM_TRYING to CONFIRM_TRYING_OK. We use this state when we try confirmation but no confirmation failure has happened.
- Rename CONFIRM_INIT to CONFIRM_OFF. We use this state whenever there is an event that would disable TRR - such as a TRR mode change.
- Add CONFIRM_DISABLED confirmation state. We use this state in mode3 or when confirmationNS=="skip"
- To potentially allow us to have the same behaviour as after Bug 1689113, specifically the we might be able to report TRRService::Enabled = true when retrying and the state is CONFIRM_TRYING_FAILED we added `network.trr.attempt-when-retrying-confirmation`
- After a large number of TRR failures occurs, we immediately trigger another confirmation and go into CONFIRM_TRYING_OK. This allows us to cope with a temporary increase in network latency that is smaller than 6s.
- We no longer trigger confirmation for nsIRequest::TRR_FIRST_MODE when the resolver mode is not TRR_FIRST. This allows us to simplify the code.
- test_trr_proxy.js now calls trr_test_setup() after it sets up the pac script to avoid confirmation causing non-local connections in tests.
- Moves all the confirmation state handing into HandleConfirmationEvent

Differential Revision: https://phabricator.services.mozilla.com/D107666
2021-03-19 17:51:26 +00:00
Nihanth Subramanya
ccd9db9859 Bug 1693527 - When migrating old TRR mode, don't clear network.trr.mode if its value is 5. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D105625
2021-02-18 14:34:03 +00:00
Nihanth Subramanya
222a631782 Bug 1668104 - [DoH] Set clearModeOnShutdown pref value explicitly in tests. r=valentin
Depends on D91827

Differential Revision: https://phabricator.services.mozilla.com/D92747
2020-10-07 11:23:00 +00:00
Nihanth Subramanya
57e1b450bd Bug 1662430 - Allow a pref to toggle whether to clear doh-rollout.mode at shutdown. r=valentin,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D90856
2020-09-24 18:06:37 +00:00
Razvan Maries
c141744ed8 Backed out changeset bb81093f7e32 (bug 1662430) for perma failures on browser_rollback.js, browser_connection_dnsoverhttps.js and browser_policyOverride.js. CLOSED TREE 2020-09-24 20:57:28 +03:00
Nihanth Subramanya
e77ebbcea4 Bug 1662430 - Allow a pref to toggle whether to clear doh-rollout.mode at shutdown. r=valentin,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D90856
2020-09-24 12:09:52 +00:00
Dorel Luca
f6e46379cc Backed out changeset fccbbed6fc57 (bug 1662430) for Browser-chrome failures in preferences/tests/browser_connection_dnsoverhttps.js. CLOSED TREE 2020-09-24 15:04:39 +03:00
Nihanth Subramanya
2e9c8604a0 Bug 1662430 - Allow a pref to toggle whether to clear doh-rollout.mode at shutdown. r=valentin,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D90856
2020-09-24 09:10:11 +00:00
Nihanth Subramanya
ab0ca1d5ce Bug 1666676 - Use fully-qualified names for all lookups performed by DoH heuristics. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D91091
2020-09-23 16:37:19 +00:00
Mark Banner
15403a5af5 Bug 1666524 - Fix used of unknown idl property in browser_platformDetection.js. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D91019
2020-09-22 16:23:13 +00:00
Razvan Maries
cf070445d7 Backed out changeset 7e73d7a3ddd2 (bug 1662430) for perma failures on browser_connection_dnsoverhttps.js. CLOSED TREE 2020-09-22 19:19:03 +03:00
Nihanth Subramanya
72775bac07 Bug 1662430 - Allow a pref to toggle whether to clear doh-rollout.mode at shutdown. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D90856
2020-09-22 07:34:33 +00:00
Nihanth Subramanya
c8de569d8b Bug 1666263 - Clean up doh-rollout.profileCreationThreshold pref. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D90861
2020-09-21 14:23:31 +00:00
Valentin Gosu
76eebd4651 Bug 1657582 - Add nsIDNSAddrRecord interface r=necko-reviewers,geckoview-reviewers,snorp,mixedpuppy,dragana
This interface extends nsIDNSRecord and makes the DNS code more extensible
by allowing us to support more record types.
This change does require the consumer to be aware of the type they requested
and to QueryInterface to either nsIDNSAddrRecord for regular IP lookups,
or to nsIDNSByTypeRecord for other kinds of lookups.

Differential Revision: https://phabricator.services.mozilla.com/D86177
2020-08-12 10:49:39 +00:00
Valentin Gosu
82a7631e75 Bug 1657897 - Add test for platform indication DoH heuristic r=nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D86371
2020-08-11 13:27:07 +00:00
Nihanth Subramanya
31d1f2c017 Bug 1654714 - [DoH] Group heuristics results into three categories to reduce extra key count in telemetry. r=Gijs,tdsmith
Differential Revision: https://phabricator.services.mozilla.com/D84719
2020-07-24 20:22:25 +00:00
Nihanth Subramanya
d075d41102 Bug 1652510 - Revert DoH heuristics telemetry event category name to "doh". r=tdsmith,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D83357
2020-07-13 23:42:27 +00:00
Nihanth Subramanya
7310ce733e Bug 1603779 - Part 4: Mass rename prefs in tests to remove DOH_ suffix. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D82094
2020-07-10 15:15:41 +00:00
Nihanth Subramanya
da1d78775e Bug 1603779 - Part 3: Update tests. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D82090
2020-07-10 15:15:02 +00:00
Nihanth Subramanya
5a66b9772e Bug 1603779 - Part 2: Move doh-rollout mochitests into browser/components/doh/test/. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D82088
2020-07-10 15:14:16 +00:00
Kershaw Chang
7ad0dd19d4 Bug 1641496 - P6: Reenable some tests r=dragana,extension-reviewers,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D77277
2020-06-04 22:56:38 +00:00
Csoregi Natalia
77821df454 Backed out 7 changesets (bug 1641496) for failures on test_trr.js. CLOSED TREE
Backed out changeset 1c927e612dda (bug 1641496)
Backed out changeset 0f1ba77e3942 (bug 1641496)
Backed out changeset a626e86ce5c9 (bug 1641496)
Backed out changeset 196381953eac (bug 1641496)
Backed out changeset 70b0af678bfd (bug 1641496)
Backed out changeset bf41bd8ca89c (bug 1641496)
Backed out changeset 745da0e1cb80 (bug 1641496)
2020-06-05 01:39:19 +03:00
Kershaw Chang
8f7ebf8ee1 Bug 1641496 - P6: Reenable some tests r=dragana,extension-reviewers,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D77277
2020-06-04 16:53:23 +00:00
Kershaw Chang
90e7faad9f Bug 1602832 - P3: Skip failed tests r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67448
2020-05-26 14:30:26 +00:00
Butkovits Atila
34d69c0668 Backed out 6 changesets (bug 1602832) for causing perma failure at test_trr_case_sensitivity.js. CLOSED TREE
Backed out changeset 0e9c378df995 (bug 1602832)
Backed out changeset 534fedb3836e (bug 1602832)
Backed out changeset db012c05d64e (bug 1602832)
Backed out changeset ca0c207dca21 (bug 1602832)
Backed out changeset bea1f3aeea49 (bug 1602832)
Backed out changeset 2d54acd78124 (bug 1602832)
2020-05-26 13:09:07 +03:00
Kershaw Chang
75da29ed57 Bug 1602832 - P3: Skip failed tests r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67448
2020-05-26 08:35:32 +00:00
Coroiu Cristina
86104594c6 Backed out 5 changesets (bug 1602832) for browser-chrome failures at toolkit/mozapps/extensions/test/xpinstall/browser_doorhanger_installs.js on a CLOSED TREE
Backed out changeset 059a7f44d1a9 (bug 1602832)
Backed out changeset 2f3cc391b48a (bug 1602832)
Backed out changeset 24d1ce1b0ac9 (bug 1602832)
Backed out changeset 5ea85726cc48 (bug 1602832)
Backed out changeset ee00e846104e (bug 1602832)
2020-05-19 23:05:26 +03:00
Kershaw Chang
cd38152eb9 Bug 1602832 - P3: Skip failed tests r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67448
2020-05-19 12:56:52 +00:00
Nihanth Subramanya
64b1daa5e5 Bug 1638169 - TRR selection: read list of TRRs from default pref branch. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D75442
2020-05-15 16:16:00 +00:00
Nihanth Subramanya
d53a2f7b1d Bug 1631822 - Exclude TRRs with more than 30% erroneous results from selection. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D73370
2020-05-01 20:06:00 +00:00