Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html

Issue 2864013002: Verify behavior of PaymentRequest.show() method, part 1. (Closed)
Patch Set: Address comments. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/payments/content/payment_request_web_contents_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html b/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html
new file mode 100644
index 0000000000000000000000000000000000000000..d170ea024fef6e8b51f55fff6a9a5cf8d8222add
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html
@@ -0,0 +1,40 @@
+<!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 PaymentRequest.show() method</title>
+<link rel="help" href="https://w3c.github.io/browser-payment-api/#show-method">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+'use strict';
+
+promise_test(t => {
+ const request1 = new PaymentRequest([{
+ supportedMethods: ['basic-card'],
+ }], {
+ total: {
+ label: 'request1',
+ amount: {
+ currency: 'USD',
+ value: '1.00',
+ },
+ },
+ });
+ const request2 = new PaymentRequest([{
+ supportedMethods: ['basic-card'],
+ }], {
+ total: {
+ label: 'request2',
+ amount: {
+ currency: 'USD',
+ value: '1.00',
+ },
+ },
+ });
+ const result = promise_rejects(t, null, request1.show());
+ promise_rejects(t, 'AbortError', request2.show())
+ .then(t.step_func(() => request1.abort()));
+ return result;
+}, 'If the user agent\'s "payment request is showing" boolean is true, ' +
+ 'then return a promise rejected with an "AbortError" DOMException.');
+</script>
« no previous file with comments | « components/payments/content/payment_request_web_contents_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698