Title: [219896] trunk
Revision
219896
Author
aes...@apple.com
Date
2017-07-25 18:03:29 -0700 (Tue, 25 Jul 2017)

Log Message

[Apple Pay] Add "carteBancaire" as a supported payment network
https://bugs.webkit.org/show_bug.cgi?id=174841
<rdar://problem/31935596>

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/ssl/applepay/ApplePaySession.html
       http/tests/ssl/applepay/ApplePaySessionV3.html

* Modules/applepay/PaymentRequest.cpp:
(WebCore::PaymentRequest::isValidSupportedNetwork):

Source/WebKit:

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toSupportedNetwork):

LayoutTests:

* http/tests/ssl/applepay/ApplePaySession-expected.txt:
* http/tests/ssl/applepay/ApplePaySession.html:
* http/tests/ssl/applepay/ApplePaySessionV3.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (219895 => 219896)


--- trunk/LayoutTests/ChangeLog	2017-07-26 00:45:58 UTC (rev 219895)
+++ trunk/LayoutTests/ChangeLog	2017-07-26 01:03:29 UTC (rev 219896)
@@ -1,3 +1,15 @@
+2017-07-25  Andy Estes  <aes...@apple.com>
+
+        [Apple Pay] Add "carteBancaire" as a supported payment network
+        https://bugs.webkit.org/show_bug.cgi?id=174841
+        <rdar://problem/31935596>
+
+        Reviewed by Alex Christensen.
+
+        * http/tests/ssl/applepay/ApplePaySession-expected.txt:
+        * http/tests/ssl/applepay/ApplePaySession.html:
+        * http/tests/ssl/applepay/ApplePaySessionV3.html:
+
 2017-07-25  Matt Lewis  <jlew...@apple.com>
 
         Marked multiple fast/ tests as crashing on High Sierra WK1.

Modified: trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySession-expected.txt (219895 => 219896)


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySession-expected.txt	2017-07-26 00:45:58 UTC (rev 219895)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySession-expected.txt	2017-07-26 01:03:29 UTC (rev 219896)
@@ -76,6 +76,9 @@
 SETUP: request = validRequest(); request.supportedNetworks = ['invalidNetwork', 'visa'];
 PASS new ApplePaySession(2, request) threw exception TypeError: "invalidNetwork" is not a valid payment network..
 
+SETUP: request = validRequest(); request.supportedNetworks = ['carteBancaire'];
+PASS new ApplePaySession(2, request) threw exception TypeError: "carteBancaire" is not a valid payment network..
+
 SETUP: request = validRequest(); request.supportedNetworks = ['visa', 'visa'];
 PASS new ApplePaySession(2, request) did not throw exception.
 

Modified: trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySession.html (219895 => 219896)


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySession.html	2017-07-26 00:45:58 UTC (rev 219895)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySession.html	2017-07-26 01:03:29 UTC (rev 219896)
@@ -72,6 +72,7 @@
     logAndShouldThrow("request = validRequest(); request.supportedNetworks = [];", "new ApplePaySession(2, request)")
     logAndShouldThrow("request = validRequest(); request.supportedNetworks = ['invalidNetwork'];", "new ApplePaySession(2, request)")
     logAndShouldThrow("request = validRequest(); request.supportedNetworks = ['invalidNetwork', 'visa'];", "new ApplePaySession(2, request)")
+    logAndShouldThrow("request = validRequest(); request.supportedNetworks = ['carteBancaire'];", "new ApplePaySession(2, request)")
     // FIXME: Should duplicate supportedNetworks be allowed?
     logAndShouldNotThrow("request = validRequest(); request.supportedNetworks = ['visa', 'visa'];", "new ApplePaySession(2, request)")
     

Modified: trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySessionV3.html (219895 => 219896)


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySessionV3.html	2017-07-26 00:45:58 UTC (rev 219895)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySessionV3.html	2017-07-26 01:03:29 UTC (rev 219896)
@@ -15,7 +15,7 @@
     return {
           countryCode: 'US',
           currencyCode: 'USD',
-          supportedNetworks: ['visa', 'masterCard'],
+          supportedNetworks: ['visa', 'masterCard', 'carteBancaire'],
           merchantCapabilities: ['supports3DS'],
           total: { label: 'Your Label', amount: '10.00' },
     }

Modified: trunk/Source/WebCore/ChangeLog (219895 => 219896)


--- trunk/Source/WebCore/ChangeLog	2017-07-26 00:45:58 UTC (rev 219895)
+++ trunk/Source/WebCore/ChangeLog	2017-07-26 01:03:29 UTC (rev 219896)
@@ -1,3 +1,17 @@
+2017-07-25  Andy Estes  <aes...@apple.com>
+
+        [Apple Pay] Add "carteBancaire" as a supported payment network
+        https://bugs.webkit.org/show_bug.cgi?id=174841
+        <rdar://problem/31935596>
+
+        Reviewed by Alex Christensen.
+
+        Tests: http/tests/ssl/applepay/ApplePaySession.html
+               http/tests/ssl/applepay/ApplePaySessionV3.html
+
+        * Modules/applepay/PaymentRequest.cpp:
+        (WebCore::PaymentRequest::isValidSupportedNetwork):
+
 2017-07-25  Daniel Bates  <daba...@apple.com>
 
         Make StyleResolver::isValid{Cue, Region}StyleProperty() static, inline, non-member functions

Modified: trunk/Source/WebCore/Modules/applepay/PaymentRequest.cpp (219895 => 219896)


--- trunk/Source/WebCore/Modules/applepay/PaymentRequest.cpp	2017-07-26 00:45:58 UTC (rev 219895)
+++ trunk/Source/WebCore/Modules/applepay/PaymentRequest.cpp	2017-07-26 01:03:29 UTC (rev 219896)
@@ -59,6 +59,8 @@
         return true;
     if (version >= 2 && supportedNetwork == "jcb")
         return true;
+    if (version >= 3 && supportedNetwork == "carteBancaire")
+        return true;
 
     return false;
 }

Modified: trunk/Source/WebKit/ChangeLog (219895 => 219896)


--- trunk/Source/WebKit/ChangeLog	2017-07-26 00:45:58 UTC (rev 219895)
+++ trunk/Source/WebKit/ChangeLog	2017-07-26 01:03:29 UTC (rev 219896)
@@ -1,3 +1,14 @@
+2017-07-25  Andy Estes  <aes...@apple.com>
+
+        [Apple Pay] Add "carteBancaire" as a supported payment network
+        https://bugs.webkit.org/show_bug.cgi?id=174841
+        <rdar://problem/31935596>
+
+        Reviewed by Alex Christensen.
+
+        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
+        (WebKit::toSupportedNetwork):
+
 2017-07-25  Brian Burg  <bb...@apple.com>
 
         Use SandboxExtension::HandleArray when sending extensions for file uploads to the web process

Modified: trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm (219895 => 219896)


--- trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm	2017-07-26 00:45:58 UTC (rev 219895)
+++ trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm	2017-07-26 01:03:29 UTC (rev 219896)
@@ -51,6 +51,7 @@
 SOFT_LINK_CLASS(PassKit, PKPaymentSummaryItem);
 SOFT_LINK_CLASS(PassKit, PKShippingMethod);
 SOFT_LINK_CONSTANT(PassKit, PKPaymentNetworkAmex, NSString *);
+SOFT_LINK_CONSTANT(PassKit, PKPaymentNetworkCarteBancaire, NSString *);
 SOFT_LINK_CONSTANT(PassKit, PKPaymentNetworkChinaUnionPay, NSString *);
 SOFT_LINK_CONSTANT(PassKit, PKPaymentNetworkDiscover, NSString *);
 SOFT_LINK_CONSTANT(PassKit, PKPaymentNetworkInterac, NSString *);
@@ -436,6 +437,8 @@
 {
     if (supportedNetwork == "amex")
         return getPKPaymentNetworkAmex();
+    if (supportedNetwork == "carteBancaire")
+        return getPKPaymentNetworkCarteBancaire();
     if (supportedNetwork == "chinaUnionPay")
         return getPKPaymentNetworkChinaUnionPay();
     if (supportedNetwork == "discover")
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to