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

Unified Diff: chrome/test/data/android/payments/util.js

Issue 2018133002: Clean up PaymentRequest integration tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « chrome/test/data/android/payments/style.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/android/payments/util.js
diff --git a/chrome/test/data/android/payments/util.js b/chrome/test/data/android/payments/util.js
new file mode 100644
index 0000000000000000000000000000000000000000..5ac27922d19b2af0892addd4823eccf517a43482
--- /dev/null
+++ b/chrome/test/data/android/payments/util.js
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2016 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * Prints the message.
+ * @param {String} msg - The message to print.
+ */
+function print(msg) { // eslint-disable-line no-unused-vars
+ document.getElementById('result').innerHTML = msg;
+}
+
+/**
+ * Converts ShippingAddress into a dictionary.
+ * @param {ShippingAddress} addr - The object to convert.
+ * @return {object} The dictionary output.
+ */
+function toDictionary(addr) { // eslint-disable-line no-unused-vars
+ var dict = {};
+ if (addr) {
+ dict.regionCode = addr.regionCode;
+ dict.administrativeArea = addr.administrativeArea;
+ dict.locality = addr.locality;
+ dict.dependentLocality = addr.dependentLocality;
+ dict.addressLine = addr.addressLine;
+ dict.postalCode = addr.postalCode;
+ dict.sortingCode = addr.sortingCode;
+ dict.languageCode = addr.languageCode;
+ dict.organization = addr.organization;
+ dict.recipient = addr.recipient;
+ }
+ return dict;
+}
« no previous file with comments | « chrome/test/data/android/payments/style.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698