Title: [217086] trunk/LayoutTests
Revision
217086
Author
[email protected]
Date
2017-05-18 19:55:15 -0700 (Thu, 18 May 2017)

Log Message

Unreviewed gardening on ApplePaySession.html after r217078.

The ApplePayError tests are only expected to pass when APPLE_PAY_DELEGATE is enabled, so
this breaks them out into their own file so that they can be skipped independently from
ApplePaySession.html.

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

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (217085 => 217086)


--- trunk/LayoutTests/ChangeLog	2017-05-19 02:47:41 UTC (rev 217085)
+++ trunk/LayoutTests/ChangeLog	2017-05-19 02:55:15 UTC (rev 217086)
@@ -1,3 +1,17 @@
+2017-05-18  Andy Estes  <[email protected]>
+
+        Unreviewed gardening on ApplePaySession.html after r217078.
+
+        The ApplePayError tests are only expected to pass when APPLE_PAY_DELEGATE is enabled, so
+        this breaks them out into their own file so that they can be skipped independently from
+        ApplePaySession.html.
+
+        * http/tests/ssl/applepay/ApplePayError-expected.txt: Added.
+        * http/tests/ssl/applepay/ApplePayError.html: Added.
+        * http/tests/ssl/applepay/ApplePaySession-expected.txt:
+        * http/tests/ssl/applepay/ApplePaySession.html:
+        * platform/mac-wk2/TestExpectations:
+
 2017-05-18  Ryan Haddad  <[email protected]>
 
         Rebaseline js/dom/global-constructors-attributes.html after r217078.

Added: trunk/LayoutTests/http/tests/ssl/applepay/ApplePayError-expected.txt (0 => 217086)


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePayError-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePayError-expected.txt	2017-05-19 02:55:15 UTC (rev 217086)
@@ -0,0 +1,68 @@
+Test basic creation of an ApplePayError object.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Testing ApplePayError
+
+SETUP: 
+PASS new ApplePayError() threw exception TypeError: Not enough arguments.
+
+SETUP: 
+PASS new ApplePayError([]) threw exception TypeError: Argument 1 ('errorCode') to the ApplePayError constructor must be one of: "unknown", "shippingContactInvalid", "billingContactInvalid", "addressUnserviceable".
+
+SETUP: 
+PASS new ApplePayError('') threw exception TypeError: Argument 1 ('errorCode') to the ApplePayError constructor must be one of: "unknown", "shippingContactInvalid", "billingContactInvalid", "addressUnserviceable".
+
+SETUP: 
+PASS new ApplePayError('unknown') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('shippingContactInvalid') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('billingContactInvalid') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('addressUnserviceable') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('unknown', []) threw exception TypeError: Argument 2 ('contactField') to the ApplePayError constructor must be one of: "phoneNumber", "emailAddress", "name", "postalAddress", "addressLines", "locality", "postalCode", "administrativeArea", "country", "countryCode".
+
+SETUP: 
+PASS new ApplePayError('unknown', '') threw exception TypeError: Argument 2 ('contactField') to the ApplePayError constructor must be one of: "phoneNumber", "emailAddress", "name", "postalAddress", "addressLines", "locality", "postalCode", "administrativeArea", "country", "countryCode".
+
+SETUP: 
+PASS new ApplePayError('unknown', 'phoneNumber') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('unknown', 'emailAddress') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('unknown', 'name') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('unknown', 'postalAddress') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('unknown', 'addressLines') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('unknown', 'locality') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('unknown', 'postalCode') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('unknown', 'administrativeArea') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('unknown', 'country') did not throw exception.
+
+SETUP: 
+PASS new ApplePayError('unknown', 'countryCode') did not throw exception.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/ssl/applepay/ApplePayError.html (0 => 217086)


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePayError.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePayError.html	2017-05-19 02:55:15 UTC (rev 217086)
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <script src=""
+</head>
+<body>
+<script>
+
+    description("Test basic creation of an ApplePayError object.");
+
+    window.jsTestIsAsync = true;
+
+    function logAndShouldThrow(setup, test) {
+        debug("SETUP: " + setup)
+        eval(setup);
+        shouldThrow(test);
+        debug("")
+    }
+
+    function logAndShouldNotThrow(setup, test) {
+        debug("SETUP: " + setup)
+        eval(setup);
+        shouldNotThrow(test);
+        debug("")
+    }
+
+    function go() {
+        debug("Testing ApplePayError")
+        debug("");
+        logAndShouldThrow("", "new ApplePayError()")
+        logAndShouldThrow("", "new ApplePayError([])")
+        logAndShouldThrow("", "new ApplePayError('')")
+        logAndShouldNotThrow("", "new ApplePayError('unknown')")
+        logAndShouldNotThrow("", "new ApplePayError('shippingContactInvalid')")
+        logAndShouldNotThrow("", "new ApplePayError('billingContactInvalid')")
+        logAndShouldNotThrow("", "new ApplePayError('addressUnserviceable')")
+        logAndShouldThrow("", "new ApplePayError('unknown', [])")
+        logAndShouldThrow("", "new ApplePayError('unknown', '')")
+        logAndShouldNotThrow("", "new ApplePayError('unknown', 'phoneNumber')")
+        logAndShouldNotThrow("", "new ApplePayError('unknown', 'emailAddress')")
+        logAndShouldNotThrow("", "new ApplePayError('unknown', 'name')")
+        logAndShouldNotThrow("", "new ApplePayError('unknown', 'postalAddress')")
+        logAndShouldNotThrow("", "new ApplePayError('unknown', 'addressLines')")
+        logAndShouldNotThrow("", "new ApplePayError('unknown', 'locality')")
+        logAndShouldNotThrow("", "new ApplePayError('unknown', 'postalCode')")
+        logAndShouldNotThrow("", "new ApplePayError('unknown', 'administrativeArea')")
+        logAndShouldNotThrow("", "new ApplePayError('unknown', 'country')")
+        logAndShouldNotThrow("", "new ApplePayError('unknown', 'countryCode')")
+
+        document.querySelector("button").remove();
+
+        finishJSTest();
+    }
+
+    function clickElement(element) {
+        let x = element.offsetLeft + 2;
+        let y = element.offsetTop + 2;
+
+        var supportsTouchEvents = "TouchEvent" in window;
+        if (supportsTouchEvents && window.testRunner && testRunner.runUIScript) {
+            testRunner.runUIScript(`(function() { uiController.singleTapAtPoint(${x}, ${y}, function() { }); })();`, function () { });
+        } else if (window.eventSender) {
+            eventSender.mouseMoveTo(x, y);
+            eventSender.mouseDown();
+            eventSender.mouseUp();
+        }
+    }
+
+    window._onload_ = function() {
+        clickElement(document.querySelector("button"));
+    }
+
+</script>
+<button _onclick_='go()'>Go</button>
+<script src=""
+</body>
+</html>

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


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySession-expected.txt	2017-05-19 02:47:41 UTC (rev 217085)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySession-expected.txt	2017-05-19 02:55:15 UTC (rev 217086)
@@ -414,65 +414,6 @@
 SETUP: request = validRequest(); request.applicationData = { toString: function() { throw '"Error in toString"'; } };
 PASS new ApplePaySession(2, request) threw exception "Error in toString".
 
-Testing ApplePayError
-
-SETUP: 
-PASS new ApplePayError() threw exception TypeError: Not enough arguments.
-
-SETUP: 
-PASS new ApplePayError([]) threw exception TypeError: Argument 1 ('errorCode') to the ApplePayError constructor must be one of: "unknown", "shippingContactInvalid", "billingContactInvalid", "addressUnserviceable".
-
-SETUP: 
-PASS new ApplePayError('') threw exception TypeError: Argument 1 ('errorCode') to the ApplePayError constructor must be one of: "unknown", "shippingContactInvalid", "billingContactInvalid", "addressUnserviceable".
-
-SETUP: 
-PASS new ApplePayError('unknown') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('shippingContactInvalid') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('billingContactInvalid') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('addressUnserviceable') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('unknown', []) threw exception TypeError: Argument 2 ('contactField') to the ApplePayError constructor must be one of: "phoneNumber", "emailAddress", "name", "postalAddress", "addressLines", "locality", "postalCode", "administrativeArea", "country", "countryCode".
-
-SETUP: 
-PASS new ApplePayError('unknown', '') threw exception TypeError: Argument 2 ('contactField') to the ApplePayError constructor must be one of: "phoneNumber", "emailAddress", "name", "postalAddress", "addressLines", "locality", "postalCode", "administrativeArea", "country", "countryCode".
-
-SETUP: 
-PASS new ApplePayError('unknown', 'phoneNumber') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('unknown', 'emailAddress') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('unknown', 'name') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('unknown', 'postalAddress') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('unknown', 'addressLines') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('unknown', 'locality') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('unknown', 'postalCode') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('unknown', 'administrativeArea') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('unknown', 'country') did not throw exception.
-
-SETUP: 
-PASS new ApplePayError('unknown', 'countryCode') did not throw exception.
-
 PASS successfullyParsed is true
 
 TEST COMPLETE

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


--- trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySession.html	2017-05-19 02:47:41 UTC (rev 217085)
+++ trunk/LayoutTests/http/tests/ssl/applepay/ApplePaySession.html	2017-05-19 02:55:15 UTC (rev 217086)
@@ -213,28 +213,6 @@
     logAndShouldNotThrow("request = validRequest(); request.applicationData = { };", "new ApplePaySession(2, request)")
     logAndShouldThrow("request = validRequest(); request.applicationData = { toString: function() { throw '\"Error in toString\"'; } };", "new ApplePaySession(2, request)")
 
-    debug("Testing ApplePayError")
-    debug("");
-    logAndShouldThrow("", "new ApplePayError()")
-    logAndShouldThrow("", "new ApplePayError([])")
-    logAndShouldThrow("", "new ApplePayError('')")
-    logAndShouldNotThrow("", "new ApplePayError('unknown')")
-    logAndShouldNotThrow("", "new ApplePayError('shippingContactInvalid')")
-    logAndShouldNotThrow("", "new ApplePayError('billingContactInvalid')")
-    logAndShouldNotThrow("", "new ApplePayError('addressUnserviceable')")
-    logAndShouldThrow("", "new ApplePayError('unknown', [])")
-    logAndShouldThrow("", "new ApplePayError('unknown', '')")
-    logAndShouldNotThrow("", "new ApplePayError('unknown', 'phoneNumber')")
-    logAndShouldNotThrow("", "new ApplePayError('unknown', 'emailAddress')")
-    logAndShouldNotThrow("", "new ApplePayError('unknown', 'name')")
-    logAndShouldNotThrow("", "new ApplePayError('unknown', 'postalAddress')")
-    logAndShouldNotThrow("", "new ApplePayError('unknown', 'addressLines')")
-    logAndShouldNotThrow("", "new ApplePayError('unknown', 'locality')")
-    logAndShouldNotThrow("", "new ApplePayError('unknown', 'postalCode')")
-    logAndShouldNotThrow("", "new ApplePayError('unknown', 'administrativeArea')")
-    logAndShouldNotThrow("", "new ApplePayError('unknown', 'country')")
-    logAndShouldNotThrow("", "new ApplePayError('unknown', 'countryCode')")
-
     document.querySelector("button").remove();
 
     finishJSTest();

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (217085 => 217086)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2017-05-19 02:47:41 UTC (rev 217085)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2017-05-19 02:55:15 UTC (rev 217086)
@@ -23,6 +23,7 @@
 fast/media/mq-prefers-reduced-motion-live-update.html [ Pass ]
 
 [ Sierra+ ] http/tests/ssl/applepay/ [ Pass ]
+http/tests/ssl/applepay/ApplePayError.html [ Skip ]
 
 fast/visual-viewport/rubberbanding-viewport-rects.html [ Pass ]
 fast/visual-viewport/rubberbanding-viewport-rects-header-footer.html  [ Pass ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to