Diff
Modified: branches/safari-606-branch/LayoutTests/ChangeLog (237371 => 237372)
--- branches/safari-606-branch/LayoutTests/ChangeLog 2018-10-23 23:52:07 UTC (rev 237371)
+++ branches/safari-606-branch/LayoutTests/ChangeLog 2018-10-23 23:52:12 UTC (rev 237372)
@@ -1,5 +1,48 @@
2018-10-23 Kocsen Chung <[email protected]>
+ Cherry-pick r237238. rdar://problem/45363879
+
+ [Apple Pay] Increment the API version to 5
+ https://bugs.webkit.org/show_bug.cgi?id=190686
+ <rdar://problem/45348523>
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ Test: http/tests/ssl/applepay/ApplePaySessionV5.html
+
+ * testing/MockPaymentCoordinator.cpp:
+ (WebCore::MockPaymentCoordinator::supportsVersion):
+
+ Source/WebKit:
+
+ * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
+ (WebKit::WebPaymentCoordinator::supportsVersion):
+
+ LayoutTests:
+
+ * http/tests/ssl/applepay/ApplePaySessionV5-expected.txt: Added.
+ * http/tests/ssl/applepay/ApplePaySessionV5.html: Added.
+ * platform/mac-wk2/TestExpectations:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2018-10-17 Andy Estes <[email protected]>
+
+ [Apple Pay] Increment the API version to 5
+ https://bugs.webkit.org/show_bug.cgi?id=190686
+ <rdar://problem/45348523>
+
+ Reviewed by Simon Fraser.
+
+ * http/tests/ssl/applepay/ApplePaySessionV5-expected.txt: Added.
+ * http/tests/ssl/applepay/ApplePaySessionV5.html: Added.
+ * platform/mac-wk2/TestExpectations:
+
+2018-10-23 Kocsen Chung <[email protected]>
+
Cherry-pick r236578. rdar://problem/45285613
Resource Load Statistics: Non-redirected top frame navigation should not get captured in statistics
Added: branches/safari-606-branch/LayoutTests/http/tests/ssl/applepay/ApplePaySessionV5-expected.txt (0 => 237372)
--- branches/safari-606-branch/LayoutTests/http/tests/ssl/applepay/ApplePaySessionV5-expected.txt (rev 0)
+++ branches/safari-606-branch/LayoutTests/http/tests/ssl/applepay/ApplePaySessionV5-expected.txt 2018-10-23 23:52:12 UTC (rev 237372)
@@ -0,0 +1,23 @@
+Test basic creation of an ApplePaySession object.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Testing supportsVersion
+
+PASS ApplePaySession.supportsVersion(0) threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS ApplePaySession.supportsVersion(1) is true
+PASS ApplePaySession.supportsVersion(2) is true
+PASS ApplePaySession.supportsVersion(3) is true
+PASS ApplePaySession.supportsVersion(4) is true
+PASS ApplePaySession.supportsVersion(5) is true
+
+Testing PaymentRequest (v5)
+
+PASS new ApplePaySession(5, { }) threw exception TypeError: Member ApplePayPaymentRequest.countryCode is required and must be an instance of DOMString.
+PASS new ApplePaySession(5, validRequest()) did not throw exception.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: branches/safari-606-branch/LayoutTests/http/tests/ssl/applepay/ApplePaySessionV5.html (0 => 237372)
--- branches/safari-606-branch/LayoutTests/http/tests/ssl/applepay/ApplePaySessionV5.html (rev 0)
+++ branches/safari-606-branch/LayoutTests/http/tests/ssl/applepay/ApplePaySessionV5.html 2018-10-23 23:52:12 UTC (rev 237372)
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+</head>
+<body>
+<script>
+
+description("Test basic creation of an ApplePaySession object.");
+
+window.jsTestIsAsync = true;
+
+function validRequest() {
+ return {
+ countryCode: 'US',
+ currencyCode: 'USD',
+ supportedNetworks: ['visa', 'masterCard', 'carteBancaire'],
+ merchantCapabilities: ['supports3DS'],
+ total: { label: 'Your Label', amount: '10.00' },
+ }
+}
+
+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 supportsVersion");
+ debug("");
+ shouldThrow("ApplePaySession.supportsVersion(0)");
+ shouldBeTrue("ApplePaySession.supportsVersion(1)");
+ shouldBeTrue("ApplePaySession.supportsVersion(2)");
+ shouldBeTrue("ApplePaySession.supportsVersion(3)");
+ shouldBeTrue("ApplePaySession.supportsVersion(4)");
+ shouldBeTrue("ApplePaySession.supportsVersion(5)");
+ debug("");
+
+ debug("Testing PaymentRequest (v5)")
+ debug("");
+ shouldThrow("new ApplePaySession(5, { })");
+ shouldNotThrow("new ApplePaySession(5, validRequest())");
+ debug("");
+
+ 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: branches/safari-606-branch/LayoutTests/platform/mac-wk2/TestExpectations (237371 => 237372)
--- branches/safari-606-branch/LayoutTests/platform/mac-wk2/TestExpectations 2018-10-23 23:52:07 UTC (rev 237371)
+++ branches/safari-606-branch/LayoutTests/platform/mac-wk2/TestExpectations 2018-10-23 23:52:12 UTC (rev 237372)
@@ -25,9 +25,11 @@
[ Sierra ] http/tests/ssl/applepay/ApplePayError.html [ Skip ]
[ Sierra ] http/tests/ssl/applepay/ApplePaySessionV3.html [ Skip ]
[ Sierra ] http/tests/ssl/applepay/ApplePaySessionV4.html [ Skip ]
+[ Sierra ] http/tests/ssl/applepay/ApplePaySessionV5.html [ Skip ]
[ Sierra ] http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html [ Skip ]
[ HighSierra ] http/tests/ssl/applepay/ApplePayButtonV4.html [ Skip ]
[ HighSierra ] http/tests/ssl/applepay/ApplePaySessionV4.html [ Skip ]
+[ HighSierra ] http/tests/ssl/applepay/ApplePaySessionV5.html [ Skip ]
fast/visual-viewport/rubberbanding-viewport-rects.html [ Pass ]
fast/visual-viewport/rubberbanding-viewport-rects-header-footer.html [ Pass ]
@@ -798,6 +800,7 @@
[ HighSierra+ ] http/tests/ssl/applepay/ApplePayError.html [ Pass ]
[ HighSierra+ ] http/tests/ssl/applepay/ApplePaySessionV3.html [ Pass ]
[ Mojave+ ] http/tests/ssl/applepay/ApplePaySessionV4.html [ Pass ]
+[ Mojave+ ] http/tests/ssl/applepay/ApplePaySessionV5.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 ]
Modified: branches/safari-606-branch/Source/WebCore/ChangeLog (237371 => 237372)
--- branches/safari-606-branch/Source/WebCore/ChangeLog 2018-10-23 23:52:07 UTC (rev 237371)
+++ branches/safari-606-branch/Source/WebCore/ChangeLog 2018-10-23 23:52:12 UTC (rev 237372)
@@ -1,5 +1,49 @@
2018-10-23 Kocsen Chung <[email protected]>
+ Cherry-pick r237238. rdar://problem/45363879
+
+ [Apple Pay] Increment the API version to 5
+ https://bugs.webkit.org/show_bug.cgi?id=190686
+ <rdar://problem/45348523>
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ Test: http/tests/ssl/applepay/ApplePaySessionV5.html
+
+ * testing/MockPaymentCoordinator.cpp:
+ (WebCore::MockPaymentCoordinator::supportsVersion):
+
+ Source/WebKit:
+
+ * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
+ (WebKit::WebPaymentCoordinator::supportsVersion):
+
+ LayoutTests:
+
+ * http/tests/ssl/applepay/ApplePaySessionV5-expected.txt: Added.
+ * http/tests/ssl/applepay/ApplePaySessionV5.html: Added.
+ * platform/mac-wk2/TestExpectations:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2018-10-17 Andy Estes <[email protected]>
+
+ [Apple Pay] Increment the API version to 5
+ https://bugs.webkit.org/show_bug.cgi?id=190686
+ <rdar://problem/45348523>
+
+ Reviewed by Simon Fraser.
+
+ Test: http/tests/ssl/applepay/ApplePaySessionV5.html
+
+ * testing/MockPaymentCoordinator.cpp:
+ (WebCore::MockPaymentCoordinator::supportsVersion):
+
+2018-10-23 Kocsen Chung <[email protected]>
+
Cherry-pick r236578. rdar://problem/45285613
Resource Load Statistics: Non-redirected top frame navigation should not get captured in statistics
Modified: branches/safari-606-branch/Source/WebCore/testing/MockPaymentCoordinator.cpp (237371 => 237372)
--- branches/safari-606-branch/Source/WebCore/testing/MockPaymentCoordinator.cpp 2018-10-23 23:52:07 UTC (rev 237371)
+++ branches/safari-606-branch/Source/WebCore/testing/MockPaymentCoordinator.cpp 2018-10-23 23:52:12 UTC (rev 237372)
@@ -61,7 +61,7 @@
#elif !ENABLE(APPLE_PAY_SESSION_V4)
static const unsigned currentVersion = 3;
#else
- static const unsigned currentVersion = 4;
+ static const unsigned currentVersion = 5;
#endif
return version <= currentVersion;
Modified: branches/safari-606-branch/Source/WebKit/ChangeLog (237371 => 237372)
--- branches/safari-606-branch/Source/WebKit/ChangeLog 2018-10-23 23:52:07 UTC (rev 237371)
+++ branches/safari-606-branch/Source/WebKit/ChangeLog 2018-10-23 23:52:12 UTC (rev 237372)
@@ -1,5 +1,47 @@
2018-10-23 Kocsen Chung <[email protected]>
+ Cherry-pick r237238. rdar://problem/45363879
+
+ [Apple Pay] Increment the API version to 5
+ https://bugs.webkit.org/show_bug.cgi?id=190686
+ <rdar://problem/45348523>
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ Test: http/tests/ssl/applepay/ApplePaySessionV5.html
+
+ * testing/MockPaymentCoordinator.cpp:
+ (WebCore::MockPaymentCoordinator::supportsVersion):
+
+ Source/WebKit:
+
+ * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
+ (WebKit::WebPaymentCoordinator::supportsVersion):
+
+ LayoutTests:
+
+ * http/tests/ssl/applepay/ApplePaySessionV5-expected.txt: Added.
+ * http/tests/ssl/applepay/ApplePaySessionV5.html: Added.
+ * platform/mac-wk2/TestExpectations:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2018-10-17 Andy Estes <[email protected]>
+
+ [Apple Pay] Increment the API version to 5
+ https://bugs.webkit.org/show_bug.cgi?id=190686
+ <rdar://problem/45348523>
+
+ Reviewed by Simon Fraser.
+
+ * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
+ (WebKit::WebPaymentCoordinator::supportsVersion):
+
+2018-10-23 Kocsen Chung <[email protected]>
+
Cherry-pick r236578. rdar://problem/45285613
Resource Load Statistics: Non-redirected top frame navigation should not get captured in statistics
Modified: branches/safari-606-branch/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.cpp (237371 => 237372)
--- branches/safari-606-branch/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.cpp 2018-10-23 23:52:07 UTC (rev 237371)
+++ branches/safari-606-branch/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.cpp 2018-10-23 23:52:12 UTC (rev 237372)
@@ -60,7 +60,7 @@
#elif !ENABLE(APPLE_PAY_SESSION_V4)
static const unsigned currentVersion = 3;
#else
- static const unsigned currentVersion = 4;
+ static const unsigned currentVersion = 5;
#endif
return version <= currentVersion;