| 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;
|
| +}
|
|
|