Граф коммитов

4673 Коммитов

Автор SHA1 Сообщение Дата
Florian Quèze 4e937e42a2 Bug 1353542 - Cleanup the script output and fix tests, r=Mossop. 2017-05-12 14:54:05 +02:00
Thom Chiovoloni 65e959c068 Bug 1357814 - Changes to sync's TPS tests to allow running from automation r=markh
1. Ensure we wait for browser-delayed-startup-finished
2. Parse the profile we're cleaning up from the cleanup phase name instead of
   using the selectedProfile.
3. Ensure that bookmark repair doesn't run randomly (this isn't necessary, but
   the repair code can make the actual reason for failure much more difficult to
   debug, and could probably cause a test to pass when it should not).
4. Add multiprocessCompatible flags so that TPS can still start in nightly (and
   because it is).

MozReview-Commit-ID: 98UvRoFOdzv

--HG--
extra : rebase_source : ff1f199eafdcc569cfdf9cb373ee4d059b37ec35
2017-05-05 14:54:03 -04:00
Kit Cambridge 103b72ff2f Bug 1335891 - Ensure and test that Sync changes don't bump the score. r=markh
MozReview-Commit-ID: 4dP5oZS3pm

--HG--
extra : rebase_source : ebada671d4aa5feba290f118e370fd7def093c4a
2017-05-09 13:04:50 -07:00
Kit Cambridge 2401fa0477 Bug 1335891 - Trigger another sync if tracked items have changed during the last sync. r=markh
MozReview-Commit-ID: 7EcIX7QrsN4

--HG--
extra : rebase_source : 41f0886f5e40b9b8aaaebc5ebaa40a247bba13ef
2017-05-10 19:21:16 -07:00
Ethan Glasser-Camp 3abedf0d48 Bug 1363430: Update kinto-http.js to 4.3.4, r=MattN
MozReview-Commit-ID: BenayrfXlKC

--HG--
extra : rebase_source : d8b09f46532eba84adbca253f47f434b3fff918e
2017-05-09 12:27:11 -04:00
Thom Chiovoloni 0c6fcd0d50 Bug 1362099 - Make RESTRequest handle GET's where the response is > 8192 bytes and we know the charset r=markh
MozReview-Commit-ID: 6g8hCvr7ZbJ

--HG--
extra : rebase_source : 740e44f4cf6be265e2c04a78d4737a118f0a1b3f
2017-05-05 16:29:01 -04:00
Frederik Braun cd1cbcef0f Bug 1359350: Add no-eval rule to eslint config (and whitelist failures in tests) r=standard8
MozReview-Commit-ID: 4nYlX4sSdbF

--HG--
extra : rebase_source : cf610e7d8bf2b8dbd5a0d40c5b835bc6620c3bba
2017-05-08 14:50:50 +02:00
Kit Cambridge 5fc76a861d Bug 1361171 - Remove CloudSync. r=markh
MozReview-Commit-ID: CjBsEZa6oIP

--HG--
extra : rebase_source : 965db37197242acf63e77dbcca74a2984532b4ff
2017-05-01 14:43:00 -07:00
Carsten "Tomcat" Book fdc689ba16 merge mozilla-inbound to mozilla-central a=merge 2017-05-05 15:17:26 +02:00
Honza Bambas a1b64b4694 Bug 1319111 - Expose URI to make security check against on LoadInfo (no LOAD_REPLACE flag). r=bz 2017-01-27 19:10:01 +01:00
Edouard Oger b3b3ff9cc5 Bug 1353571 part 3 - Refactor browser-syncui and browser-fxaccounts. r=markh
MozReview-Commit-ID: K790Ag8WZgv

--HG--
rename : browser/base/content/test/general/accounts_testRemoteCommands.html => browser/base/content/test/sync/accounts_testRemoteCommands.html
rename : browser/base/content/test/general/browser_fxa_web_channel.html => browser/base/content/test/sync/browser_fxa_web_channel.html
rename : browser/base/content/test/general/content_aboutAccounts.js => browser/base/content/test/sync/content_aboutAccounts.js
extra : rebase_source : dcba087df94d06b15c9f073ff2df3324fd646c57
2017-04-18 14:15:43 -04:00
Edouard Oger 1df337c9ce Bug 1361572 - Remove Task.jsm/Promise.jsm from services/. r=kitcambridge
MozReview-Commit-ID: BBIkpIkWIYc

--HG--
extra : rebase_source : a0f10b07bad20789e2d1c2c2bca133b32bf671aa
2017-05-02 19:29:33 -04:00
Sebastian Hengst 18253e3fa2 Backed out changeset 0a0138825fb5 (bug 1353571)
--HG--
rename : browser/base/content/test/sync/accounts_testRemoteCommands.html => browser/base/content/test/general/accounts_testRemoteCommands.html
rename : browser/base/content/test/sync/browser_fxa_web_channel.html => browser/base/content/test/general/browser_fxa_web_channel.html
rename : browser/base/content/test/sync/content_aboutAccounts.js => browser/base/content/test/general/content_aboutAccounts.js
2017-05-03 21:56:44 +02:00
Edouard Oger c11e66021d Bug 1353571 part 3 - Refactor browser-syncui and browser-fxaccounts. r=markh
MozReview-Commit-ID: K790Ag8WZgv

--HG--
rename : browser/base/content/test/general/accounts_testRemoteCommands.html => browser/base/content/test/sync/accounts_testRemoteCommands.html
rename : browser/base/content/test/general/browser_fxa_web_channel.html => browser/base/content/test/sync/browser_fxa_web_channel.html
rename : browser/base/content/test/general/content_aboutAccounts.js => browser/base/content/test/sync/content_aboutAccounts.js
extra : rebase_source : aa6cb209d312c6ef3f45589b0fd8fa8a39c612e3
2017-04-18 14:15:43 -04:00
Edouard Oger b80261a3ec Bug 1358648 part 3 - Remove Async, Services and XPCOMUtils from util.js. r=markh
MozReview-Commit-ID: 8na204K9cXp

--HG--
extra : rebase_source : 96e7738aa6612cf67543d50053f50c2bccf1ab7e
2017-05-02 16:57:37 -04:00
Edouard Oger abba8c5b31 Bug 1358648 part 2 - Remove util.js Svc.{DefaultPrefs,Session,Idle, FormHistory} and Str. r=markh
MozReview-Commit-ID: Jc1th8Snvhv

--HG--
extra : rebase_source : dd950a5d7bb0f2cb2ea4f32c7b61eb2a15ae327d
2017-05-02 18:30:23 -04:00
Edouard Oger 712abbc07a Bug 1358648 part 1 - Clean-up some Weave imports. r=markh
MozReview-Commit-ID: 2NK4Mew65UT

--HG--
extra : rebase_source : f515a4c26f2ac515c67d37f4cf01f79427b38221
2017-05-02 18:27:49 -04:00
Sebastian Hengst 43a868766b Backed out changeset 83fe6517d5be (bug 1357116) for eslint failures in blocklist-clients.js. r=backout 2017-05-02 19:59:32 +02:00
Mathieu Leplatre ec15502b47 Bug 1357116 - Load the blocklist updater module lazily r=florian,mgoodwin
MozReview-Commit-ID: IjdpY9JZQPL

--HG--
extra : rebase_source : 1c2968fff0c0a11f0adf68f0bc9b0905ed4ac457
2017-04-27 14:45:57 +02:00
Dan Banner f2a6a685fe Bug 1359540 - Enable the Mozilla ESlint recommended rules for services/. r=markh
MozReview-Commit-ID: D6qH5XtEtHO

--HG--
extra : rebase_source : 8e4c319c7fb8b727ac0193e5dd78411e1ec2785c
2017-04-27 17:24:18 +01:00
Mathieu Leplatre 250807ae85 Bug 1347728 - Fix JSON dump of blocklists r=kjozwiak,mgoodwin
MozReview-Commit-ID: rwX5Nn9d6b

--HG--
extra : rebase_source : ad24a54d4be06028d1af93cfdb31beb3e4124b1b
2017-03-22 15:46:55 +01:00
Carsten "Tomcat" Book 8cb9279791 Backed out changeset e6177d883f37 (bug 1359540) for eslint failures 2017-05-02 09:25:45 +02:00
Dan Banner 0c2aa823c9 Bug 1359540 - Enable the Mozilla ESlint recommended rules for services/. r=markh
MozReview-Commit-ID: D6qH5XtEtHO

--HG--
extra : rebase_source : 3d8d878810c60dc339e196eaac0215f9f72cc829
2017-04-27 17:24:18 +01:00
Kit Cambridge dcce7ae769 Bug 1348699 - Add test to ensure we don't track left pane queries. r=mak,markh
MozReview-Commit-ID: LFoCpvz2rAn

--HG--
extra : rebase_source : c2e927100899b5856d0fc2350efdf0e1ffb52e77
2017-03-20 19:22:15 -07:00
Kit Cambridge 5b32e800fa Bug 1350030 - Extract `serverForEngine` into `serverForEnginesWithKeys`. r=tcsc
MozReview-Commit-ID: 3D1xwv9k76m

--HG--
extra : rebase_source : a27836cea6100fd90e15ed95b08c9f02e6c79605
2017-03-30 18:01:19 -07:00
Thom Chiovoloni 20f27ffe75 Bug 1361818 - Make sure TPS is aware sync's collection.get method is asynchronous now r=markh
Ideally we'd convert this to promises, but this function is already full of
promiseSpinningly's and removing them all is too much work for this bug.

MozReview-Commit-ID: 144JFRwejTb

--HG--
extra : rebase_source : 40371c6cfeee9fddffe4b737cbb98fecb424b719
2017-05-03 15:12:30 -04:00
Alexandre Poirot c90bccb53a Bug 1356231 - Use toolkit EventEmitter.jsm instead of devtools module. r=mossop
MozReview-Commit-ID: 49JI7NtLwKK

--HG--
extra : rebase_source : 7fb015f56be94c4bbe2d56506653f069c9ad8dd3
2017-04-27 17:58:09 +02:00
Florian Queze 4b1556a5f2 Bug 1355056 - replace (function(args) { /* do stuff using this */ }).bind(this) with arrow functions, r=jaws. 2017-04-27 00:25:45 +02:00
Mark Banner 29c680ad80 Bug 1359140 - Fix various ESLint issues in services/ (mostly automatic). r=markh
This fixes various errors raised in services for the rules: key-spacing, quotes, no-else-return, no-extra-semi, comma-spacing, object-shorthand.

MozReview-Commit-ID: IClwG5rfXfW

--HG--
extra : rebase_source : 81c059dacfc39b5cf8bc85b9b746dcdd494a3629
2017-04-24 18:52:57 +01:00
Edouard Oger 1b936ebd82 Bug 1356112 - Set identity.fxaccounts.settings.devices.uri when using the FxA well-known configuration. r=tcsc
MozReview-Commit-ID: IJaMuIorXHg

--HG--
extra : rebase_source : 9dc1e723632c1821af5299e6f91c54471c4855f6
2017-04-20 13:57:23 -04:00
Mark Hammond 00431016d0 Bug 1355677 - Make all Sync network requests promise based. r=kitcambridge,rnewman,tcsc
MozReview-Commit-ID: JSwAS4Xd1uy

--HG--
extra : rebase_source : 95724c3b59576d40cafd2f380ff42acb4fc3d553
2017-04-11 23:40:53 +10:00
Sebastian Hengst ceb65c045e Backed out changeset 816a2cc1254a (bug 1347728) for failing xpcshell's test_blocklist_certificates.js on Windows r=backout 2017-04-20 19:11:04 +02:00
Mathieu Leplatre 04cf765d30 Bug 1347728 - Fix JSON dump of blocklists r=kjozwiak,mgoodwin
MozReview-Commit-ID: rwX5Nn9d6b

--HG--
extra : rebase_source : 5df03011e57211e6cf2d67f1bda3f71d188c7f91
2017-03-22 15:46:55 +01:00
Thom Chiovoloni 8b9281c90a Bug 1350135 - Fix failing TPS test_history_collision.js test r=markh
There were three issues here: The first is that the TPS's history module didn't
wait for PlacesUtils.history.remove's promise to resolve.

The second is that the SYNC_WIPE_REMOTE in the previous client would cause a
write to the clients collection, which would cause the next client to get a
"sync:collection_changed" push. This caused a sync of *only* the clients
collection upon reciept, which would prevent TPS from explicitly syncing all
engines.

The third is that TPS wasn't correctly handling the cases where logIn would
trigger a sync, which would cause a failure during the first sync of a session.
This would cause failures on other TPS tests as well.

MozReview-Commit-ID: LpqZ7Kt9fyy

--HG--
extra : rebase_source : f1d3c40e2ef4e09cce4d2ce8ae25f2c86ddfee45
2017-04-19 14:38:00 -04:00
Thom Chiovoloni 0bb64306d4 Bug 1346175 - Record AsyncResource.serverTime in sync telemetry events. r=bsmedberg,markh
MozReview-Commit-ID: DG43B9zEHaO

--HG--
extra : rebase_source : 9b16fe1dff50574036fb2e10224d8056fe415ecd
2017-04-04 13:51:16 -04:00
Marco Bonardo 12dcd10d01 Bug 1356567 - root icons should still create a page association if the domain differs. r=adw,kitcambridge
Root domain icons are no more associated with their pages, BUT if the page uses
a root domain icon from another domain, it should still get an association with it
or we couldn't relate the two.

This also fixes an overlooked problem in PlacesTestUtils where Date objects
cross a boundary and fail instanceof checks. This causes failures in the same
test that this patch is modifying.
To protect from future similar issues some protection has been added to updatedPlaces
so that it will crash in debug builds.

MozReview-Commit-ID: 3MTKhGj3ehj

--HG--
extra : rebase_source : 55120252e7ea8abb91f21ca2486deddc43795142
2017-04-14 20:34:27 +02:00
Carsten "Tomcat" Book 16969b40e2 Backed out changeset eb94759f0fcf (bug 1356567) for test failures in own test 2017-04-18 12:58:09 +02:00
Marco Bonardo 5238755b71 Bug 1356567 - root icons should still create a page association if the domain differs. r=adw,kitcambridge
Root domain icons are no more associated with their pages, BUT if the page uses
a root domain icon from another domain, it should still get an association with it
or we couldn't relate the two.

This also fixes an overlooked problem in PlacesTestUtils where Date objects
cross a boundary and fail instanceof checks. This causes failures in the same
test that this patch is modifying.
To protect from future similar issues some protection has been added to updatedPlaces
so that it will crash in debug builds.

MozReview-Commit-ID: 3MTKhGj3ehj

--HG--
extra : rebase_source : e36ba1ab41649927f92fee053c10bf43474a0bcf
2017-04-14 20:34:27 +02:00
tiago c05723ef0c Bug 986501 - Avoid unnecessary compartments on Sync startup r=markh
MozReview-Commit-ID: 8Rr3JD4dfVy

--HG--
extra : rebase_source : b18f24229bbd1caf80d9f175a79c1fdb0aeccd0d
2017-04-13 20:36:08 -03:00
Edouard Oger c8bcf1e705 Bug 1351915 - Fire onItemChanged when deduping sync bookmarks. r=kitcambridge
MozReview-Commit-ID: JHaCz42aRwx

--HG--
extra : rebase_source : 38361447a7900c55dc56cc5b528be5045181fee2
2017-04-08 19:57:39 -04:00
Florian Queze 4c6a68d1c9 Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Florian Queze f935ddc4b3 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst 159215e6f4 Backed out changeset 18d45aa984d6 (bug 1355161) 2017-04-14 23:39:23 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Sebastian Hengst 738d097aae Backed out changeset 55f3df15eaa6 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze 3c564a2b02 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Florian Queze a363fb8c8b Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Thom Chiovoloni daf505ef20 Bug 595314 - Add TPS test ensuring that new changes to existing bookmarks are respected by sync r=markh
MozReview-Commit-ID: B2A60B3ufYb

--HG--
extra : rebase_source : bc30afdc09497f9bcdda85493f02faa8fe8afb17
2017-04-05 12:39:00 -04:00
Thom Chiovoloni 3c9fc16ebc Bug 1345744 - Ensure an error log is written when sync (newly) fails to apply records. r=markh
MozReview-Commit-ID: 586faUBtX6n

--HG--
extra : rebase_source : 7e1d0eab656838f3718260a11ef8cd2d9b501d17
2017-04-04 14:18:09 -04:00
hrishikesh ea83c7b70d Bug 1351906 - Moved log.trace before return statement to fix unreachable code issue in history.js. r=Standard8 2017-04-05 11:03:01 +05:30
Nathan Froyd 1a5c10bc46 Bug 1348454 - use a single thread for IdentityCryptoService; r=jesup
Rather than starting a single thread for every key generation and key
signing operation started by IdentityCryptoService, and then leaking
those threads, we can at least start a single thread to be used by all
operations and leak that instead.
2017-04-03 15:41:54 -04:00
Edouard Oger d09f746bfb Bug 1345955 - Update FxA profile when push notification received. r=markh
MozReview-Commit-ID: 4LL6F5Qnnj4

--HG--
extra : rebase_source : 00bc6a445d22fdfb626e7af6ad62fb750f444460
2017-03-16 17:15:18 -04:00
Carsten "Tomcat" Book 74e36e1adb Merge mozilla-central to autoland on a CLOSED TREE
--HG--
extra : amend_source : 5026c19958cdc458c0f0887582fd00b8038fe93e
2017-03-30 16:48:10 +02:00
Florian Queze 0ac961905a Bug 1351659 - Use jwcrypto.jsm with the resource://services-crypto prefix, r=markh. 2017-03-30 09:18:45 +02:00
Edouard Oger 557fa7b36a Bug 1350665 - Disable sync repair tests on beta and release. r=kitcambridge
MozReview-Commit-ID: 6anD2FJ2aQ2

--HG--
extra : rebase_source : 708b1c52d0ecbad5407d3d27db0c5d14c8bfa73e
2017-03-29 15:27:25 -04:00
Thom Chiovoloni f189ba9211 Bug 1349703 - (part 3) Delete a test from TPS that was testing that we made the wrong decision during reconciliation r=kitcambridge
MozReview-Commit-ID: KVRcVNJAKfg

--HG--
extra : rebase_source : c37b394f0a97488f783db0b751ea2f5f9c454f8d
2017-03-23 17:18:32 -04:00
Thom Chiovoloni 250adc135f Bug 1349703 - (part 2) Fix intermittent TPS failures caused by failing cleanup by waiting longer before starting r=kitcambridge
MozReview-Commit-ID: D07eRgqHVOu

--HG--
extra : rebase_source : e08a57c3340cfd22bde9009c8cc960859b719eed
2017-03-23 16:34:04 -04:00
Thom Chiovoloni 908a695b92 Bug 1349703 - (part 1) Fix issue where sync would fail misreconcile special folders in fresh syncs r=kitcambridge
MozReview-Commit-ID: Izy9JgMYpom

--HG--
extra : rebase_source : b740e81aafbabae2947fd26888c677065742db96
2017-03-23 16:32:40 -04:00
Edouard Oger 2f0a83abc1 Bug 1339340 - Repair items the bookmark validator reports as missing on the client or server. r=tcsc
MozReview-Commit-ID: 9Wxq2wfUnkb

--HG--
extra : rebase_source : 133133eb765a403a77ca3bbd0d8302c0a0be49a0
2017-03-24 11:12:48 -04:00
Sebastian Hengst 7ebbcc1624 Backed out changeset 16d562074791 (bug 1339340) for failing xpcshell test services/sync/tests/unit/test_doctor.js. r=backout 2017-03-24 00:52:29 +01:00
Edouard Oger 125d3015c3 Bug 1339340 - Repair items the bookmark validator reports as missing on the client or server. r=tcsc
MozReview-Commit-ID: 9Wxq2wfUnkb

--HG--
extra : rebase_source : 8dfe36e5c2d75291e07d61341648dec95b5dd213
2017-03-14 18:02:20 -04:00
Kit Cambridge 55c8025ae4 Bug 1349709 - Ensure `PasswordEngine` conforms to the new `pullAllChanges` interface. r=tcsc
This was a regression from bug 1317223. This commit also adds a
password engine sync test to catch future regressions.

MozReview-Commit-ID: 9dq8K39jLwB

--HG--
extra : rebase_source : 346c4abaf639f7781426f4e06e988c76cf552422
2017-03-22 19:21:08 -07:00
Edouard Oger d20541b101 Bug 692700 part 2 - Set X-If-Unmodified-Since when uploading crypto/keys. r=markh
MozReview-Commit-ID: 9qrr8vuvy1I

--HG--
extra : rebase_source : 9c20bdec7a33d0cde2e31c3109bf3cb9665352ba
2017-03-14 15:56:08 -04:00
Edouard Oger 1ee65dc313 Bug 692700 part 1 - Set X-If-Unmodified-Since when uploading meta/global. r=markh
MozReview-Commit-ID: IoiThiDlvCj

--HG--
extra : rebase_source : f78434e661810f9b42da6d58422713fd20687e28
2017-03-14 14:42:24 -04:00
Zibi Braniecki 3d91da8726 Bug 1347314 - Migrate calls to ChromeRegistry::GetSelectedLocale to use LocaleService::GetAppLocale. r=jfkthame,Pike
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.

This allows us to remove a lot of calls for the app locale.

The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.

MozReview-Commit-ID: DzmFEUvMq3N

--HG--
extra : rebase_source : 513ed31d995864939aa893e73c81ffdf591a6617
2017-03-14 16:09:54 -07:00
Sebastian Hengst 0a04f3b9e2 Backed out changeset cc308a73ad05 (bug 1347314) for eslint failure in test_device.html. r=backout 2017-03-22 18:20:26 +01:00
Zibi Braniecki c2cd68a689 Bug 1347314 - Migrate calls to ChromeRegistry::GetSelectedLocale to use LocaleService::GetAppLocale. r=jfkthame,Pike
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.

This allows us to remove a lot of calls for the app locale.

The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.

MozReview-Commit-ID: DzmFEUvMq3N

--HG--
extra : rebase_source : 13fa4c397ba4c79303a2cd76684b5b8c4bd17331
2017-03-14 16:09:54 -07:00
Kit Cambridge c4565c993a Bug 1343093 - Add integration test for bookmark repair. r=markh
This test replaces the clients engine to simulate two different
clients, and uses `SOURCE_SYNC` to bypass change tracking.

MozReview-Commit-ID: IF3b3WZtain

--HG--
extra : rebase_source : deff5eb74dcbc29d7e7556b4ce6e15590ee4d4a0
2017-03-21 11:54:06 -07:00
Mark Banner bd625e4e9f Bug 1347712 - Change the testing configurations into ESLint configurations within eslint-plugin-mozilla - automatically update .eslintrc.js test config files for new config locations. r=jaws
MozReview-Commit-ID: LH0CQOPfoe6

--HG--
extra : rebase_source : 83eaf40c5cbb5e25cfb3f3b5afadf4fbf0422c92
2017-03-20 12:36:37 +01:00
Thom Chiovoloni f38275a306 Bug 1339163 - Make TPS tests attempt to automatically verify fxa emails when using a restmail account r=markh
MozReview-Commit-ID: LwBrVSXFqyc

--HG--
extra : rebase_source : c09b6afe7ea3827760618d7fa6421bf36bc601bf
2017-03-17 16:41:58 -04:00
Thom Chiovoloni 130ff3a299 Bug 1345754 - Skip sync bookmark repair and validation if we have pending changes r=markh
MozReview-Commit-ID: ClQRXGZGV9p

--HG--
extra : rebase_source : 4ae8ead7a9121dc383fcfc5ebf757f44e46f5679
2017-03-14 14:26:20 -04:00
Carsten "Tomcat" Book 6fd1303c2a merge mozilla-inbound to mozilla-central a=merge 2017-03-21 12:04:43 +01:00
Wes Kocher 5d7c0bee97 Merge m-c to inbound a=merge
MozReview-Commit-ID: 860fBgcgHiy
2017-03-20 18:28:24 -07:00
Florian Queze 25f26ab751 Bug 1348570 - Make chrome://weave/locale/ point to the correct folder, r=markh. 2017-03-21 01:31:21 +01:00
Thom Chiovoloni 4f8d16041f Bug 1342320 - Use PlacesUtils and not PlacesSyncUtils in sync bookmark decline/undecline test r=markh
MozReview-Commit-ID: DgbCeKgSxoE

--HG--
extra : rebase_source : d7a73f871436a3c557e3ea921439da3e6f55e13c
2017-03-14 13:01:10 -04:00
Edouard Oger e4ec1eb1d3 Bug 1343735 - Respect max_record_payload_bytes limit. r=markh
MozReview-Commit-ID: 1aDwl1cq2Hh

--HG--
extra : rebase_source : a29abc5c1f3b9eefea26fe93b5ee82f4b3d12924
2017-03-15 17:12:17 -04:00
Mark Hammond dfa642bc63 Bug 1348743 - avoid running a bookmark validation on every sync. r=tcsc
MozReview-Commit-ID: 49sWR56kfrj

--HG--
extra : rebase_source : f13d7ef61b343820347579b76352cd65a322c8eb
2017-03-20 19:13:42 +11:00
Wes Kocher 1a61788cb8 Backed out changeset a2ec162fa051 (bug 1348743) for eslint failures a=backout
MozReview-Commit-ID: 2rfgqYueacf
2017-03-20 16:32:06 -07:00
Mark Hammond 10c7be4d14 Bug 1348743 - avoid running a bookmark validation on every sync. r=tcsc
MozReview-Commit-ID: 49sWR56kfrj

--HG--
extra : rebase_source : e68d0050fb3b6b48e5c61abed98827dbbf449923
2017-03-20 19:13:42 +11:00
David Rajchenbach-Teller d4d95b1155 Bug 1087255 - Convert Sync JS clients of RemovePage(s) to History.remove;r=rnewman 2014-10-31 12:36:19 +01:00
Carsten "Tomcat" Book 3e0a5441c6 Merge mozilla-central to mozilla-inbound 2017-03-17 14:55:15 +01:00
Mark Hammond f13f9ed085 Bug 1347373 - better handling of requests that have only non-existing items and of errors. r=kitcambridge
MozReview-Commit-ID: 7kcky3wJb4j

--HG--
extra : rebase_source : 108dde9145e323410e8799053581dc9bb4b80e42
2017-03-16 20:53:06 +11:00
Florian Quèze 9c4d40bb54 Bug 1345294 - script generated patch (+ some hand cleanup) to replace {get,set}ComplexValue for nsISupportsString by {get,set}StringPref, r=Mossop. 2017-03-16 19:26:01 +01:00
Joseph Cameron 4ad85c5308 Bug 1345023 - Changed SYNC_API_VERSION to 1.5 and updated SUPPORTED_PROTOCOL_VERSIONS to reflect this change. r=markh
MozReview-Commit-ID: 98knOLicr9E

--HG--
extra : rebase_source : 1acbb125c0512842abdfab068094cc744ce2d329
2017-03-15 22:18:43 -04:00
David Rajchenbach-Teller 2508d8532a Bug 1086549 - Converting Sync tests from removePage to History.remove. Patch by Yoric, updated by Standard8. r=markh
MozReview-Commit-ID: 3dZljFrvJUA

--HG--
extra : rebase_source : 355265e0dbdc169df308ba15212997373f781ea3
2014-10-24 14:57:02 +02:00
Edouard Oger a014194719 Bug 1269277 - Add Manage Device button in Synced Tabs menu/sidebar. r=markh
MozReview-Commit-ID: 2BMgLeI0DNF

--HG--
extra : rebase_source : d8e1bb4f52723071d395db3ac3c896096ca6df2a
2017-03-10 20:14:51 -05:00
Carsten "Tomcat" Book c1edc7067d merge mozilla-inbound to mozilla-central a=merge 2017-03-13 15:22:26 +01:00
Wes Kocher 77632ccd1b Merge m-c to inbound, a=merge
MozReview-Commit-ID: JXQqoTEXxwz
2017-03-10 17:22:54 -08:00
BharatR123 4e41b48a97 Bug 1332557 - Enable sync success logs by default on Nightly. r=markh
MozReview-Commit-ID: 3c0iIF1ZLr0

--HG--
extra : rebase_source : f074f570dcf2da93ccd73bf4dea3d3a8597d3b54
2017-03-10 15:33:58 +05:30
Joel Maher d1d17eb800 Bug 1345556 - adjust BUG_COMPONENT for services/blocklist/* files. r=leplatrem
MozReview-Commit-ID: LmfXawUVhIn
2017-03-10 12:26:58 -05:00
Wes Kocher 65140a44e3 Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: Gj4s6DtqKmw
2017-03-09 16:33:31 -08:00
Edouard Oger 682b54d712 Bug 1339861 - Mark Sync clients as stale if not in the FxA device list. r=markh
MozReview-Commit-ID: 84Tl3QTHInO

--HG--
extra : rebase_source : c05a5462be71b9eb0bc1bddc6a6a74f1b13088b7
2017-02-28 16:35:01 -05:00
Ethan Glasser-Camp db142ded6a Bug 1329069: Upgrade kinto-http-client.js to v4.0.0, r=MattN
Version 4.0.0 removes the default five-second timeout for all HTTP
requests. This should hopefully fix bug 1329069, bug 1335519, and bug
1333677. It should also make us more robust "in the wild" against
laggy connections or slow servers. We don't need to worry too much
about instituting our own timeout because Necko will impose a timeout
for us according to the preferences network.http.response.timeout and
network.http.keep-alive.timeout.

Version 3.0.0 updates some dependencies and changes some polyfills
around. See https://github.com/Kinto/kinto-http.js/pull/158 for more
details.

MozReview-Commit-ID: 4eAwghOpqfE

--HG--
extra : rebase_source : 9657c3b3f9f0e905845933c123fe099c4408dd29
2017-03-02 17:44:18 -05:00
BharatR123 56b41b115e Bug 1345009 - remove _migratePrefs() function and related test and references in xpcshell.ini r=markh
MozReview-Commit-ID: CbXXPLNXUet

--HG--
extra : rebase_source : 81ace434bc1ecdff3a84b9c8a978343d052ad1ea
2017-03-07 14:41:46 +05:30
Kit Cambridge 35e400d22b Bug 1345005 - Ensure validation prefs are set for all tests that run a full sync. r=tcsc
Some of our tests call `Svc.Prefs.resetBranch("")` or
`Service.startOver()`, which resets the validation prefs to their
default values. This patch makes it a bit more explicit which tests
perform a full sync, and should run validation.

MozReview-Commit-ID: 7a0wR8nuJeW

--HG--
extra : rebase_source : 18ff025671c9dd5e2e30d441940f5c2fb804cae3
2017-03-06 11:29:19 -08:00
Florian Quèze 7f1b926f29 Bug 1344711 - hand cleanup of cases that were ignored by the script to remove try blocks around get*Pref calls, r=jaws.
--HG--
extra : rebase_source : 4da1e10b87ac37de19e0ca6f79996e8a12492db9
2017-03-07 15:29:48 +01:00
Florian Quèze cd762cc83c Bug 1344711 - script-generated patch to remove try blocks around get*Pref calls, r=jaws.
--HG--
extra : rebase_source : c6e20e6e79b0ca5de751c52712d96cbea9432d26
2017-03-07 15:29:48 +01:00
Carsten "Tomcat" Book 11a63f44ea merge autoland to mozilla-central a=merge 2017-03-07 15:04:48 +01:00
ffxbld cce942762c Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release
MozReview-Commit-ID: GEyM0F1O4hP
2017-03-06 23:53:55 +01:00
Carsten "Tomcat" Book 1bc7720a43 Backed out changeset 0bd17b868a31 (bug 1335877) for causing regression bug 1344760 2017-03-06 17:03:11 +01:00
Edouard Oger 69b317e280 Bug 1321119 - Allow to Sync more tabs and reduce tabs history to 5. r=markh
MozReview-Commit-ID: 7kRg4XQeT4C

--HG--
extra : rebase_source : 7558c92cc3fefe1ade2359008df9102f5ba72322
2017-03-01 13:47:20 -05:00
Zibi Braniecki 4b7b3d4092 Bug 1335877 - Remove resource://services-common/stringbundle.js. r=rnewman
MozReview-Commit-ID: M7V6JS5myy

--HG--
extra : rebase_source : a47d739d3dd67ce563088aaf9fab5421de376cd7
2017-03-02 15:26:53 -08:00
Mark Hammond b86ff30666 Bug 1317223 (part 7) - disable tests on ASAN due to bug 1344085. r=kitcambridge
MozReview-Commit-ID: 6L72ACMcDBq
2017-03-03 10:54:45 +11:00
Mark Hammond 5712360194 Bug 1317223 (part 6) - integration tests for the bookmark repair requestor and responder. r=tcsc
A poor start, but at least it's something.

MozReview-Commit-ID: 8us4v6Y21oM
2017-03-01 23:17:05 +11:00
Mark Hammond 9b6693b8ee Bug 1317223 (part 5) - a bookmark repair responder. r=kitcambridge
This is the "repair responder" - it handles a "repairRequest" command sent
by another client and attempts to take the list of IDs that client lists as
missing and upload whatever records are necessary such that the requesting
client would then be likely to find a complete and valid tree on the server.

MozReview-Commit-ID: 4xw19nH6EfL
2017-02-28 15:34:37 +11:00
Kit Cambridge 46e87ef366 Bug 1317223 (part 4) - formalize weak tracking in `BookmarksChangeset`. r=markh
MozReview-Commit-ID: C6otrtSuhZH
2017-02-06 10:19:27 -08:00
Mark Hammond 8c4e55d022 Bug 1317223 (part 3) - a bookmark repair requestor. r=markh,tcsc
The bookmark repair requestor takes the validation results and possibly
initiates a bookmark repair.

MozReview-Commit-ID: 7rRNbBx8Vo3
2017-03-02 19:21:53 +11:00
Mark Hammond de20e8f357 Bug 1317223 (part 2) - add 'doctor' concept and move bookmark validation logic to it. r=tcsc
This patch defines the concept of a "doctor" for collections. The doctor is
responsible for running all validators and deciding whether or not to initiate
a repair request based on the validation results.

MozReview-Commit-ID: 6NLRE6L0OpA
2017-03-02 17:14:31 +11:00
Mark Hammond fdeace22db Bug 1317223 (part 1) - a collection_repair module (without any repairers) and integration with the clients engine. r=rnewman
This creates a collection_repair module, somewhat analogous to the existing
collection_validator module. This defines the public interface to request a
new repair and respond to a remote repair request, and also includes changes
to clients.js to call this public interface.

MozReview-Commit-ID: 9JPpRrLgFoR
2017-03-02 16:14:51 +11:00
Mark Hammond 79d7981ee8 Bug 1342851 - record the last-modified time of a Sync client record. r=rnewman
MozReview-Commit-ID: 2jtCsl3sy3X

--HG--
extra : rebase_source : f0d24ca1a990abd8499f7f07eb7561840441dd1a
2017-02-27 12:44:12 +11:00
Joel Maher 5708b8f058 Bug 1345556 - add BUG_COMPONENT to services/* files. r=rfkelly, kit
MozReview-Commit-ID: 3QzgxUDL5xa
2017-03-09 05:33:31 -05:00
Zibi Braniecki 100766fec4 Bug 1335877 - Remove resource://services-common/stringbundle.js from gecko. r=gandalf
MozReview-Commit-ID: FNoj7XH71E4

--HG--
extra : rebase_source : 294d3e425ca60e2aac6149998da7f39f62864ae5
2017-03-06 09:39:52 -08:00
Thom Chiovoloni 25c588b7f3 Bug 1321740 - Avoid a full sync after signing in due to fxa reauthentication. r=markh
MozReview-Commit-ID: 8wVq1RYojUS

--HG--
extra : rebase_source : d0ba2c635d1de121476e8f8a1f9d570d7f4dc48a
2017-02-21 16:18:43 -05:00
Kris Maglione 1d0cefff4a Bug 1345345: Fix preference observers reporting changes to arbitrary sub-branches. r=rhelmer
MozReview-Commit-ID: CrGHoTiw4kz

--HG--
extra : rebase_source : b0259975f6f857eb3155e4fcc2b5cc889201384d
2017-03-07 20:10:42 -08:00
Edouard Oger fe217294a0 Bug 1346136 - Add more leeway in backoff testing. r=markh
MozReview-Commit-ID: 4M86B9BVbq9

--HG--
extra : rebase_source : 726bf645306864410f18bac78c3484e347e9ff7d
2017-03-10 15:39:41 -05:00
Wes Kocher 7c2b508df2 Backed out changeset cfe8ab5f1c08 (bug 1269277) for failures in browser_aboutAccounts.js a=backout
MozReview-Commit-ID: FgcSoHPCnoH
2017-03-10 16:55:36 -08:00
Edouard Oger 036a984325 Bug 745410 - Remove microsummary support from Sync. r=kitcambridge
MozReview-Commit-ID: BdBgxHeHndj

--HG--
extra : rebase_source : 1049da5ecc1a61ef6a042f67ab37b619118eb45a
2017-03-10 15:03:07 -05:00
Edouard Oger 812a782093 Bug 1269277 - Add Manage Device button in Synced Tabs menu/sidebar. r=markh
MozReview-Commit-ID: 2BMgLeI0DNF

--HG--
extra : rebase_source : e5ace2f6dfd828c14edfd3f3d84da2b5043361b2
2017-03-09 15:53:08 -05:00
Mathieu Leplatre 0d98f89e16 Bug 1343216 - Add blocklist tags in xpcshell tests r=kmag
MozReview-Commit-ID: 8HDgdSSFxyU

--HG--
extra : rebase_source : 49a73ffcd60ea9f770ad7bc600512be19551fe5e
2017-03-02 11:23:24 +01:00
Wes Kocher 0cca2c83d5 Backed out changeset 9c8eac7852f6 (bug 745410) for build failures a=backout
MozReview-Commit-ID: JY6fS63iCwJ
2017-03-10 13:19:34 -08:00
Edouard Oger 5e9bd0d28b Bug 745410 - Remove microsummary support from Sync. r=kitcambridge
MozReview-Commit-ID: BdBgxHeHndj

--HG--
extra : rebase_source : 184b254f3299209f98cfc50f6630050a2ca29ab1
2017-03-10 15:03:07 -05:00
Wes Kocher 4894923a57 Backed out changeset 805da5d5567f (bug 1269277) for failures in browser_device_connected.js and browser_aboutAccounts.js a=backout
MozReview-Commit-ID: 1xafqaoxNWG
2017-03-10 12:31:13 -08:00
Edouard Oger a28ba6f4da Bug 1269277 - Add Manage Device button in Synced Tabs menu/sidebar. r=markh
MozReview-Commit-ID: 2BMgLeI0DNF

--HG--
extra : rebase_source : 048e6b5ede97b4908a65997cb674153c5e34c21d
2017-03-09 15:53:08 -05:00
Thom Chiovoloni 577f26289e Bug 676563 - Add dateAdded field to synced bookmarks r=markh,rnewman
MozReview-Commit-ID: 5dxoTGrypqm

--HG--
extra : rebase_source : 94af07afc4c0ae2faccc33247fa8f2df91683cce
2017-01-17 14:45:08 -05:00
Edouard Oger baba07044d Bug 1317667 - Use dates further in the future in test_bookmark_duping. r=kitcambridge
MozReview-Commit-ID: 3R3tbbzio2I

--HG--
extra : rebase_source : f87d2261859ff7195e795e2e2ba4c5285536e6cf
2017-02-27 11:44:22 -05:00
Gijs Kruitbosch b0f2da2a20 Bug 1341097 - part 3: don't dispatch oodles of titlechanged notifications for new history entries, r=mak
MozReview-Commit-ID: 7jHOcCQ5ZBb

--HG--
extra : rebase_source : 6dff335e78857e7c860ebe7ec6ea415fe0f9e3f6
2017-02-27 18:26:21 +00:00
Masatoshi Kimura 7be7b11a1c Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;

MozReview-Commit-ID: AzhtdwJwVNg

--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
2017-02-23 06:10:07 +09:00
Jorg K d3e766737e Bug 1341983 - Skip test_blocklist_certificates.js for Thunderbird. r=leplatrem
--HG--
extra : rebase_source : c8f43e08a21c0f071170834dbba7448c906fe17d
2017-02-22 22:28:00 -05:00
Kit Cambridge ffd9158f97 Bug 1335752 - Disable persistence and clean up after `RotaryEngine` in tests. r=markh
MozReview-Commit-ID: 8feE9O6Dv3W

--HG--
extra : rebase_source : c01eed08e72fd4ff654b3afed0472cb5185aec4e
2017-02-13 13:48:08 -08:00
Kit Cambridge a0eae5b8e4 Bug 1335752 - Remove all observers when finalizing the tracker. r=markh
MozReview-Commit-ID: CKc19VAO9WW

--HG--
extra : rebase_source : 804897e8a18e740483fa96e980ee63a76fa2616a
2017-02-13 13:16:30 -08:00
Thom Chiovoloni c396116b69 Bug 1337993 - Ensure we mark all current bookmarks for reupload when bookmark engine enabled state changes. r=kitcambridge
MozReview-Commit-ID: 4gOmqrzUr77

--HG--
extra : rebase_source : ee645449c2bb08cc13a6b9040a0bbdd506d5c0a3
2017-02-13 14:28:06 -05:00
Edouard Oger 54ace62c98 Bug 1244622 - Add "Show More/All" (tabs) buttons in the Synced Tabs menu. r=markh
MozReview-Commit-ID: 7z9fTVCDGgF

--HG--
extra : rebase_source : 99afed681759d8f65605f6c11a8b0c72e8012888
2017-02-06 16:31:31 -05:00
Thom Chiovoloni 7586d15716 Bug 1336186 - Check separator position in sync bookmark validator. r=markh
This reverts bug 1276152.

MozReview-Commit-ID: Cdv4XPYl4cp

--HG--
extra : rebase_source : 985e68e3908ed2abe080e7d0d9ae0c1ce338f5fe
2017-02-15 16:30:59 -05:00
Mathieu Leplatre 8e621b659c Bug 1224528 - Load initial JSON files for blocklist r=mgoodwin
MozReview-Commit-ID: D53xoTa0PZu

--HG--
extra : rebase_source : a4aa143c627df0f70c15fd3589cde7a49e30d80d
2016-12-11 14:37:22 -10:00
Ethan Glasser-Camp bf7f47db2b Bug 1328974: Record metrics for chrome.storage.sync usage, r=bsmedberg,kmag
MozReview-Commit-ID: 7c2CHLuXxS6

--HG--
extra : rebase_source : f56bf58bfdf2f3ecb7fb5dbe8ee22d3a3569ae34
extra : source : c48083c4b41537af44a38722e64d8e10987ba199
2017-01-17 13:25:02 -05:00
Carsten "Tomcat" Book 9857d2af8e merge mozilla-inbound to mozilla-central a=merge 2017-02-20 14:05:25 +01:00
Mark Hammond 7b4704dcc1 Bug 1319972 - write a session ID to sync logs. r=tcsc
MozReview-Commit-ID: GY8tvMVJ0p1

--HG--
extra : rebase_source : 757c31ada9c14633076fc0d4bfac59234913f1b6
2017-02-17 15:38:11 +11:00
Mark Hammond cd73a70071 Bug 1340357 - remove all special eslint rules in services/. r=eoger
MozReview-Commit-ID: 6zMOBoWLOhJ

--HG--
extra : rebase_source : cf546abd9a52230746c0c05f7bb716cae42815bf
2017-02-17 12:34:45 +11:00
Edouard Oger 1f7391754c Bug 1337244 - Delete previous device registration when setting-up a new FxA user. r=markh
MozReview-Commit-ID: wp4OJ1nwKH

--HG--
extra : rebase_source : 31cc6e6c40c9f0b0e6efa76032a5ae5c75281306
2017-02-14 20:07:36 +01:00
Carsten "Tomcat" Book b218b4c6ae merge mozilla-inbound to mozilla-central a=merge 2017-02-16 13:15:55 +01:00
Wes Kocher 0240235e36 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 2KYT7x0b6I1
2017-02-15 19:17:03 -08:00
Phil Ringnalda 8f2ba061cd Backed out changeset 63d0ef447e81 (bug 1224528) for Android permaorange in test_blocklist_certificates.js 2017-02-15 19:07:26 -08:00
Wes Kocher 3797956aa6 Merge m-c to inbound a=merge
MozReview-Commit-ID: BemR756HJnR
2017-02-15 16:33:03 -08:00
Mayank Srivastav dcffae55e6 Bug 1337188 - Remove unused return statement from EngineManager::register. r=kit
--HG--
extra : rebase_source : a8eea63dc3b2c208ed8ffc3ac6d0ae36e8ec8489
2017-02-15 00:42:10 +05:30
Wes Kocher ed4e580ba8 Merge m-c to autoland, a=merge
MozReview-Commit-ID: LcH4J3J7fcL
2017-02-15 19:17:26 -08:00
Ethan Glasser-Camp b228d5b47d Bug 1321570 - use dependency injection for fxAccounts, r=kmag
Get rid of the ugly hack where test code monkeypatches a singleton to
convince the rest of the ExtensionStorageSync code that a fake user is
logged in. Instead, take a handle to the fxAccounts service at
construction time. Test code can provide any kind of fxAccounts it
wants, including one that has a hard-coded user.

This provokes a bunch of changes:

- ExtensionStorageSync is now no longer a singleton, but a class. You
  have to instantiate it in order to do anything with it. A global
  instance extensionStorageSync is provided for use by Sync code as
  well as WebExtension code.

- CryptoCollection is now also a class, and each ExtensionStorageSync
  instance has its own CryptoCollection. This dependency should maybe
  also be injected, but for the time being it doesn't provide us any
  value to do so.

- Converting singletons with asynchronous methods to classes is a pain
  in the neck. We convert async method foo from `foo:
  Task.async(....)` to `async foo() { .... }`. While we're here,
  convert KeyRingEncryptionRemoteTransformer#decode to async/await to
  eliminate a need for `let self = this`.

- Update Sync code and WebExtension code to use extensionStorageSync.

- There's a cyclic dependency where CryptoCollection#sync depends on
  ExtensionStorageSync#_syncCollection which depends on
  CryptoCollection#getKeyRing. As a short-term hack, we now require an
  ExtensionStorageSync argument to CryptoCollection#sync.

- KeyRingEncryptionRemoteTransformer now takes a handle to fxAccounts
  on construction time as well. Because this is the only
  EncryptionRemoteTransformer subclass that accesses fxAccounts, we
  can get rid of the hack where the tests monkeypatch something in the
  EncryptionRemoteTransformer prototype.

- CollectionKeyEncryptionRemoteTransformer now takes a handle to a
  CryptoCollection, rather than relying on a global one.

- A bunch of methods that previously assumed access to fxAccounts now
  check if fxAccounts is present (i.e. if we're on Android). Strictly
  speaking, this isn't required by this change, but it helps make
  certain kinds of failure a little easier to diagnose.

- Update tests, including extracting a domain-specific helper method
  to hide the use of CollectionKeyEncryptionRemoteTransformer. We now
  no longer monkeypatch in our mock fxaService, but pass it to the
  test so that it can do whatever it wants with it. We also provide an
  ExtensionStorageSync instance for convenience. Access to the global
  cryptoCollection is now done through an ExtensionStorageSync
  instance.

To summarize, we've gone from a situation where a bunch of singletons
had implicit dependencies on other singletons in a shared global
namespace, to a situation where dependencies are provided explicitly
using method/constructor arguments. This highlights some of the
dependencies present:

- ExtensionStorageSync depends on CryptoCollection and fxAccounts if
  it needs to sync

- Every collection created via openCollection needs a handle to
  CryptoCollection so it can correctly create its remote transformers

- CryptoCollection needs a handle to fxAccounts so it can create its
  own remote transformer for its special collection

Most of this is only possible, or at least much easier, because we no
longer try to juggle Sqlite connections but just keep one around
forever.

However, please note:

- CryptoCollection needs a handle to ExtensionStorageSync to actually
  perform syncing logic because that's where we foolishly put the
  logic to make requests

- There's still a backing Sqlite store which is shared by everything

- There's still a singleton tracking contexts that opened extensions
  which we manage to try to clean contexts up correctly

MozReview-Commit-ID: DGIzyRTdYZ1

--HG--
extra : rebase_source : 305a98b8e1ece3ae7a5e8a2fdb5c58d8e7c496d9
2017-01-10 16:44:01 -05:00
Ethan Glasser-Camp 4f7afb05a6 Bug 1321570 - Move ExtensionStorageSync crypto out of services/sync, r=kmag
Since services/sync doesn't ship on Android, this meant
conditionally-defining some variables such as `cryptoCollection` and
`CollectionKeyEncryptionRemoteTransformer` depending on whether or not
we were on Android. However, none of these definitions really rely on
functionality that isn't present on Android (although you can't really
use them yet either). Move the dependency together with the dependant
code so we can simplify a bit. This lets us remove conditional uses of
`cryptoCollection` and `CollectionKeyEncryptionRemoteTransformer`.

Because the WebExtensions source directory has more stringent eslint
rules, we end up reformatting and commenting a bit in addition to
moving.

MozReview-Commit-ID: 2ddDeymYFNi

--HG--
rename : services/sync/tests/unit/test_extension_storage_crypto.js => toolkit/components/extensions/test/xpcshell/test_ext_storage_sync_crypto.js
extra : rebase_source : f84c0810b6a447f2104f96c9dc9d6139743f269c
2017-02-13 15:06:02 -05:00
Jonathan Hao ef8f78b212 Bug 1336867 - Remove unsafeProcessHeader and isSecureHost in nsISiteSecurityService r=keeler,mgoodwin,past
--HG--
extra : rebase_source : e4a69e18154adf22e045c820ae2b3fd8a77877a6
2017-02-08 11:17:29 +08:00