Bug 172832

Summary: [Cocoa] Add a "supportedCountries" property to ApplePayPaymentRequest
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, andersca, ap, bdakin, buildbot, cdumez, commit-queue, dbates, esprehn+autocc, ggaren, kondapallykalyan, sam, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Andy Estes 2017-06-01 13:22:10 PDT
[Cocoa] Add a "supportedCountries" property to ApplePayPaymentRequest
Comment 1 Andy Estes 2017-06-01 13:22:51 PDT
rdar://problem/30735544
Comment 2 Andy Estes 2017-06-01 13:25:59 PDT
Created attachment 311750 [details]
Patch
Comment 3 Andy Estes 2017-06-01 13:53:27 PDT
Created attachment 311754 [details]
Patch
Comment 4 Andy Estes 2017-06-01 13:55:36 PDT
Created attachment 311756 [details]
Patch
Comment 5 Alex Christensen 2017-06-01 14:44:08 PDT
Comment on attachment 311756 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=311756&action=review

> Source/WebCore/Modules/applepay/ApplePayPaymentRequest.h:61
> +    std::optional<Vector<String>> supportedCountries;

I'm not sure the difference between nullopt and an empty vector is important enough to make this an optional vector.

> LayoutTests/http/tests/ssl/applepay/ApplePaySessionV3-expected.txt:23
> +SETUP: request = validRequest(); request.supportedCountries = 7;
> +PASS new ApplePaySession(3, request) threw exception TypeError: Value is not a sequence.

Let's add a test that contains a valid sequence that contains things that are not strings.  Also an empty sequence.
Comment 6 Andy Estes 2017-06-02 10:30:41 PDT
Created attachment 311837 [details]
Patch
Comment 7 Andy Estes 2017-06-02 10:34:58 PDT
Created attachment 311838 [details]
Patch
Comment 8 WebKit Commit Bot 2017-06-02 11:14:50 PDT
Comment on attachment 311838 [details]
Patch

Clearing flags on attachment: 311838

Committed r217723: <http://trac.webkit.org/changeset/217723>
Comment 9 WebKit Commit Bot 2017-06-02 11:14:53 PDT
All reviewed patches have been landed.  Closing bug.