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

Unified Diff: chrome/test/data/android/payments/payment_request_free_shipping_test.html

Issue 1945643003: Revert of Android integration tests for PaymentRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@address-in-result
Patch Set: Created 4 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: chrome/test/data/android/payments/payment_request_free_shipping_test.html
diff --git a/chrome/test/data/android/payments/payment_request_free_shipping_test.html b/chrome/test/data/android/payments/payment_request_free_shipping_test.html
deleted file mode 100644
index fb93a823b3d9ec53f9546dfb7f297715a5a186e3..0000000000000000000000000000000000000000
--- a/chrome/test/data/android/payments/payment_request_free_shipping_test.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Free Shipping Test</title>
-<meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<style>
-button {
- width: 100%;
- height: 5em;
- font-size: 3em;
-}
-</style>
-</head>
-<body>
-<button onclick="buy()" id="buy">Buy</button>
-<script>
-function print(msg) {
- document.open();
- document.write('<pre id="result" style="font-size: 2em;">' + msg + '</pre>');
- document.close();
-}
-function toDictionary(addr) {
- var dict = {};
- 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;
-}
-function buy() {
- try {
- var request = new PaymentRequest(['visa'], {
- 'items' : [ {
- 'id' : 'total',
- 'label' : 'Total',
- 'amount' : {'currencyCode' : 'USD', 'value' : '5.00'}
- } ],
- 'shippingOptions' : [ {
- 'id' : 'freeShippingOption',
- 'label' : 'Free global shipping',
- 'amount' : {'currencyCode' : 'USD', 'value' : '0'}
- } ]
- },
- {'requestShipping' : true});
- request.show()
- .then(function(resp) {
- resp.complete(true)
- .then(function() {
- print(request.shippingOption + '<br>' +
- JSON.stringify(toDictionary(request.shippingAddress),
- undefined, 2) +
- '<br>' + resp.methodName + '<br>' +
- JSON.stringify(resp.details, undefined, 2));
- })
- .catch(function(error) { print(error.message); });
- })
- .catch(function(error) { print(error.message); });
- } catch (error) {
- print(error.message);
- }
-}
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698