Commit Graph

161 Commits

Author SHA1 Message Date
Eden Chuang
7ed3a1055d Bug 1501823 - mochitest update for bug 1501823. r=baku 2018-11-21 11:17:45 +01:00
Eden Chuang
974f7da95a bug 1501823 - Force to call PaymentUIService.showPayment() when PaymentRequest.show called with a promise parameter. r=baku
1. Adding a new completeStatus 'initial' for nsIPaymentRequest.completeStatus
       to indicate the status of the showing PaymentRequest for Payment UI component.
    2. Removing the PaymentRequest::mDeferredShow and calling
       PaymentRequestManager::showPayment() when PaymentRequest::Show() called
       with a detailsUpdate parameter to inform UI component to support better
       user experience.
2018-11-21 11:03:21 +01:00
Matthew Noorenberghe
589b8d294e Bug 1435880 - Temporarily disable test_abortPayment and test_canMakePayment due a new leak exposed. r=edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D11924

--HG--
extra : moz-landing-system : lando
2018-11-15 15:06:34 +00:00
Diego Pino Garcia
84e713c49f Bug 1501102 - Move hard-coded 'supportedRegions' array to a pref to allow developers outside US/CA to test PaymentRequest. r=baku,MattN
--HG--
extra : rebase_source : 1661ff1d2b0ea9276a3a32953c94cedd5694fed8
2018-11-14 00:59:00 +02:00
Eden Chuang
9b43e53126 bug 1497111 - Remove unnecessarily null'ed out values of PaymentRequest.webidl. r=baku
--HG--
extra : histedit_source : 5a1a3f3a49540f92b32a0b94f07e65bb71382d09
2018-11-12 17:24:54 +01:00
Brindusan Cristian
a14f91e1ee Backed out changeset 9ee2e7c7fa16 (bug 1497111) for wpt failures on payment-request-constructor.https.html. 2018-11-13 17:02:02 +02:00
Eden Chuang
330656ca6f bug 1497111 - Remove unnecessarily null'ed out values of PaymentRequest.webidl. r=baku 2018-11-12 17:24:54 +01:00
Marcos Cáceres
da6078096e Bug 1504032 - Remove concept of card types, supportedTypes, BasicCardType enum r=MattN,baku
The concept of card types, supportedTypes, BasicCardType enum, were removed from the Basic Card spec.

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

--HG--
extra : moz-landing-system : lando
2018-11-10 06:59:26 +00:00
Eden Chuang
7020e04316 bug 1477409 - Part 1 - Instead of passing tabId, passing outerWindowId to Payment UI component. r=baku
--HG--
extra : histedit_source : 5480494582d1de6bcdac2ff295815d3182909697
2018-11-06 14:42:36 +01:00
Marcos Cáceres
025e21c6ce Bug 1504046 - Typo in tests "reqeustPayerPhone" should be "requestPayerPhone". r=edenchuang
typo fix, with no consequence

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

--HG--
extra : moz-landing-system : lando
2018-11-04 21:24:19 +00:00
Eden Chuang
74e578d048 Bug 1497215 - Refactor the IPC structure for PaymentResponse.details r=baku
In original design, payment method response data is passed between processes
    through a simple nsString. It means a special encoder/decoder is needed for
    special response data, ex. BasicCardResponse, to serialize/deserialize
    into/from the nsString. However, when a token spliter, ':', ';' and '@', is
    used in response data, it makes the encoder/decoder can not work normally.
    It is hard to define a suitable token spliter set for encoder/decoder.
    So instead of using an error-prone encoder/decoder, this patch defining a new
    IPC structure for response data.

--HG--
extra : rebase_source : 4972033516bc861ea3f975a27b7688fc6eb89a94
2018-10-29 13:56:32 +01:00
Diego Pino Garcia
0ad023d797 Bug 1481971 - Enable PaymentRequest on Nightly for Windows/macOS for US/CA users on en-US builds r=MattN,baku,gandalf
--HG--
extra : rebase_source : afd01adfdfdd57b497dff28e674b69e2a7d9e73a
2018-10-16 16:14:12 -07:00
shindli
2eb594138a Merge inbound to mozilla-central. a=merge 2018-10-17 03:55:26 +03:00
Marcos Cáceres
6de37261e9 Bug 1497699 - Drop support for PaymentItem.type. r=edenchuang,baku
Being removed from the spec. Front-end no longer needs this.

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

--HG--
extra : moz-landing-system : lando
2018-10-16 12:53:01 +00:00
Eden Chuang
c91739f1ee Bug 1495301 - Disbale payment-request web-platform tests on non-nightly build. r=a=test-only,revert
--HG--
extra : rebase_source : 750491c3776bb2154991d18c2e174b9ac83b3fb2
2018-10-12 14:40:43 +02:00
Eden Chuang
06b22c4730 Bug 1441752 - mochitest for PaymentAddress.regionCode. r=baku
--HG--
extra : histedit_source : 001baedcafb580b95543be263d38f6dee2ac620d
2018-10-04 11:35:03 +02: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
Andrea Marchesini
da30b53c07 Bug 1496114 - PaymentRequest CTOR is controlled by pref, r=marcosc 2018-10-04 07:17:33 +02:00
Andrew McCreight
837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Marcos Cáceres
70744c3261 Bug 1495335 - Rename PayerErrorFields to PayerErrors. r=baku 2018-10-01 03:44:00 -04:00
Andrea Marchesini
319c43d823 Bug 1495303 - FeaturePolicy: payment, r=marcosc 2018-10-01 11:59:57 +02:00
arthur.iakab
b5ec6b9d2b Backed out changeset 6daf4f561843 (bug 1495303)for failing web-platform tests on /payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html 2018-10-01 14:51:26 +03:00
Andrea Marchesini
f48b6e8ca4 Bug 1495303 - FeaturePolicy: payment, r=marcosc 2018-10-01 11:59:57 +02:00
Marcos Cáceres
ce4c75065c Bug 1489968 - Implement BasicCardErrors for PaymentRequest. r=edenchuang,baku
Differential Revision: https://phabricator.services.mozilla.com/D6378

--HG--
extra : moz-landing-system : lando
2018-09-27 08:03:14 +00:00
Marcos Cáceres
04d3d9b0ed Bug 1493070 - file test_payerDetails.html requests long timeout. r=edenchuang
file test_payerDetails.html requests long timeout. r=edenchuang

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

--HG--
extra : moz-landing-system : lando
2018-09-25 10:21:46 +00:00
Margareta Eliza Balazs
ffe6eaf2f0 Merge inbound to mozilla-central. a=merge 2018-09-25 12:42:09 +03:00
Marcos Cáceres
d8a1368253 Bug 1493052 - MerchantValidationEvent.complete() must throw InvalidStateError.
Spec conformance

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

--HG--
extra : moz-landing-system : lando
2018-09-24 05:39:55 +00:00
Eden Chuang
d1c216b95e Bug 1478740 - mochitest for multiple PaymentRequest.show(). r= baku
Adding a testcase for testing multiple PaymentRequest.show() at the same time
2018-09-20 14:29:38 +02:00
Eden Chuang
dff10f1a39 Bug 1478740 - Part 2 - remove PaymentRequestManager::mShowingRequest. r=baku.
Removing PaymentRequestManager::mShowingRequest and related code.
    PaymentRequest showing is controlled by PaymentRequestService in chrome
    process, before we come out the solution for bug 1469419, we don't need
    showing control in content process.
2018-09-11 16:41:43 +02:00
Eden Chuang
6330d66467 Bug 1478740 - Part 1 - Fix the bug when clearing PaymentRequestService::mShowingRequest. r=baku
1. Adding a checking before clearing PaymentRequestService::mShowingRequest.
       Clearing PaymentRequestService::mShowingRequest when it is rejected.
    2. Adding an internal method nsresult ShowPayment(const nsAString& requestId)
       to remove the duplicate code in PaymentRequestService.
2018-09-20 14:03:19 +02:00
Matthew Noorenberghe
5cc8014d08 Bug 1491996 - Add a pref to disable the user activation/gesture requirement for PaymentRequest.show(). r=baku
Differential Revision: https://phabricator.services.mozilla.com/D6092

--HG--
extra : moz-landing-system : lando
2018-09-19 15:32:22 +00:00
Marcos Cáceres
f616da00ba Bug 1472026 - Implement PaymentResponse.prototype.onpayerdetailchange. r=edenchuang,baku
Implement PaymentResponse.prototype.onpayerdetailchange, per spec.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 11:23:33 +00:00
shindli
70bf79757d Backed out changeset 376c2bf5bcbf (bug 1472026) for PaymentRequest failures in dom/payments/test/test_block_none10s.html 2018-09-19 12:31:51 +03:00
Marcos Cáceres
9dd1b3aeae Bug 1472026 - Implement PaymentResponse.prototype.onpayerdetailchange. r=edenchuang,baku
Implement PaymentResponse.prototype.onpayerdetailchange, per spec.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 08:41:53 +00:00
Eden Chuang
fedf18933b Bug 1490698 - Add state checking when interactive with PaymentRequest through PaymentRequestService. r=edenchuang
Add state checking when calling RespondPayment(), ChangeShippingAddress()
    and ChangeShippingOption().
    Calling ChangeShippingXXX is valid when the PaymentRequest state is interactive.
    Calling RespondPayment is valid when following situations
      1. PaymentRequest state is interactive
      2. PaymentRequest state is closed but the response is for CompleteAction.
      3. PaymentRequest state is created but the response is for CanMakeAction.

--HG--
extra : histedit_source : 9ae63e409813154de42cc33024835ac5f0c96893
2018-09-13 15:40:18 +02:00
Eden Chuang
2a00dce583 Bug 1490698 - mochitest for bug 1490698. r=baku
Adding testcase for interacting with PaymentRequest in wrong PaymentRequest
    state. Calling RespondPayment(), ChangeShippingOption() and
    ChangeShippingAddress() in wrong state should return error. This test case
    verifying the behavior when calling these methods when PaymentRequest state
    is eClosed and after PaymentResponse::complete() called.

--HG--
extra : histedit_source : 3e70e64ac739dd7d8cbc4627dbdbd64462ae4211
2018-09-13 01:58:10 +02:00
Marcos Cáceres
058bb67c47 Bug 1490599 - Implement MerchantValidationEvent.prototype.methodName attribute. r=baku 2018-09-13 21:06:00 +03:00
Marcos Cáceres
eb155e743a Bug 1474499 - Add support for onmerchantvalidation and MerchantValidationEvent. r=edenchuang,baku 2018-09-12 22:56:00 +03:00
arthur.iakab
620bc5019f Backed out changeset ebe2c08a2454 (bug 1474499) for failing web platform tests on ValidationEvent/constructor.https.html 2018-09-11 19:30:23 +03:00
Marcos Cáceres
e4203c1813 Bug 1474499 - Add support for onmerchantvalidation and MerchantValidationEvent. r=edenchuang,baku
--HG--
extra : rebase_source : 5b5488fb1bb6c9f901a8c22c12aa635ebf8381c8
2018-09-11 06:00:00 +03:00
Eden Chuang
c5ec825b8f Bug 1435161 - Part 3 support error fields in PaymentDetailsUpdate. r=baku
To support merchants providing the payment details with errors by
    PaymentRequestUpdateEvent.updateWith() during PaymentResponse.retry(),
    PaymentDetailsUpdate needs to add more two attributes in webidl.
      dictionary PaymentDetailsUpdate {
        ...
        PayerErrorFields payerErrors;
        object           paymentMethodErrors;
      };
    And transfer these error field to UI component
2018-09-04 16:00:33 +02:00
Eden Chuang
7058aae68b Bug 1435161 - Part 2 supporting PaymentResponse.retry(). r=baku
1. Add PaymentValidationErrors and PayerErrorFields in PaymentRequest.webidl
       and PaymentResponse.retry() in PaymentResponse.webidl
    2. Implement PaymentRequest.retryPayment() and
       PaymentRequestManager.retryPayment() in content process.
    3. Add IPCPaymentRetryActionRequest in PPaymentRequest.ipdl to transfer the
       error fields to chrome process.
    4. Implement PaymentResponse.retry() by reusing the code of show() and
       updateWith() of PaymentRequestService in chrome process.
2018-09-04 12:28:40 +02:00
Eden Chuang
92d58a1b87 Bug 1435161 - Part 1 Removing unnecessary XPCOM components for PaymentRequest API. r=baku
Remove the unnecessary XPCOM component nsIPaymentActionRequest and
    nsIPaymentActionCallback. These two components are only used in C++ and they
    need not to expose to the front end.
2018-08-30 14:13:33 +02:00
Eden Chuang
f4764c9019 Bug 1435161 - mochitest for PaymentResponse.retry(). r=baku
1. Add testcase testRetryAfterComplete to test the behavior of retry() after
       complete().
    2. Add testcase testRetryAfterRetry to test the multiple retry()s in the same
       round.
    3. Add testcase testRetryWithEmptyErrors to test the retry() called with an
       empty PaymentValidationErrors.
    4. Add testcase testRetry to test the normal flow of retry().
    5. Add testcase testRetryAbortByUser to test the retry() aborted by user.
2018-09-04 12:30:18 +02:00
Marcos Cáceres
ef9e5ae876 Bug 1487295 - Add defaults to PaymentMethodChangeEventInit's members. r=baku
--HG--
extra : rebase_source : d5f1590effbec2085672aa4a1552cbb798b4530b
2018-09-10 04:44:00 +03:00
Dorel Luca
f012e0b9a2 Backed out 2 changesets (bug 1487295) for WPT failres in payment-request/PaymentMethodChangeEvent/methodDetails-attribute.https.html
Backed out changeset 33cb5cf879d8 (bug 1487295)
Backed out changeset b5657f72bcb0 (bug 1487295)
2018-09-07 12:50:07 +03:00
Marcos Cáceres
a4a6a91838 Bug 1487295 - Add defaults to PaymentMethodChangeEventInit's members. r=baku
--HG--
extra : amend_source : 160b5a164fff0faf5a137b0dd0c50c6d5d859740
2018-09-06 23:53:00 +03:00
Gurzau Raul
031bc0c262 Backed out changeset f7d509458e63 (bug 1487295) for failing at PaymentMethodChangeEvent/methodDetails-attribute.https.html on a CLOSED TREE 2018-09-04 21:18:53 +03:00
Marcos Cáceres
15c023f206 Bug 1487295 - Add defaults to PaymentMethodChangeEventInit's members. r=baku 2018-09-04 01:21:00 +03: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