Title: [227260] trunk/LayoutTests
Revision
227260
Author
[email protected]
Date
2018-01-19 19:50:34 -0800 (Fri, 19 Jan 2018)

Log Message

[Sierra Debug WK2] ASSERTION FAILED: paymentCoordinator().supportsVersion(version)
https://bugs.webkit.org/show_bug.cgi?id=181833

Patch by Andy Estes <[email protected]> on 2018-01-19
Reviewed by Youenn Fablet.

Moved the version 3 test into its own file that only runs on High Sierra and later.

* http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https-expected.txt: Added.
* http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html: Added.
* platform/mac-wk2/TestExpectations:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (227259 => 227260)


--- trunk/LayoutTests/ChangeLog	2018-01-20 02:29:49 UTC (rev 227259)
+++ trunk/LayoutTests/ChangeLog	2018-01-20 03:50:34 UTC (rev 227260)
@@ -1,3 +1,16 @@
+2018-01-19  Andy Estes  <[email protected]>
+
+        [Sierra Debug WK2] ASSERTION FAILED: paymentCoordinator().supportsVersion(version)
+        https://bugs.webkit.org/show_bug.cgi?id=181833
+
+        Reviewed by Youenn Fablet.
+
+        Moved the version 3 test into its own file that only runs on High Sierra and later.
+
+        * http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https-expected.txt: Added.
+        * http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html: Added.
+        * platform/mac-wk2/TestExpectations:
+
 2018-01-19  Ryan Haddad  <[email protected]>
 
         Mark http/wpt/web-animations/timing-model/animation-effects/current-iteration.html as flaky.

Modified: trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt (227259 => 227260)


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt	2018-01-20 02:29:49 UTC (rev 227259)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt	2018-01-20 03:50:34 UTC (rev 227260)
@@ -34,10 +34,6 @@
 PASS paymentResponse.payerEmail is expectedEmailAddress
 PASS paymentResponse.payerPhone is expectedPhoneNumber
 
-Test setting a default shipping contact in a version 3 request.
-PASS paymentResponse.details.shippingContact.phoneticGivenName is expectedGivenName
-PASS paymentResponse.details.shippingContact.phoneticFamilyName is expectedFamilyName
-
 Test setting a default shipping contact that only specifies an email address.
 PASS paymentResponse.shippingAddress is null
 PASS paymentResponse.payerName is null

Modified: trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html (227259 => 227260)


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html	2018-01-20 02:29:49 UTC (rev 227259)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html	2018-01-20 03:50:34 UTC (rev 227260)
@@ -133,27 +133,6 @@
     debug("");
 
     await new Promise((resolve, reject) => {
-        debug("Test setting a default shipping contact in a version 3 request.");
-
-        var paymentRequest = new PaymentRequest([validPaymentMethod(3, validShippingContact())], validPaymentDetails(), validPaymentOptions());
-
-        activateThen(() => {
-            paymentRequest.show().then((response) => {
-                window.paymentResponse = response;
-
-                shouldBe("paymentResponse.details.shippingContact.phoneticGivenName", "expectedGivenName");
-                shouldBe("paymentResponse.details.shippingContact.phoneticFamilyName", "expectedFamilyName");
-
-                response.complete("success");
-                resolve();
-            });
-
-            internals.mockPaymentCoordinator.acceptPayment();
-        });
-    });
-    debug("");
-
-    await new Promise((resolve, reject) => {
         debug("Test setting a default shipping contact that only specifies an email address.");
 
         var paymentRequest = new PaymentRequest([validPaymentMethod(3, { emailAddress: expectedEmailAddress })], validPaymentDetails(), { requestPayerEmail: true });

Added: trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https-expected.txt (0 => 227260)


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https-expected.txt	2018-01-20 03:50:34 UTC (rev 227260)
@@ -0,0 +1,13 @@
+Test ApplePayRequest.shippingContact.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Test setting a default shipping contact in a version 3 request.
+PASS paymentResponse.details.shippingContact.phoneticGivenName is expectedGivenName
+PASS paymentResponse.details.shippingContact.phoneticFamilyName is expectedFamilyName
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html (0 => 227260)


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html	2018-01-20 03:50:34 UTC (rev 227260)
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+<script src=""
+<script src=""
+</head>
+<body>
+<script>
+
+description("Test ApplePayRequest.shippingContact.");
+
+window.jsTestIsAsync = true;
+
+const expectedGivenName = 'Web';
+const expectedFamilyName = 'Test';
+const expectedName = [expectedGivenName, expectedFamilyName].join(' ');
+const expectedEmailAddress = '[email protected]';
+const expectedPhoneNumber = '+12345678910';
+const expectedAddressLines = ['1 wpt street'];
+const expectedSubLocality = 'AA';
+const expectedLocality = 'BB';
+const expectedPostalCode = '12345';
+const expectedSubAdministrativeArea = 'CC';
+const expectedAdministrativeArea = 'DD';
+const expectedCountry = 'United States';
+const expectedCountryCode = 'US';
+
+function validShippingContact() {
+    return {
+        phoneNumber: expectedPhoneNumber,
+        emailAddress: expectedEmailAddress,
+        givenName: expectedGivenName,
+        familyName: expectedFamilyName,
+        phoneticGivenName: expectedGivenName,
+        phoneticFamilyName: expectedFamilyName,
+        addressLines: expectedAddressLines,
+        subLocality: expectedSubLocality,
+        locality: expectedLocality,
+        postalCode: expectedPostalCode,
+        subAdministrativeArea: expectedSubAdministrativeArea,
+        administrativeArea: expectedAdministrativeArea,
+        country: expectedCountry,
+        countryCode: expectedCountryCode,
+    };
+}
+
+function validPaymentMethod(version, shippingContact) {
+    return {
+        supportedMethods: 'https://apple.com/apple-pay',
+        data: {
+            version,
+            merchantIdentifier: '',
+            countryCode: 'US',
+            supportedNetworks: ['visa', 'masterCard'],
+            merchantCapabilities: ['supports3DS'],
+            shippingContact,
+        },
+    }
+}
+
+function validPaymentDetails() {
+    return {
+        total: {
+            label: 'Total',
+            amount: {
+                currency: 'USD',
+                value: '10.00',
+            },
+        },
+    };
+}
+
+function validPaymentOptions() {
+    return {
+        requestPayerName: true,
+        requestPayerEmail: true,
+        requestPayerPhone: true,
+        requestShipping: true,
+    };
+}
+
+async function runTests() {
+    await new Promise((resolve, reject) => {
+        debug("Test setting a default shipping contact in a version 3 request.");
+
+        var paymentRequest = new PaymentRequest([validPaymentMethod(3, validShippingContact())], validPaymentDetails(), validPaymentOptions());
+
+        activateThen(() => {
+            paymentRequest.show().then((response) => {
+                window.paymentResponse = response;
+
+                shouldBe("paymentResponse.details.shippingContact.phoneticGivenName", "expectedGivenName");
+                shouldBe("paymentResponse.details.shippingContact.phoneticFamilyName", "expectedFamilyName");
+
+                response.complete("success");
+                resolve();
+            });
+
+            internals.mockPaymentCoordinator.acceptPayment();
+        });
+    });
+    debug("");
+
+    finishJSTest();
+}
+
+runTests();
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (227259 => 227260)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-01-20 02:29:49 UTC (rev 227259)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-01-20 03:50:34 UTC (rev 227260)
@@ -23,6 +23,7 @@
 [ Sierra+ ] http/tests/ssl/applepay/ [ Pass ]
 [ Sierra ] http/tests/ssl/applepay/ApplePayError.html [ Skip ]
 [ Sierra ] http/tests/ssl/applepay/ApplePaySessionV3.html [ Skip ]
+[ Sierra ] http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html [ Skip ]
 
 fast/visual-viewport/rubberbanding-viewport-rects.html [ Pass ]
 fast/visual-viewport/rubberbanding-viewport-rects-header-footer.html  [ Pass ]
@@ -798,6 +799,7 @@
 # <rdar://problem/25010307>
 [ HighSierra+ ] http/tests/ssl/applepay/ApplePayError.html [ Pass ]
 [ HighSierra+ ] http/tests/ssl/applepay/ApplePaySessionV3.html [ Pass ]
+[ HighSierra+ ] http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html [ Pass ]
 # <rdar://problem/31634451>
 [ HighSierra+ ] http/tests/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html [ Pass ]
 [ HighSierra+ ] http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html [ Pass ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to