WebKit Bugzilla
Attachment 348754 Details for
Bug 189235
: [Payment Request] Implement the MerchantValidationEvent constructor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189235-20180902201529.patch (text/plain), 73.68 KB, created by
Andy Estes
on 2018-09-02 20:15:31 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Andy Estes
Created:
2018-09-02 20:15:31 PDT
Size:
73.68 KB
patch
obsolete
>Subversion Revision: 235589 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 2c2f481af1fcaf10ddfe88d8f3b625d8b3b3e027..7aed122de01d103df2b472764986cbb33885af6c 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2018-09-02 Andy Estes <aestes@apple.com> >+ >+ Update payment-request web platform tests to 0313d9f >+ https://bugs.webkit.org/show_bug.cgi?id=189235 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestExpectations: >+ * platform/ios-wk2/TestExpectations: >+ * platform/mac-wk2/TestExpectations: >+ > 2018-09-02 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > Implement Object.fromEntries >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 17011ac7723749e549a69570fdd3b065e5c6a866..179a33e89f3500eecc51c5a4495d803ccb3c6249 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,39 @@ >+2018-09-02 Andy Estes <aestes@apple.com> >+ >+ Update payment-request web platform tests to 0313d9f >+ https://bugs.webkit.org/show_bug.cgi?id=189235 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * resources/TestRepositories: >+ * resources/import-expectations.json: >+ * web-platform-tests/payment-request/MerchantValidationEvent/complete-method-manual.https.html: Added. >+ * web-platform-tests/payment-request/MerchantValidationEvent/constructor.http-expected.txt: Added. >+ * web-platform-tests/payment-request/MerchantValidationEvent/constructor.http.html: Added. >+ * web-platform-tests/payment-request/MerchantValidationEvent/constructor.https-expected.txt: Added. >+ * web-platform-tests/payment-request/MerchantValidationEvent/constructor.https.html: Added. >+ * web-platform-tests/payment-request/MerchantValidationEvent/w3c-import.log: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.http-expected.txt: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.http.html: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.https-expected.txt: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.https.html: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-call-immediate-manual.https.html: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-duplicate-shipping-options-manual.https.html: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-incremental-update-manual.https.html: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-method-abort-update-manual.https.html: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-state-checks-manual.https.html: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/updatewith-method.https-expected.txt: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/updatewith-method.https.html: Added. >+ * web-platform-tests/payment-request/PaymentRequestUpdateEvent/w3c-import.log: Added. >+ * web-platform-tests/payment-request/allowpaymentrequest/common.sub.js: >+ (window.onmessage.e.t.step): >+ (string_appeared_here.forEach): >+ (window.onmessage): Deleted. >+ * web-platform-tests/payment-request/allowpaymentrequest/echo-PaymentRequest.html: >+ * web-platform-tests/payment-request/onmerchantvalidation-attribute.https-expected.txt: Added. >+ * web-platform-tests/payment-request/onmerchantvalidation-attribute.https.html: Added. >+ * web-platform-tests/payment-request/w3c-import.log: >+ > 2018-08-30 Ryosuke Niwa <rniwa@webkit.org> > > Add assignedElements to HTMLSlotElement >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 3193ba318f7c2e78767641b59922e8c4c6805e2e..cae90d154b8aaf72eda6d356a14932345aa5271b 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -2241,3 +2241,36 @@ webkit.org/b/185308 legacy-animation-engine/animations/combo-transform-translate > > # This test is currently only relevant on mac-wk2 > fast/canvas/webgl/context-update-on-display-configuration.html [ Skip ] >+ >+# Skip manual payment-request tests >+imported/w3c/web-platform-tests/payment-request/PaymentValidationErrors/retry-shows-error-member-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/PaymentValidationErrors/retry-shows-payer-member-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/PaymentValidationErrors/retry-shows-shippingAddress-member-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/algorithms-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/change-shipping-option-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/change-shipping-option-select-last-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/payment-response/complete-method-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/payment-response/methodName-attribute-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/payment-response/onpayerdetailchange-attribute.manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/payment-response/payerEmail-attribute-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/payment-response/payerName-attribute-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/payment-response/payerPhone-attribute-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/payment-response/rejects_if_not_active-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/payment-response/requestId-attribute-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/payment-response/retry-method-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/payment-response/shippingAddress-attribute-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/payment-response/shippingOption-attribute-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/PaymentAddress/attributes-and-toJSON-method-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/shipping-address-changed-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/show-method-optional-promise-rejects-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/show-method-optional-promise-resolves-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/show-method-postmessage-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/updateWith-method-pmi-handling-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/user-abort-algorithm-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/user-accepts-payment-request-algo-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/complete-method-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-call-immediate-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-duplicate-shipping-options-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-incremental-update-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-method-abort-update-manual.https.html [ Skip ] >+imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-state-checks-manual.https.html [ Skip ] >diff --git a/LayoutTests/imported/w3c/resources/TestRepositories b/LayoutTests/imported/w3c/resources/TestRepositories >index 75818b120becb82167292357b6bd35b8e96c723d..9b3f853c0d188fa60131a6c22e23c86cead57565 100644 >--- a/LayoutTests/imported/w3c/resources/TestRepositories >+++ b/LayoutTests/imported/w3c/resources/TestRepositories >@@ -2,7 +2,7 @@ > { > "name": "web-platform-tests", > "url": "https://github.com/web-platform-tests/wpt.git", >- "revision": "94b33b5", >+ "revision": "0313d9f", > "paths_to_skip": [ > "conformance-checkers", > "docs", >diff --git a/LayoutTests/imported/w3c/resources/import-expectations.json b/LayoutTests/imported/w3c/resources/import-expectations.json >index 8e738cd58b8796548624d029b2c3d5583a31d6bc..43385b03b2caab95eb39a4858c094df1a4b20c97 100644 >--- a/LayoutTests/imported/w3c/resources/import-expectations.json >+++ b/LayoutTests/imported/w3c/resources/import-expectations.json >@@ -274,7 +274,6 @@ > "web-platform-tests/payment-method-basic-card": "skip", > "web-platform-tests/payment-method-id": "skip", > "web-platform-tests/payment-request": "import", >- "web-platform-tests/payment-request/PaymentRequestUpdateEvent": "skip", > "web-platform-tests/performance-timeline": "skip", > "web-platform-tests/pointerevents": "skip", > "web-platform-tests/pointerlock": "skip", >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/complete-method-manual.https.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/complete-method-manual.https.html >new file mode 100644 >index 0000000000000000000000000000000000000000..99a10e9dc79bd957a030f26c114f3ee51bb190d8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/complete-method-manual.https.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<link rel="help" href="https://w3c.github.io/browser-payment-api/#dom-merchantvalidationevent-complete"> >+<title>Test for the MerchantValidationEvent's complete() method.</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<body> >+<script> >+test(() => { >+ const event = new MerchantValidationEvent("test"); >+ assert_throws(() => { >+ event.complete(""); >+ }) >+}, "If event's isTrusted attribute is false, then then throw an InvalidStateError DOMException."); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.http-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.http-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..e35398bdff3597172c4fe670b1fd79c7599d5e02 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.http-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS MerchantValidationEvent constructor must not be exposed in insecure context >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.http.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.http.html >new file mode 100644 >index 0000000000000000000000000000000000000000..8368c79a3b1dea2df26bbc804208002ec97fbf09 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.http.html >@@ -0,0 +1,11 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>Test for MerchantValidationEvent Constructor (insecure)</title> >+<link rel="help" href="https://w3c.github.io/browser-payment-api/#merchantvalidationevent-interface"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+test(() => { >+ assert_false("MerchantValidationEvent" in Window); >+}, "MerchantValidationEvent constructor must not be exposed in insecure context"); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..cb1d264f39cae1443a2f5c456fd717a78be744dd >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https-expected.txt >@@ -0,0 +1,10 @@ >+ >+FAIL MerchantValidationEvent can be constructed in secure-context. Can't find variable: MerchantValidationEvent >+FAIL MerchantValidationEvent can be constructed with an EventInitDict, even if not trusted. Can't find variable: MerchantValidationEvent >+FAIL MerchantValidationEvent can be dispatched, even if not trusted. Can't find variable: MerchantValidationEvent >+FAIL Must have a validationURL IDL attribute, which is initialized with to the validationURL dictionary value. Can't find variable: MerchantValidationEvent >+FAIL Must throw TypeError if initialized with an invalid URL. assert_throws: function "() => { >+ new MerchantValidationEvent("test", { validationURL }) >+ }" threw object "ReferenceError: Can't find variable: MerchantValidationEvent" ("ReferenceError") expected object "TypeError" ("TypeError") >+FAIL Relative validationURLs use the document as the base. Can't find variable: MerchantValidationEvent >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https.html >new file mode 100644 >index 0000000000000000000000000000000000000000..952c0f734a30f170964053bb00e55225d57cce0b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https.html >@@ -0,0 +1,76 @@ >+<!DOCTYPE html> >+<!-- Copyright © 2017 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). --> >+<meta charset="utf-8"> >+<title>Test for MerchantValidationEvent Constructor</title> >+<link rel="help" href="https://w3c.github.io/browser-payment-api/#merchantvalidationevent-constructor"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+const applePay = Object.freeze({ supportedMethods: "https://apple.com/apple-pay"}); >+const basicCard = Object.freeze({ supportedMethods: "basic-card" }); >+const defaultMethods = Object.freeze([basicCard, applePay]); >+const defaultDetails = Object.freeze({ >+ total: { >+ label: "Total", >+ amount: { >+ currency: "USD", >+ value: "1.00", >+ }, >+ }, >+}); >+ >+test(() => { >+ new MerchantValidationEvent("test"); >+}, "MerchantValidationEvent can be constructed in secure-context."); >+ >+test(() => { >+ const ev = new MerchantValidationEvent("test", { >+ bubbles: true, >+ cancelable: true, >+ composed: true, >+ }); >+ assert_false(ev.isTrusted, "constructed in script, so not trusted"); >+ assert_true(ev.bubbles, "set by EventInitDict"); >+ assert_true(ev.cancelable, "set by EventInitDict"); >+ assert_true(ev.composed, "set by EventInitDict"); >+ assert_equals(ev.target, null, "initially null"); >+ assert_equals(ev.type, "test"); >+}, "MerchantValidationEvent can be constructed with an EventInitDict, even if not trusted."); >+ >+test(() => { >+ const request = new PaymentRequest(defaultMethods, defaultDetails); >+ const ev = new MerchantValidationEvent("test"); >+ request.addEventListener("test", evt => { >+ assert_equals(ev, evt); >+ }); >+ request.dispatchEvent(ev); >+}, "MerchantValidationEvent can be dispatched, even if not trusted."); >+ >+test(() => { >+ const validationURL = "https://pass.com"; >+ const event = new MerchantValidationEvent("test", { validationURL }); >+ assert_idl_attribute(event, "validationURL"); >+ assert_equals(event.validationURL, "https://pass.com/"); >+}, "Must have a validationURL IDL attribute, which is initialized with to the validationURL dictionary value."); >+ >+test(() => { >+ const validationURL = "http://\u005B"; // invalid URL >+ assert_throws(new TypeError(), () => { >+ new MerchantValidationEvent("test", { validationURL }) >+ }); >+}, "Must throw TypeError if initialized with an invalid URL."); >+ >+test(() => { >+ const validationURL = ""; >+ const relativePaths = [ >+ "", >+ ".", >+ "/test", >+ ] >+ for(const path of relativePaths ) { >+ const event = new MerchantValidationEvent("test", { validationURL: path }); >+ const expected = new URL(path, document.location.href).href; >+ assert_equals(event.validationURL, expected); >+ } >+}, "Relative validationURLs use the document as the base."); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/w3c-import.log >new file mode 100644 >index 0000000000000000000000000000000000000000..d211084d1abb4c7533b6c4f36f3854b056b7229a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/w3c-import.log >@@ -0,0 +1,19 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/complete-method-manual.https.html >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.http.html >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/MerchantValidationEvent/constructor.https.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.http-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.http-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..41c9a40453bd00ebe1c14c76ccb7d6ed110e57bb >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.http-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS PaymentRequestUpdateEvent constructor must not be exposed in insecure context >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.http.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.http.html >new file mode 100644 >index 0000000000000000000000000000000000000000..db7765f7bf98c38935804c2588614911a97a2290 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.http.html >@@ -0,0 +1,12 @@ >+<!DOCTYPE html> >+<!-- Copyright © 2017 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). --> >+<meta charset="utf-8"> >+<title>Test for PaymentRequestUpdateEvent Constructor (insecure)</title> >+<link rel="help" href="https://w3c.github.io/browser-payment-api/#paymentrequestupdateevent-interface"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+test(() => { >+ assert_false("PaymentRequestUpdateEvent" in Window); >+}, "PaymentRequestUpdateEvent constructor must not be exposed in insecure context"); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.https-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..704adb5653646b948d33be9f54b140dcae734d5e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.https-expected.txt >@@ -0,0 +1,5 @@ >+ >+PASS PaymentRequestUpdateEvent can be constructed in secure-context >+PASS PaymentRequestUpdateEvent can be constructed with an EventInitDict, even if not trusted >+PASS PaymentRequestUpdateEvent can be dispatched, even if not trusted >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.https.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.https.html >new file mode 100644 >index 0000000000000000000000000000000000000000..fd66493bf4f2aa006e99198094d1b7afd34f4543 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.https.html >@@ -0,0 +1,52 @@ >+<!DOCTYPE html> >+<!-- Copyright © 2017 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). --> >+<meta charset="utf-8"> >+<title>Test for PaymentRequestUpdateEvent Constructor</title> >+<link rel="help" href="https://w3c.github.io/browser-payment-api/#constructor"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+const basicCard = Object.freeze({ supportedMethods: "basic-card" }); >+const defaultMethods = Object.freeze([basicCard]); >+const defaultDetails = Object.freeze({ >+ total: { >+ label: "Total", >+ amount: { >+ currency: "USD", >+ value: "1.00", >+ }, >+ }, >+}); >+ >+test(() => { >+ try { >+ new PaymentRequestUpdateEvent("test"); >+ } catch (err) { >+ assert_unreached(`Unexpected exception: ${err.message}`); >+ } >+}, "PaymentRequestUpdateEvent can be constructed in secure-context"); >+ >+test(() => { >+ const ev = new PaymentRequestUpdateEvent("test", { >+ bubbles: true, >+ cancelable: true, >+ composed: true, >+ }); >+ assert_false(ev.isTrusted, "constructed in script, so not be trusted"); >+ assert_true(ev.bubbles, "set by EventInitDict"); >+ assert_true(ev.cancelable, "set by EventInitDict"); >+ assert_true(ev.composed, "set by EventInitDict"); >+ assert_equals(ev.target, null, "initially null"); >+ assert_equals(ev.type, "test"); >+}, "PaymentRequestUpdateEvent can be constructed with an EventInitDict, even if not trusted"); >+ >+test(() => { >+ const request = new PaymentRequest(defaultMethods, defaultDetails); >+ const ev = new PaymentRequestUpdateEvent("test"); >+ request.addEventListener("test", evt => { >+ assert_equals(ev, evt); >+ }); >+ request.dispatchEvent(ev); >+}, "PaymentRequestUpdateEvent can be dispatched, even if not trusted"); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-call-immediate-manual.https.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-call-immediate-manual.https.html >new file mode 100644 >index 0000000000000000000000000000000000000000..cd928d4be1d8609a34d06e0a960306fc95b84e32 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-call-immediate-manual.https.html >@@ -0,0 +1,193 @@ >+<!doctype html> >+<meta charset="utf8"> >+<link rel="help" href="https://www.w3.org/TR/payment-request/#updatewith()-method"> >+<link rel="help" href="https://github.com/w3c/payment-request/pull/591"> >+<title> >+ PaymentRequestUpdateEvent.updateWith() needs to be called immediately >+</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+setup({ explicit_done: true, explicit_timeout: true }); >+const validMethod = Object.freeze({ supportedMethods: "basic-card" }); >+const validMethods = Object.freeze([validMethod]); >+const validAmount = Object.freeze({ currency: "USD", value: "5.00" }); >+const validTotal = Object.freeze({ >+ label: "label", >+ amount: validAmount, >+}); >+const validShippingOptionA = Object.freeze({ >+ id: "a-shipping-option", >+ label: "A shipping option", >+ amount: validAmount, >+ selected: true, >+}); >+const validShippingOptionB = Object.freeze({ >+ id: "b-shipping-option", >+ label: "B shipping option", >+ amount: validAmount, >+}); >+const validDetails = Object.freeze({ >+ total: validTotal, >+ shippingOptions: [validShippingOptionA, validShippingOptionB], >+}); >+const validOptions = Object.freeze({ >+ requestShipping: true, >+}); >+ >+function testImmediateUpdate({ textContent: testName }) { >+ promise_test(async t => { >+ const request = new PaymentRequest( >+ validMethods, >+ validDetails, >+ validOptions >+ ); >+ const eventPromise = new Promise((resolve, reject) => { >+ request.addEventListener( >+ "shippingaddresschange", >+ async ev => { >+ // spin the event loop, sets [[waitForUpdate]] to true. >+ await Promise.resolve(); >+ try { >+ ev.updateWith(validDetails); >+ resolve(); // This is bad. >+ } catch (err) { >+ reject(err); // this is good. >+ } >+ }, >+ { once: true } >+ ); >+ }); >+ const response = await request.show(); >+ await promise_rejects( >+ t, >+ "InvalidStateError", >+ eventPromise, >+ "The event loop already spun, so [[waitForUpdate]] is now true" >+ ); >+ await response.complete(); >+ }, testName.trim()); >+} >+ >+function testSubsequentUpdateWithCalls({ textContent: testName }) { >+ promise_test(async t => { >+ const request = new PaymentRequest( >+ validMethods, >+ validDetails, >+ validOptions >+ ); >+ const eventPromise = new Promise((resolve, reject) => { >+ request.addEventListener("shippingaddresschange", async ev => { >+ const p = Promise.resolve(validDetails); >+ ev.updateWith(p); >+ await p; >+ try { >+ ev.updateWith(validDetails); >+ resolve(); // this is bad, we should never get to here. >+ } catch (err) { >+ reject(err); // this is good! >+ } >+ }); >+ }); >+ const responsePromise = request.show(); >+ await promise_rejects( >+ t, >+ "InvalidStateError", >+ eventPromise, >+ "Expected eventPromise to have rejected, because updateWith() was a called twice" >+ ); >+ const response = await responsePromise; >+ await response.complete(); >+ }, testName.trim()); >+} >+ >+function testRecycleEvents({ textContent: testName }) { >+ promise_test(async t => { >+ const request = new PaymentRequest( >+ validMethods, >+ validDetails, >+ validOptions >+ ); >+ >+ // Register both listeners. >+ const addressChangedPromise = new Promise(resolve => { >+ request.addEventListener("shippingaddresschange", resolve, { >+ once: true, >+ }); >+ }); >+ >+ const optionChangedPromise = new Promise(resolve => { >+ request.addEventListener("shippingoptionchange", resolve, { >+ once: true, >+ }); >+ }); >+ >+ const responsePromise = request.show(); >+ >+ // Let's wait for the address to change. >+ const addressChangeEvent = await addressChangedPromise; >+ >+ // Sets [[waitingForUpdate]] to true. >+ addressChangeEvent.updateWith(validDetails); >+ >+ // Let's wait for the shippingOption. >+ const optionChangeEvent = await optionChangedPromise; >+ >+ // Here, we try to be sneaky, and reuse the addressChangeEvent to perform the update. >+ // However, addressChangeEvent [[waitingForUpdate]] is true, so it throws. >+ assert_throws( >+ "InvalidStateError", >+ () => { >+ addressChangeEvent.updateWith(validDetails); >+ }, >+ "addressChangeEvent [[waitingForUpdate]] is true, so it must throw" >+ ); >+ >+ // But optionChangeEvent is still usable tho, so... >+ optionChangeEvent.updateWith(validDetails); >+ >+ assert_throws( >+ "InvalidStateError", >+ () => { >+ optionChangeEvent.updateWith(validDetails); >+ }, >+ "optionChangeEvent [[waitingForUpdate]] is true, so it must throw" >+ ); >+ >+ const response = await responsePromise; >+ await response.complete(); >+ }, testName.trim()); >+} >+</script> >+<h2>updateWith() method</h2> >+<p> >+ Click on each button in sequence from top to bottom without refreshing the page. >+ Each button will bring up the Payment Request UI window. >+</p> >+<p> >+ When the payment sheet is shown, select a different shipping address once. Then pay. >+</p> >+<ol> >+ <li id="test-0"> >+ <button onclick="testImmediateUpdate(this);"> >+ updateWith() must be called immediately, otherwise must throw an InvalidStateError. >+ </button> >+ </li> >+ <li id="test-1"> >+ <button onclick="testSubsequentUpdateWithCalls(this);"> >+ Once the event has performed an update, subsequent calls to updateWith() must throw InvalidStateError. >+ </button> >+ </li> >+ <li id="test-2"> >+ <button onclick="testRecycleEvents(this);"> >+ Recycling events must not be possible. >+ </button> When the payment sheet is shown, select a different shipping address once, then change shipping option once. Then pay. >+ </li> >+ <li> >+ <button onclick="done();">Done!</button> >+ </li> >+</ol> >+<small> >+ If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a> >+ and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">suggested reviewers</a>. >+</small> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-duplicate-shipping-options-manual.https.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-duplicate-shipping-options-manual.https.html >new file mode 100644 >index 0000000000000000000000000000000000000000..40ba3057e0cb10412df759516ee19392ae70f1c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-duplicate-shipping-options-manual.https.html >@@ -0,0 +1,97 @@ >+<!doctype html> >+<meta charset="utf8"> >+<link rel="help" href="https://w3c.github.io/payment-request/#updatewith()-method"> >+<title> >+ updateWith() method - duplicate shippingOption ids >+</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+setup({ explicit_done: true, explicit_timeout: true }); >+ >+const validMethod = Object.freeze({ supportedMethods: "basic-card" }); >+const validMethods = [validMethod]; >+const validAmount = Object.freeze({ >+ currency: "USD", >+ value: "5.00", >+}); >+const validShippingOption = Object.freeze({ >+ id: "option1", >+ label: "Option 1", >+ amount: validAmount, >+ selected: true, >+}); >+const validShippingOptions = Object.freeze([validShippingOption]); >+const validDetails = Object.freeze({ >+ total: { >+ label: "Total due", >+ amount: validAmount, >+ }, >+ shippingOptions: validShippingOptions, >+}); >+const validOptions = Object.freeze({ >+ requestShipping: true, >+}); >+ >+test(() => { >+ try { >+ const request = new PaymentRequest(validMethods, validDetails); >+ } catch (err) { >+ done(); >+ throw err; >+ } >+}, "Must construct a PaymentRequest (smoke test)"); >+ >+function testFireEvents(button) { >+ button.disabled = true; >+ promise_test(async t => { >+ const request = new PaymentRequest( >+ validMethods, >+ validDetails, >+ validOptions >+ ); >+ request.addEventListener("shippingaddresschange", event => { >+ // Same option, so duplicate ids >+ const otherShippingOption = Object.assign({}, validShippingOption, { >+ id: "other", >+ }); >+ const shippingOptions = [ >+ validShippingOption, >+ otherShippingOption, >+ validShippingOption, >+ ]; >+ const newDetails = Object.assign({}, validDetails, { shippingOptions }); >+ event.updateWith(newDetails); >+ }); >+ const acceptPromise = request.show(); >+ await promise_rejects( >+ t, >+ new TypeError(), >+ acceptPromise, >+ "Duplicate shippingOption ids must abort with TypeError" >+ ); >+ }, button.textContent.trim()); >+ done(); >+} >+</script> >+<h2>updateWith() method - duplicate shippingOptions ids</h2> >+<p> >+ Click on each button in sequence from top to bottom without refreshing the page. >+ Each button will bring up the Payment Request UI window. >+</p> >+<p> >+ When the payment sheet is shown, select a different shipping address. >+ If you have to manually abort the test from the payment sheet, then the >+ test has failed. >+</p> >+<ol> >+ <li> >+ <button onclick="testFireEvents(this)"> >+ If there are duplicate shippingOption ids, then abort payment request. >+ </button> >+ </li> >+</ol> >+<small> >+ If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a> >+ and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">suggested reviewers</a>. >+</small> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-incremental-update-manual.https.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-incremental-update-manual.https.html >new file mode 100644 >index 0000000000000000000000000000000000000000..3d1bfb41b84d6b0ecc2d4bde25eab2dead465e34 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-incremental-update-manual.https.html >@@ -0,0 +1,187 @@ >+<!doctype html> >+<meta charset="utf8"> >+<link rel="help" href="https://w3c.github.io/payment-request/#updatewith-method"> >+<title> >+ Incremental updates via updateWith() >+</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+setup({ >+ explicit_done: true, >+ explicit_timeout: true, >+}); >+ >+const methods = [{ >+ supportedMethods: "basic-card", >+}]; >+ >+const options = { >+ requestShipping: true, >+}; >+ >+const initialDetails = { >+ total: { >+ label: "Initial total", >+ amount: { >+ currency: "USD", >+ value: "1.0", >+ }, >+ }, >+ shippingOptions: [ >+ { >+ id: "neutral", >+ label: "NEUTRAL SHIPPING OPTION", >+ selected: true, >+ amount: { >+ currency: "USD", >+ value: "0.00", >+ }, >+ }, >+ ], >+}; >+ >+function testFireEvent(button, updateDetails) { >+ button.disabled = true; >+ const request = new PaymentRequest(methods, initialDetails, options); >+ const handlerPromise = new Promise(resolve => { >+ request.onshippingaddresschange = event => { >+ event.updateWith(updateDetails); >+ resolve(event); >+ }; >+ }); >+ promise_test(async t => { >+ const response = await request.show(); >+ const event = await handlerPromise; >+ await response.complete("success"); >+ }, button.textContent.trim()); >+} >+ >+</script> >+<h2> >+ Incremental updates >+</h2> >+<p> >+ Click on each button in sequence from top to bottom without refreshing the page. >+ Each button will bring up the Payment Request UI window. >+</p> >+<p> >+ Unless stated otherwise, each test will update some part of the displayed payment sheet in >+ a manner indicated below. When prompted, please change or enter a new >+ shipping address, look for the tested change, and complete the payment. >+</p> >+<p> >+ If the payment request locks up or otherwise aborts, the test has failed. >+</p> >+<ol> >+ <li> >+ <button onclick="testFireEvent(this, {});"> >+ Passing an empty dictionary does not cause the sheet to change. >+ No values in the sheet must change. >+ </button> >+ </li> >+</ol> >+ >+<section> >+ <h3>Incremental updates via PaymentDetailsUpdate.total</h3> >+ <ol> >+ <li> >+ <button onclick=" >+ const total = { >+ label: 'PASS', >+ amount: { >+ currency: 'XXX', >+ value: '20', >+ }, >+ }; >+ const updatedDetails = { total }; >+ testFireEvent(this, updatedDetails);"> >+ After changing shipping address, the total becomes XXX20, with the label "PASS". >+ </button> >+ </li> >+ </ol> >+</section> >+ >+<section> >+ <h3>Incremental updates via PaymentDetailsBase.displayItems</h3> >+ <ol> >+ <li> >+ <button onclick=" >+ const item = { >+ label: 'PASS', >+ amount: { currency: 'ABC', value: '55.00' }, >+ }; >+ const updatedDetails = { >+ displayItems: [ item ] >+ }; >+ testFireEvent(this, updatedDetails);"> >+ After changing shipping address, a new display item is shown >+ with a with label PASS, and value of ABC55.00. >+ </button> >+ </li> >+ </ol> >+</section> >+ >+<section> >+ <h3>Incremental updates via PaymentDetailsBase.shippingOptions</h3> >+ <ol> >+ <li> >+ <button onclick=" >+ const shippingOptions = [ >+ { >+ id: 'pass', >+ label: 'PASS', >+ amount: { currency: 'USD', value: '1.00' }, >+ selected: true, >+ }, >+ { >+ id: 'fail', >+ label: 'FAIL IF THIS IS SELECTED', >+ amount: { currency: 'USD', value: '25.00' } >+ }, >+ ]; >+ const updatedDetails = { >+ shippingOptions >+ }; >+ testFireEvent(this, updatedDetails);"> >+ After changing shipping address, two new shipping options appear. >+ The shipping option labelled "PASS" with a value of USD1.0 is selected. >+ </button> >+ </li> >+ </ol> >+</section> >+ >+<section> >+ <h3>Incremental updates via PaymentDetailsBase.modifiers</h3> >+ <ol> >+ <li> >+ <button onclick=" >+ const additionalItem = { >+ label: 'PASS-DISPLAY-ITEM', >+ amount: { currency: 'USD', value: '3.00' }, >+ }; >+ const modifiers = [{ >+ additionalDisplayItems: [ additionalItem ], >+ supportedMethods: 'basic-card', >+ total: { >+ label: 'PASS-TOTAL', >+ amount: { currency: 'USD', value: '123.00' }, >+ }, >+ }]; >+ const updatedDetails = { modifiers }; >+ testFireEvent(this, updatedDetails);"> >+ After changing shipping address, a new display item is shown >+ with a with label PASS-DISPLAY-ITEM, and value of ABC55.00 and the total is >+ labelled PASS-TOTAL with a value of USD123.0 >+ </button> >+ </li> >+ <li> >+ <button onclick="done()">DONE - see results</button> >+ </li> >+ </ol> >+</section> >+ >+<small> >+ If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a> >+ and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">suggested reviewers</a>. >+</small> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-method-abort-update-manual.https.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-method-abort-update-manual.https.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0ff7f23b6479695907aee3e479436b5ff13e165a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-method-abort-update-manual.https.html >@@ -0,0 +1,269 @@ >+<!doctype html> >+<meta charset="utf8"> >+<link rel="help" href="https://w3c.github.io/payment-request/#dfn-abort-the-update"> >+<title> >+ updateWith() method - "abort the update" >+</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+setup({ explicit_done: true, explicit_timeout: true }); >+ >+// PaymentMethod >+const validMethod = Object.freeze({ >+ supportedMethods: "valid-but-wont-ever-match", >+}); >+ >+const validMethodBasicCard = Object.freeze({ >+ supportedMethods: "basic-card", >+}); >+ >+// Methods >+const validMethods = Object.freeze([validMethodBasicCard, validMethod]); >+ >+// Amounts >+const validAmount = Object.freeze({ >+ currency: "USD", >+ value: "1.00", >+}); >+ >+const invalidAmount = Object.freeze({ >+ currency: "¡INVALID!", >+ value: "A1.0", >+}); >+ >+const negativeAmount = Object.freeze({ >+ currency: "USD", >+ value: "-1.00", >+}); >+ >+// Totals >+const validTotal = Object.freeze({ >+ label: "Valid Total", >+ amount: validAmount, >+}); >+ >+const invalidTotal = Object.freeze({ >+ label: "Invalid Total", >+ amount: invalidAmount, >+}); >+ >+const invalidNegativeTotal = Object.freeze({ >+ label: "Invalid negative total", >+ amount: negativeAmount, >+}); >+ >+// PaymentDetailsInit >+const validDetails = Object.freeze({ >+ total: validTotal, >+}); >+ >+const invalidDetailsNegativeTotal = Object.freeze({ >+ total: invalidNegativeTotal, >+}); >+ >+// PaymentOptions >+const validOptions = Object.freeze({ >+ requestShipping: true, >+}); >+ >+// PaymentItem >+const validPaymentItem = Object.freeze({ >+ amount: validAmount, >+ label: "Valid payment item", >+}); >+ >+const invalidPaymentItem = Object.freeze({ >+ amount: invalidAmount, >+ label: "Invalid payment item", >+}); >+ >+// PaymentItem >+const validPaymentItems = Object.freeze([validPaymentItem]); >+const invalidPaymentItems = Object.freeze([invalidPaymentItem]); >+ >+// PaymentShippingOption >+const invalidShippingOption = Object.freeze({ >+ id: "abc", >+ label: "Invalid shipping option", >+ amount: invalidAmount, >+ selected: true, >+}); >+ >+// PaymentShippingOptions >+const validShippingOption = Object.freeze({ >+ id: "abc", >+ label: "valid shipping option", >+ amount: validAmount, >+}); >+ >+const validShippingOptions = Object.freeze([validShippingOption]); >+const invalidShippingOptions = Object.freeze([invalidShippingOption]); >+ >+// PaymentDetailsModifier >+const validModifier = Object.freeze({ >+ additionalDisplayItems: validPaymentItems, >+ supportedMethods: "valid-but-wont-ever-match", >+ total: validTotal, >+}); >+ >+const modifierWithInvalidDisplayItems = Object.freeze({ >+ additionalDisplayItems: invalidPaymentItems, >+ supportedMethods: "basic-card", >+ total: validTotal, >+}); >+ >+const modifierWithValidDisplayItems = Object.freeze({ >+ additionalDisplayItems: validPaymentItems, >+ supportedMethods: "basic-card", >+ total: validTotal, >+}); >+ >+const modifierWithInvalidTotal = Object.freeze({ >+ additionalDisplayItems: validPaymentItems, >+ supportedMethods: "basic-card", >+ total: invalidTotal, >+}); >+ >+const recursiveData = {}; >+recursiveData.foo = recursiveData; >+Object.freeze(recursiveData); >+ >+const modifierWithRecursiveData = Object.freeze({ >+ supportedMethods: validMethodBasicCard, >+ total: validTotal, >+ data: recursiveData, >+}); >+ >+function testBadUpdate(button, badDetails, expectedError, errorCode) { >+ button.disabled = true; >+ promise_test(async t => { >+ const request = new PaymentRequest( >+ validMethods, >+ validDetails, >+ validOptions >+ ); >+ request.onshippingaddresschange = event => { >+ event.updateWith(badDetails); >+ }; >+ // First we check the bad update. >+ const acceptPromise = request.show(); >+ await promise_rejects( >+ t, >+ expectedError, >+ acceptPromise, >+ "badDetails must cause acceptPromise to reject with expectedError" >+ ); >+ // The request [[state]] is now "closed", so let's check for InvalidStateError >+ await promise_rejects( >+ t, >+ "InvalidStateError", >+ request.show(), >+ "show() must reject with InvalidStateError" >+ ); >+ }, button.innerText.trim()); >+} >+</script> >+<h2>updateWith() method - "abort the update"</h2> >+<p> >+ Click on each button in sequence from top to bottom without refreshing the page. >+ Each button will bring up the Payment Request UI window. >+</p> >+<p> >+ When the payment sheet is shown, change the shipping address. >+</p> >+<ol> >+ <li> >+ <button onclick=" >+ const rejectedPromise = Promise.reject(new SyntaxError('test')).catch(err => err); >+ testBadUpdate(this, rejectedPromise, 'AbortError'); >+ "> >+ Rejection of detailsPromise must abort the update with an "AbortError" DOMException. >+ </button> >+ </li> >+ <li> >+ <button onclick=" >+ const invalidDetails = { total: `this will cause a TypeError!` }; >+ testBadUpdate(this, invalidDetails, new TypeError()); >+ "> >+ Total in the update is a string, so converting to IDL must abort the update with a TypeError. >+ </button> >+ </li> >+ <li> >+ <button onclick=" >+ const invalidDetails = { total: recursiveData }; >+ testBadUpdate(this, invalidDetails, new TypeError()); >+ "> >+ Total is recursive, so converting to IDL must abort the update with a TypeError. >+ </button> >+ </li> >+ <li> >+ <button onclick=" >+ testBadUpdate(this, invalidDetailsNegativeTotal, new TypeError()); >+ "> >+ Updating with a negative total results in a TypeError. >+ </button> >+ </li> >+ <li> >+ <button onclick=" >+ const badDetails = Object.assign({}, validDetails, { displayItems: invalidPaymentItems }); >+ testBadUpdate(this, badDetails, new RangeError()); >+ "> >+ Updating with a displayItem with an invalid currency results in TypeError. >+ </button> >+ </li> >+ <li> >+ <button onclick=" >+ const duplicateShippingOptions = [validShippingOption, validShippingOption]; >+ const badDetails = Object.assign({}, validDetails, { shippingOptions: duplicateShippingOptions }); >+ testBadUpdate(this, badDetails, new TypeError()); >+ "> >+ Updating with duplicate shippingOptions (same IDs) results in a TypeError. >+ </button> >+ </li> >+ <li> >+ <button onclick=" >+ const badDetails = Object.assign({}, validDetails, { shippingOptions: invalidShippingOptions }); >+ testBadUpdate(this, badDetails, new RangeError()); >+ "> >+ Updating with a shippingOption with an invalid currency value results in a RangError. >+ </button> >+ </li> >+ <li> >+ <button onclick=" >+ // validModifier is there as to avoid false positives - it should just get ignored >+ const badModifiers = { modifiers: [ modifierWithInvalidTotal, validModifier ] }; >+ const badDetails = Object.assign({}, validDetails, badModifiers); >+ testBadUpdate(this, badDetails, new RangeError()); >+ "> >+ Must throw a RangeError when a modifier's total item has an invalid currency. >+ </button> >+ </li> >+ <li> >+ <button onclick=" >+ // validModifier is there as to avoid false positives - it should just get ignored >+ const badModifiers = { modifiers: [ modifierWithInvalidDisplayItems, validModifier ] }; >+ const badDetails = Object.assign({}, validDetails, badModifiers); >+ testBadUpdate(this, badDetails, new RangeError()); >+ "> >+ Must throw a RangeError when a modifier display item has an invalid currency. >+ </button> >+ </li> >+ <li> >+ <button onclick=" >+ // validModifier is there as to avoid false positives - it should just get ignored >+ const badModifiers = { modifiers: [ modifierWithRecursiveData, validModifier ] }; >+ const badDetails = Object.assign({}, validDetails, badModifiers); >+ testBadUpdate(this, badDetails, new TypeError()); >+ "> >+ Must throw as Modifier has a recursive dictionary. >+ </button> >+ </li> >+ <li> >+ <button onclick="done();">Done!</button> >+ </li> >+</ol> >+<small> >+ If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a> >+ and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">suggested reviewers</a>. >+</small> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-state-checks-manual.https.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-state-checks-manual.https.html >new file mode 100644 >index 0000000000000000000000000000000000000000..4d4ef73949dd1dd271521c5005ca4e93108ab844 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-state-checks-manual.https.html >@@ -0,0 +1,115 @@ >+<!doctype html> >+<meta charset="utf8"> >+<link rel="help" href="https://www.w3.org/TR/payment-request/#updatewith()-method"> >+<title>updateWith() method - state machine checks</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+setup({ explicit_done: true, explicit_timeout: true }); >+const validMethod = Object.freeze({ supportedMethods: "basic-card" }); >+const validMethods = Object.freeze([validMethod]); >+const validAmount = Object.freeze({ currency: "USD", value: "5.00" }); >+const validTotal = Object.freeze({ >+ label: "label", >+ amount: validAmount, >+}); >+const validShippingOption = Object.freeze({ >+ id: "a-shipping-option", >+ label: "A shipping option", >+ amount: validAmount, >+ selected: true, >+}); >+const validDetails = Object.freeze({ >+ total: validTotal, >+ shippingOptions: [validShippingOption], >+}); >+const validOptions = Object.freeze({ >+ requestShipping: true, >+}); >+ >+function getPaymentPromises() { >+ const request = new PaymentRequest(validMethods, validDetails, validOptions); >+ const eventPromise = new Promise(resolve => { >+ request.addEventListener("shippingaddresschange", resolve); >+ }); >+ const responsePromise = request.show(); >+ return { eventPromise, responsePromise }; >+} >+ >+function testRequestIsClosed(button) { >+ button.disabled = "true"; >+ promise_test(async t => { >+ const { eventPromise, responsePromise } = getPaymentPromises(); >+ const event = await eventPromise; >+ // We are going to abort the responsePromise, so we can ignore error. >+ responsePromise.catch(err => err); >+ // Set request.[[state]] to closed >+ await event.target.abort(); >+ assert_throws( >+ "InvalidStateError", >+ () => { >+ event.updateWith(validDetails); >+ }, >+ "request.[[state]] is not interactive, must throw an InvalidStateError." >+ ); >+ responsePromise.catch(err => err); >+ }, button.textContent.trim()); >+} >+ >+function testRequestIsUpdating(button) { >+ button.disabled = "true"; >+ promise_test(async t => { >+ const { eventPromise, responsePromise } = getPaymentPromises(); >+ const event = await eventPromise; >+ // We are going to put a promise into a pending state >+ // check that a second call to updateWith() throws, >+ // then resolve the pending promise below. >+ let resolver; >+ const pendingPromise = new Promise(resolve => { >+ resolver = resolve; >+ }); >+ // Set request.[[updating]] to true >+ event.updateWith(pendingPromise); >+ assert_throws( >+ "InvalidStateError", >+ () => { >+ event.updateWith(validDetails); >+ }, >+ "request.[[updating]] to true, must throw an InvalidStateError." >+ ); >+ // We got the error we wanted, so let's resolve with valid details. >+ resolver(validDetails); >+ await pendingPromise; >+ await event.target.abort(); >+ responsePromise.catch(err => err); >+ }, button.textContent.trim()); >+} >+ >+</script> >+<h2>updateWith() method - state machine checks</h2> >+<p> >+ Click on each button in sequence from top to bottom without refreshing the page. >+ Each button will bring up the Payment Request UI window. >+</p> >+<p> >+ When the payment sheet is shown, select a different shipping address once. Then pay. >+</p> >+<ol> >+ <li id="test-0"> >+ <button onclick="testRequestIsClosed(this);"> >+ When updateWith() is called, if request.[[state]] is not "interactive", then throw an " InvalidStateError" DOMException. >+ </button> >+ </li> >+ <li id="test-1"> >+ <button onclick="testRequestIsUpdating(this);"> >+ When updateWith() is called, If request.[[updating]] is true, then throw an "InvalidStateError" DOMException. >+ </button> >+ </li> >+ <li> >+ <button onclick="done();">Done!</button> >+ </li> >+</ol> >+<small> >+ If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a> >+ and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">suggested reviewers</a>. >+</small> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updatewith-method.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updatewith-method.https-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..7c6a657befec57cdda4e1d973aee4996198c6b7b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updatewith-method.https-expected.txt >@@ -0,0 +1,5 @@ >+ >+PASS Let target be the request which is dispatching the event. >+PASS Calling .updateWith() with an undispatched untrusted event throws "InvalidStateError" >+PASS Calling .updateWith() with a dispatched, untrusted event, throws "InvalidStateError" >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updatewith-method.https.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updatewith-method.https.html >new file mode 100644 >index 0000000000000000000000000000000000000000..adacdf3f06d1c1adb50a65585b64441c5e00de63 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updatewith-method.https.html >@@ -0,0 +1,66 @@ >+<!DOCTYPE html> >+<!-- Copyright © 2017 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). --> >+<meta charset="utf-8"> >+<title>Test for PaymentRequestUpdateEvent's updateWith() method</title> >+<link rel="help" href="https://w3c.github.io/browser-payment-api/#updatewith-method"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+const basicCard = Object.freeze({ supportedMethods: "basic-card" }); >+const defaultMethods = Object.freeze([basicCard]); >+const defaultDetails = Object.freeze({ >+ total: { >+ label: "Total", >+ amount: { >+ currency: "USD", >+ value: "1.00", >+ }, >+ }, >+}); >+ >+test(() => { >+ // Smoke test - checks target is set as expected >+ const request = new PaymentRequest(defaultMethods, defaultDetails); >+ const ev = new PaymentRequestUpdateEvent("test"); >+ request.dispatchEvent(ev); >+ assert_equals(ev.target, request, "The request and the target at the same"); >+}, "Let target be the request which is dispatching the event."); >+ >+// Github issue: https://github.com/w3c/browser-payment-api/issues/546 >+test(() => { >+ const untrustedEvents = [ >+ new PaymentRequestUpdateEvent("just a test"), >+ new PaymentRequestUpdateEvent("shippingaddresschange"), >+ new PaymentRequestUpdateEvent("shippingoptionchange"), >+ ].forEach(ev => { >+ assert_throws( >+ "InvalidStateError", >+ () => { >+ ev.updateWith(Promise.resolve()); >+ }, >+ `untrusted event of type "${ev.type}" must throw "InvalidStateError"` >+ ); >+ }); >+}, `Calling .updateWith() with an undispatched untrusted event throws "InvalidStateError"`); >+ >+// Github issue: https://github.com/w3c/browser-payment-api/issues/546 >+test(() => { >+ const request = new PaymentRequest(defaultMethods, defaultDetails); >+ const untrustedEvents = [ >+ new PaymentRequestUpdateEvent("just a test"), >+ new PaymentRequestUpdateEvent("shippingaddresschange"), >+ new PaymentRequestUpdateEvent("shippingoptionchange"), >+ ].map(ev => { >+ request.dispatchEvent(ev); // set .target and dispatch flag >+ // unstrusted event. >+ assert_throws( >+ "InvalidStateError", >+ () => { >+ ev.updateWith(Promise.resolve()) >+ }, >+ `untrusted event of type "${ev.type}" must throw "InvalidStateError"` >+ ); >+ }); >+}, `Calling .updateWith() with a dispatched, untrusted event, throws "InvalidStateError"`); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/w3c-import.log >new file mode 100644 >index 0000000000000000000000000000000000000000..d468993971f5a1f9526e7461ba183c344081b961 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/w3c-import.log >@@ -0,0 +1,24 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.http.html >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/constructor.https.html >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-call-immediate-manual.https.html >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-duplicate-shipping-options-manual.https.html >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-incremental-update-manual.https.html >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-method-abort-update-manual.https.html >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updateWith-state-checks-manual.https.html >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/PaymentRequestUpdateEvent/updatewith-method.https.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/common.sub.js b/LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/common.sub.js >index 85a08461fcb0197ed2259d77035e696c1c69d6d8..a94bac064c9432980d437a98b72d4843f1b40bbe 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/common.sub.js >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/common.sub.js >@@ -5,41 +5,57 @@ > > const tests = {}; > >-window.onmessage = (e) => { >+window.onmessage = e => { > const result = e.data; > const tagName = result.urlQuery; > const t = tests[tagName]; > t.step(() => { > if (expectSuccess[tagName]) { >- assert_equals(result.message, 'Success'); >+ assert_equals(result.message, "Success"); >+ if (result.message === "Exception") { >+ const [, code, name, stack] = result.details; >+ assert_unreached(`Unexpected exception "${name}" (${code}) ${stack}`); >+ } > } else { >- assert_equals(result.message, 'Exception'); >- assert_array_equals(result.details, [true /*ex instanceof DOMException*/, >- DOMException.SECURITY_ERR /*ex.code*/, >- 'SecurityError' /*ex.name*/]); >+ assert_equals(result.message, "Exception"); >+ const detailsArray = result.details.slice(0,3); >+ assert_array_equals(detailsArray, [ >+ true /*ex instanceof DOMException*/, >+ DOMException.SECURITY_ERR /*ex.code*/, >+ "SecurityError" /*ex.name*/, >+ ]); > } > t.done(); > }); > }; > >-['iframe', 'frame', 'object', 'embed'].forEach((tagName, i) => { >- tests[tagName] = async_test((t) => { >+["iframe", "frame", "object", "embed"].forEach((tagName, i) => { >+ tests[tagName] = async_test(t => { > const elm = document.createElement(tagName); > if (setAllowPaymentRequest) { >- elm.setAttribute('allowpaymentrequest', ''); >+ elm.setAttribute("allowpaymentrequest", ""); > } >- const path = location.pathname.substring(0, location.pathname.lastIndexOf('/') + 1); >- const url = (testCrossOrigin ? "https://{{domains[www1]}}:{{ports[https][0]}}" : "") + >- path + "echo-PaymentRequest.html?" + tagName; >- if (tagName === 'object') { >+ const path = location.pathname.substring( >+ 0, >+ location.pathname.lastIndexOf("/") + 1 >+ ); >+ const url = >+ (testCrossOrigin ? "https://{{domains[www1]}}:{{ports[https][0]}}" : "") + >+ path + >+ "echo-PaymentRequest.html?" + >+ tagName; >+ if (tagName === "object") { > elm.data = url; > } else { > elm.src = url; > } > elm.onload = t.step_func(() => { >- window[i].postMessage('What is the result of new PaymentRequest(...)?', '*'); >+ window[i].postMessage( >+ "What is the result of new PaymentRequest(...)?", >+ "*" >+ ); > }); >- elm.onerror = t.unreached_func('elm.onerror'); >+ elm.onerror = t.unreached_func("elm.onerror"); > document.body.appendChild(elm); > }, tagName); > }); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/echo-PaymentRequest.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/echo-PaymentRequest.html >index f18b16ee31bf7e3eb868d073ab5e0fb0061bbd88..5211c7e5ce78c0621036578fef79aeb2c98f2a27 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/echo-PaymentRequest.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/allowpaymentrequest/echo-PaymentRequest.html >@@ -11,7 +11,9 @@ window.onmessage = (e) => { > e.source.postMessage(result, '*'); > } catch(ex) { > result.message = 'Exception'; >- result.details = [ex instanceof DOMException, ex.code, ex.name]; >+ const isDomException = ex instanceof DOMException; >+ const stack = "stack" in ex ? ex.stack : ""; >+ result.details = [ isDomException, ex.code, ex.name, stack ]; > e.source.postMessage(result, '*'); > } > } else { >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/onmerchantvalidation-attribute.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/payment-request/onmerchantvalidation-attribute.https-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..52293231b11d925b8c2ea78ffcd83469fea11aa0 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/onmerchantvalidation-attribute.https-expected.txt >@@ -0,0 +1,6 @@ >+ >+PASS Must have a onmerchantvalidation IDL attribute >+PASS onmerchantvalidation attribute is a generic handler for "merchantvalidation" >+FAIL onmerchantvalidation attribute is a handler for MerchantValidationEvent Can't find variable: MerchantValidationEvent >+FAIL onmerchantvalidation attribute and listeners both work Can't find variable: MerchantValidationEvent >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/onmerchantvalidation-attribute.https.html b/LayoutTests/imported/w3c/web-platform-tests/payment-request/onmerchantvalidation-attribute.https.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c0ed23167ed9378ec32e769bd4f3e3afaef5040c >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/onmerchantvalidation-attribute.https.html >@@ -0,0 +1,69 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>Test for PaymentRequest's onmerchantvalidation attribute</title> >+<link rel="help" href="https://w3c.github.io/browser-payment-api/#dom-paymentrequest-onmerchantvalidation"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+"use strict"; >+const testMethod = Object.freeze({ supportedMethods: "not-a-real-method" }); >+const applePay = Object.freeze({ supportedMethods: "https://apple.com/apple-pay" }); >+const defaultMethods = Object.freeze([testMethod, applePay]); >+const defaultDetails = Object.freeze({ >+ total: { >+ label: "Total", >+ amount: { >+ currency: "USD", >+ value: "1.00", >+ }, >+ }, >+}); >+const validationURL = "https://example.com"; >+ >+test(() => { >+ const request = new PaymentRequest(defaultMethods, defaultDetails); >+ assert_idl_attribute(request, "onmerchantvalidation"); >+}, "Must have a onmerchantvalidation IDL attribute"); >+ >+test(() => { >+ const request = new PaymentRequest(defaultMethods, defaultDetails); >+ const ev = new Event("merchantvalidation"); >+ let didHandle = false; >+ request.onmerchantvalidation = evt => { >+ assert_equals(ev, evt, "must be same event"); >+ didHandle = true; >+ }; >+ request.dispatchEvent(ev); >+ assert_true(didHandle, "event did not fire"); >+}, `onmerchantvalidation attribute is a generic handler for "merchantvalidation"`); >+ >+test(() => { >+ const request = new PaymentRequest(defaultMethods, defaultDetails); >+ const ev = new MerchantValidationEvent("merchantvalidation", { validationURL }); >+ let didHandle = false; >+ request.onmerchantvalidation = evt => { >+ assert_equals(ev, evt, "must be same event"); >+ didHandle = true; >+ }; >+ request.dispatchEvent(ev); >+ assert_true(didHandle, "event did not fire"); >+}, `onmerchantvalidation attribute is a handler for MerchantValidationEvent`); >+ >+test(() => { >+ const request = new PaymentRequest(defaultMethods, defaultDetails); >+ const ev = new MerchantValidationEvent("merchantvalidation", { validationURL }); >+ let didHandle = false; >+ let didListen = false; >+ request.onmerchantvalidation = evt => { >+ assert_equals(ev, evt, "must be same event"); >+ didHandle = true; >+ }; >+ request.addEventListener("merchantvalidation", evt => { >+ assert_equals(ev, evt, "must be same event"); >+ didListen = true; >+ }); >+ request.dispatchEvent(ev); >+ assert_true(didHandle, "onmerchantvalidation must receive the event"); >+ assert_true(didListen, "addEventListener must receive the event"); >+}, `onmerchantvalidation attribute and listeners both work`); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/payment-request/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/payment-request/w3c-import.log >index 151f01c4bf25e09ac96fc903162e84dbe862800a..17eab6ba3c30c171db95ea64bb70639b45f2c557 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/payment-request/w3c-import.log >+++ b/LayoutTests/imported/w3c/web-platform-tests/payment-request/w3c-import.log >@@ -20,6 +20,7 @@ List of files: > /LayoutTests/imported/w3c/web-platform-tests/payment-request/change-shipping-option-select-last-manual.https.html > /LayoutTests/imported/w3c/web-platform-tests/payment-request/historical.https.html > /LayoutTests/imported/w3c/web-platform-tests/payment-request/idlharness.https.window.js >+/LayoutTests/imported/w3c/web-platform-tests/payment-request/onmerchantvalidation-attribute.https.html > /LayoutTests/imported/w3c/web-platform-tests/payment-request/onpaymentmenthodchange-attribute.https.html > /LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-abort-method.https.html > /LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-canmakepayment-method.https.html >diff --git a/LayoutTests/platform/ios-wk2/TestExpectations b/LayoutTests/platform/ios-wk2/TestExpectations >index 49b5bc67cc110f6f3b9f6694892499437aec2d9a..e758ceb6ddfdc0e44501668bf470aced644c0508 100644 >--- a/LayoutTests/platform/ios-wk2/TestExpectations >+++ b/LayoutTests/platform/ios-wk2/TestExpectations >@@ -1262,32 +1262,5 @@ webkit.org/b/184783 compositing/ios/overflow-scroll-touch-tiles.html [ Pass Fail > > webkit.org/b/179853 [ Debug ] imported/blink/fast/text/international-iteration-simple-text.html [ Pass Failure ] > >-# skip manual payment-request tests >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/PaymentValidationErrors/retry-shows-error-member-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/PaymentValidationErrors/retry-shows-payer-member-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/PaymentValidationErrors/retry-shows-shippingAddress-member-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/algorithms-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/change-shipping-option-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/change-shipping-option-select-last-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/complete-method-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/methodName-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/onpayerdetailchange-attribute.manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/payerEmail-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/payerName-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/payerPhone-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/rejects_if_not_active-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/requestId-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/retry-method-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/shippingAddress-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/shippingOption-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/PaymentAddress/attributes-and-toJSON-method-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/shipping-address-changed-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/show-method-optional-promise-rejects-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/show-method-optional-promise-resolves-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/show-method-postmessage-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/updateWith-method-pmi-handling-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/user-abort-algorithm-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/user-accepts-payment-request-algo-manual.https.html [ Skip ] >- > webkit.org/b/189087 svg/animations/animate-end-attribute-numeric-precision.html [ Pass Failure ] > >diff --git a/LayoutTests/platform/mac-wk2/TestExpectations b/LayoutTests/platform/mac-wk2/TestExpectations >index e1fefc2b86a1213d119a121c0da3b4625b3a8e0e..ed4a161db10c5da1506ede4717236e7fdc744a81 100644 >--- a/LayoutTests/platform/mac-wk2/TestExpectations >+++ b/LayoutTests/platform/mac-wk2/TestExpectations >@@ -834,30 +834,3 @@ webkit.org/b/186425 [ Debug ] inspector/console/webcore-logging.html [ Pass Fail > webkit.org/b/187658 http/tests/security/bypassing-cors-checks-for-extension-urls.html [ Pass Failure ] > > [ Mojave+ ] fast/canvas/webgl/context-update-on-display-configuration.html [ Pass ] >- >-# skip manual payment-request tests >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/PaymentValidationErrors/retry-shows-error-member-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/PaymentValidationErrors/retry-shows-payer-member-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/PaymentValidationErrors/retry-shows-shippingAddress-member-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/algorithms-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/change-shipping-option-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/change-shipping-option-select-last-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/complete-method-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/methodName-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/onpayerdetailchange-attribute.manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/payerEmail-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/payerName-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/payerPhone-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/rejects_if_not_active-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/requestId-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/retry-method-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/shippingAddress-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/payment-response/shippingOption-attribute-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/PaymentAddress/attributes-and-toJSON-method-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/shipping-address-changed-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/show-method-optional-promise-rejects-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/show-method-optional-promise-resolves-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/show-method-postmessage-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/updateWith-method-pmi-handling-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/user-abort-algorithm-manual.https.html [ Skip ] >-webkit.org/b/188985 imported/w3c/web-platform-tests/payment-request/user-accepts-payment-request-algo-manual.https.html [ Skip ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189235
:
348754
|
348755
|
348757
|
348759
|
348760
|
348763
|
348773