Commit Graph

284 Commits

Author SHA1 Message Date
Lina Cambridge
4dac2b2a1d Bug 1621756 - Don't send the Push UAID if there are no push subscriptions. r=englehardt
This commit changes the Push client code to check for existing push
subscriptions when connecting to the server, and omits the UAID from
the `hello` handshake if there are none. This, in turn, causes the
server to issue a new UAID, which we keep until either the next
reconnect, or when the user subscribes to push. It's a way to rotate
the UAID and reduce the privacy risk of tying a persistent identifier
to the connection.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 18:21:09 +00:00
Bogdan Tara
70597faf60 Backed out changeset 2f302b1f5cb9 (bug 1621756) for xpc failures on test_unregister_empty_scope.js CLOSED TREE 2020-03-30 08:24:02 +03:00
Lina Cambridge
082cfa14cc Bug 1621756 - Don't send the Push UAID if there are no push subscriptions. r=englehardt
This commit changes the Push client code to check for existing push
subscriptions when connecting to the server, and omits the UAID from
the `hello` handshake if there are none. This, in turn, causes the
server to issue a new UAID, which we keep until either the next
reconnect, or when the user subscribes to push. It's a way to rotate
the UAID and reduce the privacy risk of tying a persistent identifier
to the connection.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 01:56:00 +00:00
Brindusan Cristian
db0ef6b876 Backed out changeset 3ff5a0976b14 (bug 1621756) for xpcshell failures at test_removeDataFromDomain.js. CLOSED TREE 2020-03-30 02:13:30 +03:00
Lina Cambridge
99093219c9 Bug 1621756 - Don't send the Push UAID if there are no push subscriptions. r=englehardt
This commit changes the Push client code to check for existing push
subscriptions when connecting to the server, and omits the UAID from
the `hello` handshake if there are none. This, in turn, causes the
server to issue a new UAID, which we keep until either the next
reconnect, or when the user subscribes to push. It's a way to rotate
the UAID and reduce the privacy risk of tying a persistent identifier
to the connection.

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

--HG--
extra : moz-landing-system : lando
2020-03-29 20:42:51 +00:00
Mark Banner
15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
J.C. Jones
ac5dfc4597 Bug 1333140 - Require SecureContext for WebCrypto r=bholley,keeler,baku
Adds [SecureContext] for crypto.subtle, CryptoKey, and SubtleCrypto, retiring
the WebCrypto WPT overrides for WebCryptoAPI/historical.any.js.

Rebased on https://phabricator.services.mozilla.com/D58743

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

--HG--
extra : moz-landing-system : lando
2020-02-11 09:25:09 +00:00
Andreea Pavel
e7802d1d01 Backed out changeset fcbd865d22bc (bug 1274773) for causing high frequency failures in Bug 1274773 2019-12-12 19:24:00 +02:00
Perry Jiang
d574806ada Bug 1274773 - re-enable test_multiple_register_during_service_activation.html r=asuth
The test was disabled 8 months ago. Re-enabling to see if this intermittent
still exists.

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

--HG--
extra : moz-landing-system : lando
2019-12-09 16:11:23 +00:00
Perry Jiang
8ae16063a4 Bug 1592699 - Fix test_serviceworker_lifetime.html r=asuth
- Reset idle timeout when dispatching service worker operations even if the
worker is alive.
- Use MessageEvent instead of FetchEvent to avoid creating objects that leak
when the test finishes.

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

--HG--
extra : moz-landing-system : lando
2019-10-30 17:23:53 +00:00
Rob Wu
34c77beb98 Bug 1591102 - Let some SpecialPowers.pushPermissions callers use promises r=jdm
Some callers of SpecialPowers.pushPermissions wrapped the call in a
promise. That is not needed; directly use the returned promise instead.

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

--HG--
extra : moz-landing-system : lando
2019-10-27 15:28:41 +00:00
Paul Zuehlcke
c462a0fcba Bug 1422056 - Updated tests to account for permission manager OA stripping. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D48665

--HG--
extra : moz-landing-system : lando
2019-10-24 14:19:57 +00:00
Perry Jiang
87c3eb5a96 Bug 1575185 - Subscribe content processes spawning Service Workers to permission updates r=asuth
Previously, Service Workers could spawn in a process that isn't subscribed
to permission updates, which could happen if that process hadn't loaded any
same-origin documents. To address this, parent-process logic for spawning
Service Workers would snapshot the permissions state to be sent to a content
process.

Unfortunately, this approach could lead to outdated, unsynchronized permissions.
Note that nsIPermissionManager::SetPermissionsWithKey is only used to initialize
permissions for a given key and is a no-op if already called with the same key
in a given process. As a result, the following sequence of events could happen:

Assume a content process CP that isn't subscribed to permission changes for an
origin A:

1) Parent process decides to spawn an origin A Service Worker in CP,
snapshotting a value V for permission P.
2) The Service Worker is spawned in CP, setting CP's permission manager's
permission P to value V (for origin A).
3) Parent process updates its permission P to a value A', which is not
broadcasted to CP (because it's not subscribed).
4) By now, the initial Service Worker has been terminated, and the parent
process decides once again to spawn an origin A Service Worker in CP.
5) The Service Worker is spawned in CP, but the call to SetPermissionsWithKey
is a no-op, leaving CP1 with a mismatched value for permission P.

An additional scenario is if the parent process updates a permission during a
remote Service Worker's lifetime.

This patch, which would subscribe CP1 to permission updates when the parent
process knows a Service Worker would be spawned in CP1, prevents these problems.

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

--HG--
extra : moz-landing-system : lando
2019-10-09 02:23:41 +00:00
Geoff Brown
dee3092cdc Bug 1575185 - Skip test_permissions.html on fission; r=mccr8
Avoid high frequency intermittent failure on fission.

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

--HG--
extra : moz-landing-system : lando
2019-09-30 22:40:35 +00:00
Anny Gakhokidze
f1c694e18f Bug 1582531 - Update fission annotations for skipped tests that are now passing succesfully, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47347

--HG--
extra : moz-landing-system : lando
2019-09-27 14:25:10 +00:00
Valentin Gosu
099ff7434c Bug 1582515 - Add ability for httpd.js to execute code moz-http2.js and spawn new servers r=mayhemer,JuniorHsu
Differential Revision: https://phabricator.services.mozilla.com/D46496

--HG--
extra : moz-landing-system : lando
2019-09-26 09:53:04 +00:00
Emma Malysz
6a0111db7b Bug 1369436, Load PushComponents.js after startup. r=lina,mconley
Differential Revision: https://phabricator.services.mozilla.com/D45079

--HG--
extra : moz-landing-system : lando
2019-09-25 15:50:58 +00:00
Cosmin Sabou
e5327b05c8 Bug 1578333 - Disable test because of frequent failures. r=egao
Differential Revision: https://phabricator.services.mozilla.com/D44593

--HG--
extra : moz-landing-system : lando
2019-09-04 04:23:42 +00:00
Cosmin Sabou
d6435fae32 Backed out 4 changesets (bug 1456995) for OSX mochitest failures on test_serviceworkerinfo.xul. CLOSED TREE
Backed out changeset e4deba1aa285 (bug 1456995)
Backed out changeset 03db4932e3ca (bug 1456995)
Backed out changeset 962b6affd688 (bug 1456995)
Backed out changeset 5fbed7d37ac0 (bug 1456995)
2019-09-03 22:27:03 +03:00
Perry Jiang
b3c3679dc5 Bug 1456995 - check parent-intercept pref within test_observer_remoting.js to conditionally run r=asuth
Depends on D44514

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

--HG--
extra : moz-landing-system : lando
2019-09-03 18:08:47 +00:00
Paul Zuehlcke
89fb47a8d9 Bug 1531303 - Refactored tests using PermissionManager URI methods to use PermissionTestUtils. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D41029

--HG--
extra : moz-landing-system : lando
2019-08-15 14:32:48 +00:00
Ciure Andrei
b454daea7a Backed out 3 changesets (bug 1531303) for causing close_window/close.py and browser_permissions_dialog.js to perma fail CLOSED TREE
Backed out changeset 87305e83174e (bug 1531303)
Backed out changeset 0c75c3bac00b (bug 1531303)
Backed out changeset 865c2a5d40da (bug 1531303)
2019-08-14 13:07:55 +03:00
Paul Zuehlcke
93bacc1004 Bug 1531303 - Refactored tests using PermissionManager URI methods to use PermissionTestUtils. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D41029

--HG--
extra : moz-landing-system : lando
2019-08-14 08:31:23 +00:00
Kris Maglione
0962c2b731 Bug 1566182: Annotate mochitests that fail with Fission enabled. r=mccr8
My preference was to annotate most of the failing tests with `fail-if` so that
if they start passing, the `fail-if` needs to be removed and they need to keep
passing. That doesn't work for tests that timeout, or which trigger failures
from their cleanup functions, however, so those tests need skip-if. And tests
with fail in their cleanup functions likely leave the browser in an
inconsistent state for subsequent tests, anyway, so really should be skipped
regardless.

There are some remaining tests which still fail because of crashes. I chose
not to skip them here, but to fix the crashes in separate bugs instead.

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

--HG--
extra : rebase_source : 39ba8fec2e882cfe577c5f2b58ab7e4b461f1178
2019-07-15 16:19:32 -07:00
Jonathan Kingston
31441f82ea Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504

--HG--
extra : moz-landing-system : lando
2019-07-08 16:37:45 +00:00
Victor Porof
0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00
Kris Maglione
3e44c16cf9 Bug 1541557: Part 5 - Update callers of ChromeScript.sendSyncMessage to use sendQuery instead. r=nika
Since JSWindowActors don't have direct access to synchronous messaging,
ChromeScript callers are going to need to migrate to asynchronous messaging
and queries instead.

Since there's no comparable API to sendQuery for frame message managers, this
patch adds a stub that uses synchronous messaging, but makes the API appear
asynchronous, and migrates callers to use it instead of direct synchronous
messaging. This will be replaced with a true synchronous API in the actor
migration.

Fortunately, most of the time, this actually leads to simpler code. The
`sendQuery` API doesn't have the odd return value semantics of
`sendSyncMessage`, and can usually just be used as a drop-in replacement. Many
of the `sendSyncMessage` callers don't actually use the result, and can just
be changed to `sendAsyncMessage`. And many of the existing async messaging
users can be changed to just use `sendQuery` rather than sending messages and
adding response listeners.

However, the APZ code is an exception. It relies on intricate properties of
the event loop, and doesn't have an easy way to slot in promise handlers, so I
migrated it to using sync messaging via process message managers instead.

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

--HG--
extra : rebase_source : d5707e87f293a831a5cf2e0b0a7e977090267f78
extra : source : 75ebd6fce136ab3bd0e591c2b8b2d06d3b5bf923
2019-06-12 12:40:51 -07:00
Honza Bambas
c35df87597 Bug 1545421 - New nsresult error codes for 407, 502 and 504 http response codes returned by proxies + test, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D32817

--HG--
extra : moz-landing-system : lando
2019-05-31 17:29:53 +00:00
Boris Zbarsky
767491f74e Bug 1550569 part 2. Stop using [array] in nsIPushService. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D30551

--HG--
extra : moz-landing-system : lando
2019-05-10 07:15:31 +00:00
Boris Zbarsky
dbeea27f14 Bug 1550569. Stop using [array] in nsIPushNotifier. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D30549

--HG--
extra : moz-landing-system : lando
2019-05-10 07:15:08 +00:00
Andrea Marchesini
f8565bf748 Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-03 17:13:17 +00:00
Bogdan Tara
386d23bfe7 Backed out 4 changesets (bug 1320404) for test_permmanager_load_invalid_entries.js failures
Backed out changeset 7c2f4e64d38e (bug 1320404)
Backed out changeset a7e7c0251179 (bug 1320404)
Backed out changeset dd741b25a244 (bug 1320404)
Backed out changeset de9073c57d20 (bug 1320404)
2019-05-03 06:12:25 +03:00
Andrea Marchesini
138cee6dea Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-02 17:24:51 +00:00
Cosmin Sabou
a884fb99d8 Backed out 4 changesets (bug 1320404) for xperf failures on permissions.sqlite-journal.
Backed out changeset fbacf18b6532 (bug 1320404)
Backed out changeset fed7c475d75c (bug 1320404)
Backed out changeset 557b586f774a (bug 1320404)
Backed out changeset 5a20b5f43280 (bug 1320404)
2019-05-02 04:51:18 +03:00
Andrea Marchesini
7e61125d8f Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-01 23:21:45 +00:00
Brian Grinstead
381332c51e Bug 1544051 - Part 3 - Scripted change to remove references to AddTask.js r=ahal
This was generated with the script at https://bug1544051.bmoattachments.org/attachment.cgi?id=9058672

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

--HG--
extra : moz-landing-system : lando
2019-04-18 16:51:01 +00:00
Brian Grinstead
0d460e3432 Bug 1544322 - Part 2.2 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in dom/ r=bzbarsky
This is split from the previous changeset since if we include dom/ the file size is too
large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 03:53:28 +00:00
Mathieu Leplatre
6ac6c635da Bug 1540141 - Distinguish broadcast trigger from startup trigger in Remote Settings Uptake events r=glasserc,lina
Distinguish broadcast trigger from startup trigger in Remote Settings Uptake events

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

--HG--
extra : moz-landing-system : lando
2019-04-10 16:55:52 +00:00
Mathieu Leplatre
1cdc04dfda Bug 1541888 - Enable ESLinting in dom/push/ r=glasserc,lina
Enable ESLinting in dom/push/

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

--HG--
extra : moz-landing-system : lando
2019-04-09 10:05:51 +00:00
Cosmin Sabou
71dbcaba95 Bug 1274773 - Disable test_multiple_register_during_service_activation.html on linux, mac and windows for frequent failures. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D25646

--HG--
extra : moz-landing-system : lando
2019-04-01 18:33:28 +00:00
Lina Cambridge
256003368d Bug 1524655 - Remove dom.push.alwaysConnect and connect unconditionally. r=jrconlin,pjenvey
This commit also fixes a race in `test_error_reporting.html`, where the
push service would initialize and attach its listeners after
`sessionstore-windows-restored`. Even though the test replaces the real
service with a mock, the former keeps listening for pref changes.
When the test calls `setupPrefs` to enable the push connection, the
real service tries to connect to the push server, which asserts in
automation because non-local connections aren't allowed.

We work around this by ensuring that `replacePushService` and
`restorePushService` always wait for the service to shut down before
replacing it with a mock, or restoring the real implementation.

Finally, this commit removes a test that's no longer relevant, since
we don't need to fetch all subscriptions at startup.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 22:37:51 +00:00
Dorel Luca
f1c7ba91fa Backed out changeset 88ea72c345ab (bug 1524655) for mochitest failures in dom/push/test/test_error_reporting.html 2019-03-14 08:45:37 +02:00
Lina Cambridge
84764d6a93 Bug 1524655 - Remove dom.push.alwaysConnect and connect unconditionally. r=jrconlin,pjenvey
Also, remove a test that's no longer relevant, since we don't need to
fetch all subscriptions at startup.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 04:22:18 +00:00
Dana Keeler
8393579e78 bug 1531958 - make http2 test certificates more consistent with existing test certificate infrastructure r=dragana
This patch uses the existing xpcshell test certificate infrastructure
(pycert/pykey) to manage the http2 test certificates (and gets rid of some uses
of nsIBadCertListener2 as a bonus).

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

--HG--
rename : netwerk/test/unit/CA.cert.der => netwerk/test/unit/http2-ca.pem
rename : testing/xpcshell/moz-http2/http2-key.pem => testing/xpcshell/moz-http2/http2-cert.key
extra : moz-landing-system : lando
2019-03-04 15:42:07 +00:00
Blake Kaplan
d09e3b3e9a Bug 1517406 - Fix this test to listen in the proper process. r=asuth
Summary:

This test listens for an observer service notification from the
`ServiceWorkerManager`, but with parent-intercept on, it listens in the wrong
process. This uses the magic of SpecialPowers to listen in the correct
process.

Unfortunately, this test still fails because it leaks.

Reviewers: asuth

Reviewed By: asuth

Bug #: 1517406

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

--HG--
extra : rebase_source : 7aa62832c7c577275c8eaa5fd2146885e393fc6b
2019-01-29 15:41:06 -05:00
Kris Maglione
e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Mark Banner
8c00ef3f30 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-11 13:15:08 +00:00
Lina Cambridge
ac99a741ef Bug 1511974 - Set up the mock Push socket in test_permissions.html to avoid network connections. a=testonly
Differential Revision: https://phabricator.services.mozilla.com/D13828

--HG--
extra : moz-landing-system : lando
2018-12-05 16:46:48 +00:00
Ciure Andrei
ed617be144 Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE
Backed out changeset 4773a3f46c22 (bug 1512052)
Backed out changeset 2f48c5afbe57 (bug 1512052)

--HG--
rename : browser/components/attribution/test/xpcshell/.eslintrc.js => browser/components/attribution/test/.eslintrc.js
2018-12-05 05:47:39 +02:00
Mark Banner
8256078237 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Depends on D13745

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

--HG--
extra : moz-landing-system : lando
2018-12-04 22:27:35 +00:00