Commit graph

29 commits

Author SHA1 Message Date
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
Matthew Noorenberghe
a6b3276e31 Bug 1463538 - Remove the formautofill-storage-changed observer at PR dialog unload. r=jaws
MozReview-Commit-ID: H0PWlps796I

--HG--
extra : rebase_source : 52430c8af7604c33be87199953fc45f16b62bd48
2018-07-21 22:17:49 -07:00
Gurzau Raul
cd2f4fd65e Backed out 4 changesets (bug 1463538) for failing on /payments/test/browser/browser_payments_onboarding_wizard.js
Backed out changeset 1c945ede0071 (bug 1463538)
Backed out changeset 8ccd9f4b230d (bug 1463538)
Backed out changeset e078fb39875e (bug 1463538)
Backed out changeset 798bf0d7928c (bug 1463538)
2018-07-24 11:16:21 +03:00
Matthew Noorenberghe
cb1a98462c Bug 1463538 - Remove the formautofill-storage-changed observer at PR dialog unload. r=jaws
MozReview-Commit-ID: H0PWlps796I

--HG--
extra : rebase_source : 52430c8af7604c33be87199953fc45f16b62bd48
2018-07-21 22:17:49 -07:00
Sam Foster
799c3f4923 Bug 1447777 - Add completion fail and timeout error pages. r=MattN
* A new CompletionErrorPage / completion-error-page element which represents the content of the completion error
* Leave the dialog open when complete() results in a 'fail' or 'timeout'.
* The 'done' button on the fail & timeout error page closes the dialog by sending a message up to the paymentDialogWrapper.
* Rewrite the pay button rendering logic to ensure it is disabled when it should be
* Retry handling and UI not addressed here. Will need a new bug when the DOM support has landed.
* Extend completeStatus support in debugging.html and group like actions to tidy up a bit

MozReview-Commit-ID: GDhJqrj14uT

* Add tests to verify that the dialog stays open when completion fails or times out
* Add tests to verify that complete() throws after the timeout
* Rework completeStatus mochitest for PaymentDialog

MozReview-Commit-ID: 4ZNVEYMp7h5

--HG--
extra : rebase_source : 1d8e691eb44e74156a956dff73e1359af2a6934a
2018-07-20 15:51:52 -07:00
Sam Foster
1830053e3f Bug 1468644 - cc-numbers are always masked in dialog content; tests to verify this and card details in the payment response. r=jaws
MozReview-Commit-ID: 34MkjyRBth7

--HG--
extra : rebase_source : 04a75ec0d87d9458fab314fe42dddd798957cb61
2018-07-18 12:45:45 -07:00
Kris Maglione
a4453fc75f Bug 1474140: Don't load FormAutofillUtils.jsm at content process startup. r=MattN
MozReview-Commit-ID: 2bOyTPU9QbX

--HG--
extra : rebase_source : 8f8c7e216612437f853df2b5cc8dd5fb3174d10b
2018-07-07 17:49:34 -07:00
Sam Foster
4cf8d4350f Bug 1463608 - Expose FormAutofill computeFields methods, use them for temporary records in payments. r=MattN
* Test helpers for cards
* Refactor the test_add_link test to test in private & non-private window

MozReview-Commit-ID: AeVJOkSwQps

--HG--
extra : rebase_source : 6e8380826bcac87bc408ff75a6a398b5c4f6cafa
2018-05-30 16:56:25 -07:00
Matthew Noorenberghe
8378baa979 Bug 1466720 - Don't reload l10n.js in the PaymentRequest scope on a refresh. r=sfoster
There was an error trying to redefine variables from l10n.js via loadSubScript. We really only need
it loaded once like a frame script but I had to fix the l10n.js code to handle this properly.

MozReview-Commit-ID: EbNrEaRQJbs

--HG--
extra : rebase_source : 6e544dd61798ebe3865ca108e59392a1319d7eeb
2018-06-11 00:03:47 -07:00
Jared Wein
3c2f74832e Bug 1429180 - Change selectedStateKey to an array that defines the path within the state object that should be updated. r=MattN
MozReview-Commit-ID: IjJfmUtvjdz

--HG--
extra : rebase_source : 9a866b4823885d326e53f6fda46a6005b5cf5e41
2018-05-21 22:05:47 -04:00
Jared Wein
d9f3ec17f2 Bug 1429180 - Option to use a new billing address when adding a new payment method. r=MattN
MozReview-Commit-ID: 5LrpUw1LdT3

--HG--
extra : rebase_source : a2266d92902800af60978011ccd34bdc7a06b7f5
2018-05-10 15:12:01 -04:00
Matthew Noorenberghe
5490760c38 Bug 1463292 - Use form autofill's l10n.js in the PaymentRequest dialog. r=sfoster
MozReview-Commit-ID: GUX3Gia293X

--HG--
extra : rebase_source : 73887f40c0a6b45896ece2aab5918cb8089b9df3
2018-05-22 10:37:54 -07:00
Sam Foster
ec6b7b7e5e Bug 1427960 - Add temporary addresses to state, add toggle to enable saving/not new addresses. r=MattN
* Implement store in paymentDialogWrapper for temporary addresses & creditCards
* Add the persist checkbox to the add/edit address form. Defaults to unchecked when adding an address in a private session.
* The union of saved and temporary addresses can be retrieved from paymentRequest.getAddresses(). References to state.savedAddresses updated to use this when appropriate
* New tests for adding and editing addresses from a private window


MozReview-Commit-ID: KyD2BPNFYtZ

--HG--
extra : rebase_source : 28e17a2c018a684fab42b1321b739047b1522884
2018-04-26 15:05:10 -07:00
Matthew Noorenberghe
08d188e41d Bug 1443735 - Don't select a PaymentRequest shipping address by default. r=sfoster
This is possibly a temporary solution to avoid sending the user's address to the merchant until they've interacted with the shipping address picker.

MozReview-Commit-ID: 5q8BYr1rLwP

--HG--
extra : rebase_source : e6c5ecee96acc4aaa25c2082b7d6a654bb82e135
2018-05-17 15:48:04 -07:00
Matthew Noorenberghe
e2784528d8 Bug 1458376 - Use a <xul:browser> to display the PaymentRequest UI to fix <select> dropdowns. r=jaws
This fixes <select> dropdowns and also gets rid of the thin bottom gray line in the dialog.

MozReview-Commit-ID: I7v0mVjAnQZ

--HG--
rename : browser/components/payments/content/paymentDialogWrapper.xhtml => browser/components/payments/content/paymentDialogWrapper.xul
extra : rebase_source : 98bdde63ee1bcc1ffcdd8db6cd61962edefb6348
2018-05-10 22:05:04 -07:00
Jared Wein
bb6a861576 Bug 1446203 - Basic Payment Request Shipping Address Add/Edit page. r=MattN
MozReview-Commit-ID: 9f0vPciw65V

--HG--
extra : rebase_source : 1001a0d64245b9f47ede8f2f1986b38100044a16
2018-04-10 11:53:16 -04:00
Kris Maglione
a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Matthew Noorenberghe
c0d0384218 Bug 1457287 - Move Payment Request UI code to browser/. r=jaws
MozReview-Commit-ID: LjrRXr1thc8

--HG--
rename : toolkit/components/payments/.eslintrc.js => browser/components/payments/.eslintrc.js
rename : toolkit/components/payments/content/paymentDialogFrameScript.js => browser/components/payments/content/paymentDialogFrameScript.js
rename : toolkit/components/payments/content/paymentDialogWrapper.css => browser/components/payments/content/paymentDialogWrapper.css
rename : toolkit/components/payments/content/paymentDialogWrapper.js => browser/components/payments/content/paymentDialogWrapper.js
rename : toolkit/components/payments/content/paymentDialogWrapper.xhtml => browser/components/payments/content/paymentDialogWrapper.xhtml
rename : toolkit/components/payments/docs/index.rst => browser/components/payments/docs/index.rst
rename : toolkit/components/payments/jar.mn => browser/components/payments/jar.mn
rename : toolkit/components/payments/moz.build => browser/components/payments/moz.build
rename : toolkit/components/payments/paymentUIService.js => browser/components/payments/paymentUIService.js
rename : toolkit/components/payments/payments.manifest => browser/components/payments/payments.manifest
rename : toolkit/components/payments/res/PaymentsStore.js => browser/components/payments/res/PaymentsStore.js
rename : toolkit/components/payments/res/components/address-option.css => browser/components/payments/res/components/address-option.css
rename : toolkit/components/payments/res/components/address-option.js => browser/components/payments/res/components/address-option.js
rename : toolkit/components/payments/res/components/basic-card-option.css => browser/components/payments/res/components/basic-card-option.css
rename : toolkit/components/payments/res/components/basic-card-option.js => browser/components/payments/res/components/basic-card-option.js
rename : toolkit/components/payments/res/components/currency-amount.js => browser/components/payments/res/components/currency-amount.js
rename : toolkit/components/payments/res/components/labelled-checkbox.js => browser/components/payments/res/components/labelled-checkbox.js
rename : toolkit/components/payments/res/components/payment-details-item.css => browser/components/payments/res/components/payment-details-item.css
rename : toolkit/components/payments/res/components/payment-details-item.js => browser/components/payments/res/components/payment-details-item.js
rename : toolkit/components/payments/res/components/rich-option.js => browser/components/payments/res/components/rich-option.js
rename : toolkit/components/payments/res/components/rich-select.css => browser/components/payments/res/components/rich-select.css
rename : toolkit/components/payments/res/components/rich-select.js => browser/components/payments/res/components/rich-select.js
rename : toolkit/components/payments/res/components/shipping-option.css => browser/components/payments/res/components/shipping-option.css
rename : toolkit/components/payments/res/components/shipping-option.js => browser/components/payments/res/components/shipping-option.js
rename : toolkit/components/payments/res/containers/address-picker.js => browser/components/payments/res/containers/address-picker.js
rename : toolkit/components/payments/res/containers/basic-card-form.js => browser/components/payments/res/containers/basic-card-form.js
rename : toolkit/components/payments/res/containers/order-details.css => browser/components/payments/res/containers/order-details.css
rename : toolkit/components/payments/res/containers/order-details.js => browser/components/payments/res/containers/order-details.js
rename : toolkit/components/payments/res/containers/payment-dialog.js => browser/components/payments/res/containers/payment-dialog.js
rename : toolkit/components/payments/res/containers/payment-method-picker.js => browser/components/payments/res/containers/payment-method-picker.js
rename : toolkit/components/payments/res/containers/shipping-option-picker.js => browser/components/payments/res/containers/shipping-option-picker.js
rename : toolkit/components/payments/res/debugging.css => browser/components/payments/res/debugging.css
rename : toolkit/components/payments/res/debugging.html => browser/components/payments/res/debugging.html
rename : toolkit/components/payments/res/debugging.js => browser/components/payments/res/debugging.js
rename : toolkit/components/payments/res/mixins/ObservedPropertiesMixin.js => browser/components/payments/res/mixins/ObservedPropertiesMixin.js
rename : toolkit/components/payments/res/mixins/PaymentStateSubscriberMixin.js => browser/components/payments/res/mixins/PaymentStateSubscriberMixin.js
rename : toolkit/components/payments/res/paymentRequest.css => browser/components/payments/res/paymentRequest.css
rename : toolkit/components/payments/res/paymentRequest.js => browser/components/payments/res/paymentRequest.js
rename : toolkit/components/payments/res/paymentRequest.xhtml => browser/components/payments/res/paymentRequest.xhtml
rename : toolkit/components/payments/res/unprivileged-fallbacks.js => browser/components/payments/res/unprivileged-fallbacks.js
rename : toolkit/components/payments/res/vendor/custom-elements.min.js => browser/components/payments/res/vendor/custom-elements.min.js
rename : toolkit/components/payments/res/vendor/custom-elements.min.js.map => browser/components/payments/res/vendor/custom-elements.min.js.map
rename : toolkit/components/payments/server.py => browser/components/payments/server.py
rename : toolkit/components/payments/test/PaymentTestUtils.jsm => browser/components/payments/test/PaymentTestUtils.jsm
rename : toolkit/components/payments/test/browser/.eslintrc.js => browser/components/payments/test/browser/.eslintrc.js
rename : toolkit/components/payments/test/browser/blank_page.html => browser/components/payments/test/browser/blank_page.html
rename : toolkit/components/payments/test/browser/browser.ini => browser/components/payments/test/browser/browser.ini
rename : toolkit/components/payments/test/browser/browser_card_edit.js => browser/components/payments/test/browser/browser_card_edit.js
rename : toolkit/components/payments/test/browser/browser_change_shipping.js => browser/components/payments/test/browser/browser_change_shipping.js
rename : toolkit/components/payments/test/browser/browser_host_name.js => browser/components/payments/test/browser/browser_host_name.js
rename : toolkit/components/payments/test/browser/browser_profile_storage.js => browser/components/payments/test/browser/browser_profile_storage.js
rename : toolkit/components/payments/test/browser/browser_request_serialization.js => browser/components/payments/test/browser/browser_request_serialization.js
rename : toolkit/components/payments/test/browser/browser_request_shipping.js => browser/components/payments/test/browser/browser_request_shipping.js
rename : toolkit/components/payments/test/browser/browser_request_summary.js => browser/components/payments/test/browser/browser_request_summary.js
rename : toolkit/components/payments/test/browser/browser_shippingaddresschange_error.js => browser/components/payments/test/browser/browser_shippingaddresschange_error.js
rename : toolkit/components/payments/test/browser/browser_show_dialog.js => browser/components/payments/test/browser/browser_show_dialog.js
rename : toolkit/components/payments/test/browser/browser_total.js => browser/components/payments/test/browser/browser_total.js
rename : toolkit/components/payments/test/browser/head.js => browser/components/payments/test/browser/head.js
rename : toolkit/components/payments/test/mochitest/.eslintrc.js => browser/components/payments/test/mochitest/.eslintrc.js
rename : toolkit/components/payments/test/mochitest/formautofill/mochitest.ini => browser/components/payments/test/mochitest/formautofill/mochitest.ini
rename : toolkit/components/payments/test/mochitest/formautofill/test_editCreditCard.html => browser/components/payments/test/mochitest/formautofill/test_editCreditCard.html
rename : toolkit/components/payments/test/mochitest/mochitest.ini => browser/components/payments/test/mochitest/mochitest.ini
rename : toolkit/components/payments/test/mochitest/payments_common.js => browser/components/payments/test/mochitest/payments_common.js
rename : toolkit/components/payments/test/mochitest/test_ObservedPropertiesMixin.html => browser/components/payments/test/mochitest/test_ObservedPropertiesMixin.html
rename : toolkit/components/payments/test/mochitest/test_PaymentStateSubscriberMixin.html => browser/components/payments/test/mochitest/test_PaymentStateSubscriberMixin.html
rename : toolkit/components/payments/test/mochitest/test_PaymentsStore.html => browser/components/payments/test/mochitest/test_PaymentsStore.html
rename : toolkit/components/payments/test/mochitest/test_address_picker.html => browser/components/payments/test/mochitest/test_address_picker.html
rename : toolkit/components/payments/test/mochitest/test_basic_card_form.html => browser/components/payments/test/mochitest/test_basic_card_form.html
rename : toolkit/components/payments/test/mochitest/test_currency_amount.html => browser/components/payments/test/mochitest/test_currency_amount.html
rename : toolkit/components/payments/test/mochitest/test_labelled_checkbox.html => browser/components/payments/test/mochitest/test_labelled_checkbox.html
rename : toolkit/components/payments/test/mochitest/test_order_details.html => browser/components/payments/test/mochitest/test_order_details.html
rename : toolkit/components/payments/test/mochitest/test_payer_address_picker.html => browser/components/payments/test/mochitest/test_payer_address_picker.html
rename : toolkit/components/payments/test/mochitest/test_payment_details_item.html => browser/components/payments/test/mochitest/test_payment_details_item.html
rename : toolkit/components/payments/test/mochitest/test_payment_dialog.html => browser/components/payments/test/mochitest/test_payment_dialog.html
rename : toolkit/components/payments/test/mochitest/test_payment_method_picker.html => browser/components/payments/test/mochitest/test_payment_method_picker.html
rename : toolkit/components/payments/test/mochitest/test_rich_select.html => browser/components/payments/test/mochitest/test_rich_select.html
rename : toolkit/components/payments/test/mochitest/test_shipping_option_picker.html => browser/components/payments/test/mochitest/test_shipping_option_picker.html
rename : toolkit/components/payments/test/unit/.eslintrc.js => browser/components/payments/test/unit/.eslintrc.js
rename : toolkit/components/payments/test/unit/head.js => browser/components/payments/test/unit/head.js
rename : toolkit/components/payments/test/unit/test_response_creation.js => browser/components/payments/test/unit/test_response_creation.js
rename : toolkit/components/payments/test/unit/xpcshell.ini => browser/components/payments/test/unit/xpcshell.ini
2018-04-27 07:20:32 -07:00