Commit graph

67 commits

Author SHA1 Message Date
Narcis Beleuzu
99f7b49656 Backed out changeset 3fa420b71260 (bug 1477113) for bc failures on browser_total.js. CLOSED TREE 2018-12-13 09:53:39 +02:00
Jared Wein
bbfb132319 Bug 1477113 - Dispatch paymentmethodchange event from the front-end. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D13740

--HG--
extra : moz-landing-system : lando
2018-12-13 06:35:30 +00:00
Matthew Noorenberghe
b82e3514a4 Bug 1495549 - Clear merchant payer errors when the payer address changes. r=jaws
Depends on D12605

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

--HG--
extra : moz-landing-system : lando
2018-12-11 18:17:31 +00:00
Matthew Noorenberghe
4d0cbeac7f Bug 1505141 - Always preserveOldProperties for payment request but blank mailing address fields by default. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D12190

--HG--
extra : moz-landing-system : lando
2018-11-21 00:46:23 +00:00
Timothy Guan-tin Chien
9ac2863a64 Bug 1504268 - Show proper OS login dialog labels when filling/editing credit cards r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11095

--HG--
extra : moz-landing-system : lando
2018-11-19 21:00:02 +00:00
Jared Wein
a75e459698 Bug 1495122 - Support regionCode and dependentLocality for merchant errors. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11844

--HG--
extra : moz-landing-system : lando
2018-11-16 04:47:15 +00:00
Csoregi Natalia
9b0f48f9d3 Backed out changeset 081704356a93 (bug 1495122) for bc failures on browser_shippingaddresschange_error.js. CLOSED TREE 2018-11-16 00:13:55 +02:00
Jared Wein
cfab10d500 Bug 1495122 - Support regionCode and dependentLocality for merchant errors. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11844

--HG--
extra : moz-landing-system : lando
2018-11-15 21:19:43 +00:00
shindli
5770e9cf94 Backed out changeset 3df92480890e (bug 1495122) as it was requested by the dev on irc 2018-11-15 23:13:12 +02:00
Jared Wein
d934d7d74c Bug 1495122 - Support regionCode and dependentLocality for merchant errors. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11844

--HG--
extra : moz-landing-system : lando
2018-11-15 21:08:07 +00:00
Matthew Noorenberghe
7130ce9204 Bug 1435880 - Handle moving/detaching tabs between windows when a Payment Request is showing. r=jaws
Depends on D10180

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

--HG--
rename : browser/components/payments/test/browser/browser_show_dialog.js => browser/components/payments/test/browser/browser_tab_modal.js
extra : moz-landing-system : lando
2018-11-15 15:06:21 +00:00
Matthew Noorenberghe
b22b368fd6 Bug 1435880 - Put the payment dialog <browser> directly in the ChromeWindow. r=jaws
Remove the intermediate <html:iframe> as it makes support of detaching impossible since we would need
to swap both the <browser> and <html:iframe> contents during a tab detach.
Since a docshell swap requires both docshells to have a frame and document loaded and the move of the
tab won't wait on payments code to do async work to get frames and documents ready for swapping, I
couldn't see a way to get detaching to work with the nested frames.

* Swapping the docshell of only the outer <html:iframe> still caused a reload of the inner <browser>.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 15:05:12 +00:00
Matthew Noorenberghe
fc94384b79 Bug 1486954 - Part IV, Recover from decryption errors in some places. r=MattN
In case of loss of OS key store key, we should still allow users to go into the manage credit cards dialog and fill the numbers back in.

This is not the migration strategy, see Part III.

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

--HG--
extra : rebase_source : dc710a2512b0d9b20e0fa74e641867525098eba2
extra : histedit_source : 4983a480565380ce4da6a0f099a5e4ae0e65797d
2018-10-22 22:57:29 -07:00
Timothy Guan-tin Chien
b2023e958b Bug 1486954 - Part I, Encrypt credit card numbers with OS key store. r=MattN
This patch morphs MasterPassword.jsm to OSKeyStore.jsm while keeping the same
API, as an adaptor between the API and the native API exposed as nsIOSKeyStore.idl.

Noted that OS Key Store has the concept of "recovery phrase" that we won't
be adopting here. The recovery phrase, together with our label, allow
the user to re-create the same key in OS key store.

Test case changes are needed because we have started asking for login in
places where we'll only do previously when "master password is enabled".
This also made some "when master password is enabled" tests invalid because
it is always considered enabled.

Some more test changes are needed simply because they previously rely on the
stable order of microtask resolutions (and the stable # of promises for a
specific operation). That has certainly changed with OSKeyStore.

The credit card form autofill is only enabled on Nightly.

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

--HG--
rename : browser/extensions/formautofill/MasterPassword.jsm => browser/extensions/formautofill/OSKeyStore.jsm
rename : browser/extensions/formautofill/test/browser/browser_creditCard_fill_master_password.js => browser/extensions/formautofill/test/browser/browser_creditCard_fill_cancel_login.js
extra : rebase_source : cabbd8cdec86e5b3965cf1c8b6e635b73b6c2095
extra : histedit_source : 65e71057104465553fefa1d0b293580efed53075
2018-10-17 02:31:04 +00:00
Matthew Noorenberghe
ec9bd73e34 Bug 1435871 - Open prefs from Payment Request in a tab. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D8497

--HG--
extra : moz-landing-system : lando
2018-10-20 03:40:05 +00:00
Matthew Noorenberghe
b059591dff Bug 1435871 - Implement a basic tab-modal dialog container for Payment Request. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D7934

--HG--
extra : moz-landing-system : lando
2018-10-20 03:39:32 +00:00
Jared Wein
e85599dc8f Bug 1494551 - Sort the formautofill data by the last used time. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D9174

--HG--
extra : moz-landing-system : lando
2018-10-19 17:00:31 +00:00
Jared Wein
eb7010591a Bug 1420853 - Ensure only fields valid for the given country are saved. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D9034

--HG--
extra : moz-landing-system : lando
2018-10-19 16:36:45 +00:00
Brindusan Cristian
1420f3437e Backed out 2 changesets (bug 1435871) for multiple browser-chrome failures on payments. CLOSED TREE
Backed out changeset 0f7592b662e2 (bug 1435871)
Backed out changeset 039f6d65036e (bug 1435871)
2018-10-19 12:36:13 +03:00
Matthew Noorenberghe
783e80be91 Bug 1435871 - Open prefs from Payment Request in a tab. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D8497

--HG--
extra : moz-landing-system : lando
2018-10-19 05:06:30 +00:00
Matthew Noorenberghe
28552cda7d Bug 1435871 - Implement a basic tab-modal dialog container for Payment Request. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D7934

--HG--
extra : moz-landing-system : lando
2018-10-19 05:06:22 +00:00
Margareta Eliza Balazs
53fc8ddacd Backed out 4 changesets (bug 1486954) for hangs on Linux. a=backout
Backed out changeset c895888bdddc (bug 1486954)
Backed out changeset 27e9286503e8 (bug 1486954)
Backed out changeset 87e64652386d (bug 1486954)
Backed out changeset 96a6e1ceb697 (bug 1486954)

--HG--
rename : browser/extensions/formautofill/OSKeyStore.jsm => browser/extensions/formautofill/MasterPassword.jsm
rename : browser/extensions/formautofill/test/browser/browser_creditCard_fill_cancel_login.js => browser/extensions/formautofill/test/browser/browser_creditCard_fill_master_password.js
2018-10-18 12:40:21 +03:00
Timothy Guan-tin Chien
3aaef61c6c Bug 1486954 - Part IV, Recover from decryption errors in some places r=MattN
In case of loss of OS key store key, we should still allow users to go into the manage credit cards dialog and fill the numbers back in.

This is not the migration strategy, see Part III.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 02:34:22 +00:00
Timothy Guan-tin Chien
f47a796bf6 Bug 1486954 - Part I, (Nighty-only feature) Encrypt credit card numbers with OS key store r=MattN
This patch morphs MasterPassword.jsm to OSKeyStore.jsm while keeping the same
API, as an adaptor between the API and the native API exposed as nsIOSKeyStore.idl.

Noted that OS Key Store has the concept of "recovery phrase" that we won't
be adopting here. The recovery phrase, together with our label, allow
the user to re-create the same key in OS key store.

Test case changes are needed because we have started asking for login in
places where we'll only do previously when "master password is enabled".
This also made some "when master password is enabled" tests invalid because
it is always considered enabled.

Some more test changes are needed simply because they previously rely on the
stable order of microtask resolutions (and the stable # of promises for a
specific operation). That has certainly changed with OSKeyStore.

The credit card form autofill is only enabled on Nightly.

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

--HG--
rename : browser/extensions/formautofill/MasterPassword.jsm => browser/extensions/formautofill/OSKeyStore.jsm
rename : browser/extensions/formautofill/test/browser/browser_creditCard_fill_master_password.js => browser/extensions/formautofill/test/browser/browser_creditCard_fill_cancel_login.js
extra : moz-landing-system : lando
2018-10-17 02:31:04 +00:00
Eden Chuang
05093acbf4 Bug 1441752 - Adding an new attribute regionCode in PaymentAddress. r=baku
--HG--
extra : histedit_source : d71b94a611ff5cd3f5b556de9157ff46a5cfeda6
2018-09-28 12:21:59 +02:00
Sam Foster
177b10d96f Bug 1477102 - Add third-party payment card logos, enable their use in official, branded builds. r=MattN
Depends on D7025

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

--HG--
extra : moz-landing-system : lando
2018-09-28 16:53:49 +00:00
Sam Foster
b6ecb8ed07 Bug 1477102 - Toggle accepted cards list on add/edit cards. Add stub for using AppConstants.MOZILLA_OFFICIAL to fallback for non-branded builds. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D7025

--HG--
extra : moz-landing-system : lando
2018-09-28 16:53:37 +00:00
Jared Wein
acbe499b25 Bug 1470184 - Update the Preferences text and layout for Web Payments. r=flod,MattN
Differential Revision: https://phabricator.services.mozilla.com/D6937

--HG--
extra : moz-landing-system : lando
2018-09-28 08:29:01 +00:00
Matthew Noorenberghe
05d5fb0939 Bug 1490805 - Add a required CSC/CVV field to the add card page. r=jaws
Depends on D6882

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

--HG--
extra : moz-landing-system : lando
2018-09-27 17:26:24 +00:00
Matthew Noorenberghe
4aaa87fe69 Bug 1432939 - Link to Firefox Options/Preferences from the PaymentRequest dialog. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D6724

--HG--
extra : moz-landing-system : lando
2018-09-25 17:26:38 +00:00
Matthew Noorenberghe
5ba6f9aa93 Bug 1480717 - Fix credit card form billing address and persist checkbox layout. r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D4175

--HG--
extra : moz-landing-system : lando
2018-09-24 19:51:39 +00:00
Jared Wein
416ff8c392 Bug 1481972 - Add remaining countries to address autofill countries list. r=MattN
Saving and filling the countries via Form Autofill will still be limited to certain countries
but this allows the storage to be useful for Web Payments in other countries.

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

--HG--
extra : amend_source : c6810478b747cf51aaaafa73f83682cb23711231
2018-09-23 23:50:03 -07:00
Sam Foster
a3ee1b5ad2 Bug 1429181 - Fix serialization of payment method data. r=MattN
* Includes a workaround to explicitly cloneInto the paymentMethods data when we create the PaymentRequest object in the content window in tests.

MozReview-Commit-ID: LFy0h3fIXXA

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

--HG--
extra : moz-landing-system : lando
2018-09-14 20:24:08 +00:00
Timothy Guan-tin Chien
4b8e9c3d4a Bug 1399367 - Remove MasterPassword.{encrypt|decrypt}Sync() methods r=MattN
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().

Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.

FormAutofillStorage can be improved if there are complex use cases for it.

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

--HG--
extra : moz-landing-system : lando
2018-09-05 17:54:48 +00:00
Csoregi Natalia
0ee540d6b5 Backed out changeset 56aa054d4cc0 (bug 1399367) for browser/extensions/formautofill/test/unit/test_activeStatus.js failures. CLOSED TREE 2018-09-05 05:47:21 +03:00
Timothy Guan-tin Chien
a3d7d3c3d1 Bug 1399367 - Remove MasterPassword.{encrypt|decrypt}Sync() methods r=MattN
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().

Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.

FormAutofillStorage can be improved if there are complex use cases for it.

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

--HG--
extra : moz-landing-system : lando
2018-09-05 00:32:57 +00:00
Marcos Cáceres
8128af9850 Bug 1485881 - Drop support for PaymentAddress.languageCode r=smaug
--HG--
extra : rebase_source : 6400765c8b669126c7a71f5094dd160b2b1a89ce
2018-08-27 16:30:00 +03:00
Sam Foster
2f87b0ad28 Bug 1477105 - Support cc-type as valid field for credit cards in form autofill. r=MattN
* Add cc-type as a valid field for credit card forms
* Add a select menu and new string for designating a card type in the add/edit form
* Enforce matching of cc-type to one of the list of supported network ids for Basic Card
* Expose the network ids list as CreditCard.SUPPORTED_TYPES
* Populate the cc-type options using a getCreditCardTypes util method passed into the EditCreditCard constructor

* Web Payment tests: verify cc-type picker is presented, populated as expected and selections received in the response

MozReview-Commit-ID: 9QyU1UwTRay

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

--HG--
extra : rebase_source : 4ffffa97e845d727f1bfbcc88218992ed7d6c5a0
2018-08-28 15:59:57 -07:00
prathiksha
c8c6fdba8f Bug 1475760 - Take address-fields into account for payer/contact picker dropdown labels. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D2831

--HG--
extra : rebase_source : 13304d7b7739ebb5a2b7d835ffaf088dc40afd17
2018-08-20 13:23:43 -07:00
Sam Foster
a4aca2683c Bug 1480880 - Fix exposing of payment defaults prefs object. r=MattN
MozReview-Commit-ID: DRSiGjk6wyS

--HG--
extra : rebase_source : 179cfde242c2ec965ef01c670baf26e7a06b92fb
2018-08-03 11:51:10 -07:00
Kris Maglione
25c94b46d8 Bug 1481021: Part 1 - Fix tests that rely on permissive COWs or SpecialPowers side-effects in frame script scopes. r=bz
Right now, a lot of test code relies on side-effects of SpecialPowers being
loaded into frame script globals. In particular:

- It forces permissive COWs from those scopes, which allows frame scripts to
  pass objects from those scopes to unprivileged content that they otherwise
  wouldn't.
- It imports a bunch of helper modules and WebIDL globals which would
  otherwise not be available.

Fortunately, this seems to only impact test code at this point. But there's a
real down-the-road risk of it impacting shipping code, which ends up working
in automation due to the side-effects of SpecialPowers, but failing in real
world use.

MozReview-Commit-ID: G27eSSOHymX

--HG--
extra : rebase_source : 1702e63fed719fc92def2bdbbb8a7c53572432db
extra : source : 41bedc526dd6ec6b7e8c7be1c832ac60c81d6263
2018-08-07 14:13:06 -07:00
Brindusan Cristian
16ec846afc Backed out 2 changesets (bug 1481021) for bc failures on security/sandbox/test/browser_bug1393259.js.
Backed out changeset c53c7b0249ad (bug 1481021)
Backed out changeset 41bedc526dd6 (bug 1481021)
2018-08-08 03:22:16 +03:00
Kris Maglione
c1969dbca2 Bug 1481021: Part 1 - Fix tests that rely on permissive COWs or SpecialPowers side-effects in frame script scopes. r=bz
Right now, a lot of test code relies on side-effects of SpecialPowers being
loaded into frame script globals. In particular:

- It forces permissive COWs from those scopes, which allows frame scripts to
  pass objects from those scopes to unprivileged content that they otherwise
  wouldn't.
- It imports a bunch of helper modules and WebIDL globals which would
  otherwise not be available.

Fortunately, this seems to only impact test code at this point. But there's a
real down-the-road risk of it impacting shipping code, which ends up working
in automation due to the side-effects of SpecialPowers, but failing in real
world use.

MozReview-Commit-ID: G27eSSOHymX

--HG--
extra : rebase_source : c528dffe3a54eec75ad6cb358980b783b00eb4a4
2018-08-07 14:13:06 -07:00
Sam Foster
30473eb88f Bug 1477106 - Use a pref to set default checkedness for "Save card to Firefox" and "Save address to Firefox" checkboxes. r=jaws
* Get default checkedness for the card persist checkbox from a new pref: dom.payments.defaults.saveCreditCard
* Get default checkedness for the address persist checkbox from a new pref: dom.payments.defaults.saveAddress
* Remember checked state from card page (only) so it doesnt change back when returning from add/edit address page
* Fix up card form tests to verify behavior in private/not-private windows, pref value, user opt-in for persisting the card
* Fix up address form tests to not conflate private/not-private windows with expected address persisting behaviour

MozReview-Commit-ID: GXMjqStlnlu

--HG--
extra : rebase_source : e267187766d221e4f865cb84065ea18231e7c012
2018-07-26 15:36:07 -07:00
Andreea Pavel
e3d83161a1 Backed out changeset d69e19bad6c1 (bug 1477106) for eslint failure at builds/worker/checkouts/gecko/browser/components/payments/content/paymentDialogFrameScript.js 2018-08-02 02:11:57 +03:00
Sam Foster
5275a24aca Bug 1477106 - Use a pref to set default checkedness for "Save card to Firefox" and "Save address to Firefox" checkboxes. r=jaws
* Get default checkedness for the card persist checkbox from a new pref: dom.payments.defaults.saveCreditCard
* Get default checkedness for the address persist checkbox from a new pref: dom.payments.defaults.saveAddress
* Remember checked state from card page (only) so it doesnt change back when returning from add/edit address page
* Fix up card form tests to verify behavior in private/not-private windows, pref value, user opt-in for persisting the card
* Fix up address form tests to not conflate private/not-private windows with expected address persisting behaviour

MozReview-Commit-ID: GXMjqStlnlu

--HG--
extra : rebase_source : eb5931bff4ba348503144139d3f7f625e0a4af91
2018-07-26 15:36:07 -07:00
Mark Banner
8d235f8e45 Bug 1478305 - Remove unnecessary imports and fix ESLint warnings about unused variables for browser/. r=jaws
MozReview-Commit-ID: 1vHR6ixePkN

--HG--
extra : rebase_source : 8f9a322d1ff075ab56b81f8710df5d841839865b
2018-07-30 10:27:36 +01:00
Matthew Noorenberghe
b0560084b3 Bug 1476204 - Handle autofill record update state changes in the unpriv. PR forms. r=jaws
This is easier to understand as we don't have to round-trip the whole success and error states to the privileged wrapper which could potentially lead to stale state changes.
This is also much simpler for the basic-card-form as it doesn't need a lot of the complexity of the previous implementation.

* Move selectedStateKey from page to address-page since it doesn't apply to basic-card-page

MozReview-Commit-ID: B4kiZNWElGI

--HG--
extra : rebase_source : bcca13bbdc506961834e2e3cc078dad7d6ee7ca7
2018-07-25 12:37:51 -07:00
Cosmin Sabou
80a830bce7 Backed out 5 changesets (bug 1476204) for browser chrome failures on browser_editCreditCardDialog. CLOSED TREE
Backed out changeset 10f3d1014592 (bug 1476204)
Backed out changeset a88879ea32e8 (bug 1476204)
Backed out changeset 001f13f2dd21 (bug 1476204)
Backed out changeset f0f464e3c27c (bug 1476204)
Backed out changeset ed92000eca20 (bug 1476204)
2018-07-26 04:12:56 +03:00
Matthew Noorenberghe
46813c4815 Bug 1476204 - Handle autofill record update state changes in the unpriv. PR forms. r=jaws
This is easier to understand as we don't have to round-trip the whole success and error states to the privileged wrapper which could potentially lead to stale state changes.
This is also much simpler for the basic-card-form as it doesn't need a lot of the complexity of the previous implementation.

* Move selectedStateKey from page to address-page since it doesn't apply to basic-card-page

MozReview-Commit-ID: B4kiZNWElGI

--HG--
extra : rebase_source : 183a3bd44ed33566fccdc024eabdccef83554d50
2018-07-25 12:37:51 -07:00