[Payment Request] Implement MerchantValidationEvent.methodName
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 28 Oct 2018 14:34:13 +0000 (14:34 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 28 Oct 2018 14:34:13 +0000 (14:34 +0000)
commit6eeda3cc6f0d2fb29110c4d64bd27226fe17ab40
tree35bba7f3394b4df0b3ba126aef244b513a135698
parent2118b859facfd56c8a0758278d81f568aaa21b48
[Payment Request] Implement MerchantValidationEvent.methodName
https://bugs.webkit.org/show_bug.cgi?id=190058

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/payment-request/MerchantValidationEvent/constructor.https-expected.txt:

Source/WebCore:

Implemented MerchantValidationEvent's methodName attribute and MerchantValidationEventInit's
methodName property as specified in the Payment Request API W3C Editor's Draft of
27 September 2018.

Covered by web-platform-tests/payment-request/MerchantValidationEvent/constructor.https.html.

* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::ApplePayPaymentHandler::validateMerchant): Passed the payment method identifier
(as a string) to MerchantValidationEvent::create()
* Modules/paymentrequest/MerchantValidationEvent.cpp:
(WebCore::MerchantValidationEvent::create): Validated the methodName before constructing the
event, throwing a RangeError on failure.
(WebCore::MerchantValidationEvent::MerchantValidationEvent):
* Modules/paymentrequest/MerchantValidationEvent.h:
* Modules/paymentrequest/MerchantValidationEvent.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp
Source/WebCore/Modules/paymentrequest/MerchantValidationEvent.cpp
Source/WebCore/Modules/paymentrequest/MerchantValidationEvent.h
Source/WebCore/Modules/paymentrequest/MerchantValidationEvent.idl
Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp