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

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

Issue 2770193003: Implement request id in PaymentDetailsInit (Closed)
Patch Set: Rebase once more since mojom file moved Created 3 years, 8 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
Index: third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-id.https.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-id.https.html b/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-id.https.html
new file mode 100644
index 0000000000000000000000000000000000000000..8e3c34461706e11a07363613c593e371a0f69987
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-id.https.html
@@ -0,0 +1,18 @@
+<!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 identifier usage</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<iframe id="iframe" allowpaymentrequest></iframe>
+<script>
+async_test((t) => {
+ onload = t.step_func_done(() => {
+ var request = new window[0].PaymentRequest([{supportedMethods: ['foo']}], {id: 'my_payment_id', total: {label: 'label', amount: {currency: 'USD', value: '5.00'}}});
+ assert_equals(request.id, 'my_payment_id', 'Payment identifier is not reflected correctly in PaymentRequest.id');
+
+ request = new window[0].PaymentRequest([{supportedMethods: ['foo']}], {total: {label: 'label', amount: {currency: 'USD', value: '5.00'}}});
+ assert_equals(request.id.length, 36, 'Generated payment identifier is not of correct length.');
+ });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698