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

Unified Diff: third_party/WebKit/LayoutTests/payments/payment-request-interface.html

Issue 2028603004: Rename 'items' into 'displayItems' in PaymentDetails. (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
Index: third_party/WebKit/LayoutTests/payments/payment-request-interface.html
diff --git a/third_party/WebKit/LayoutTests/payments/payment-request-interface.html b/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
index 50bce3bda726d0f61fa5a25b4b88310bf71abe07..d543737711771a3c64596fe152f9c7dd91fe341f 100644
--- a/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
+++ b/third_party/WebKit/LayoutTests/payments/payment-request-interface.html
@@ -25,7 +25,9 @@ function buildItem(optionalSubstituteKeyValuePair) {
function buildDetails(optionalDetailName, optionalSubstituteKeyValuePair) {
var details = {};
- var detailNames = ['items', 'shippingOptions'];
+ var detailNames = ['displayItems', 'shippingOptions'];
+
+ assert_true(!optionalDetailName || detailNames.indexOf(optionalDetailName) >= 0, 'Detail name "' + optionalDetailName + '" should be either "displayItems" or "shippingOptions".');
for (var i in detailNames) {
if (optionalDetailName == detailNames[i]) {
@@ -104,12 +106,12 @@ test(function() {
}, 'Shipping option identifier should default to the single provided option.');
test(function() {
- var request = new PaymentRequest(['foo'], {"items": [buildItem()]}, {'requestShipping': true});
+ var request = new PaymentRequest(['foo'], {'displayItems': [buildItem()]}, {'requestShipping': true});
assert_equals(null, request.shippingOption);
}, 'Shipping option identifier should be null when no shipping options are provided.');
test(function() {
- var request = new PaymentRequest(['foo'], {'items': [buildItem()], 'shippingOptions': [buildItem({'id': 'standard'}), buildItem({'id': 'express'})]}, {'requestShipping': true});
+ var request = new PaymentRequest(['foo'], {'displayItems': [buildItem()], 'shippingOptions': [buildItem({'id': 'standard'}), buildItem({'id': 'express'})]}, {'requestShipping': true});
assert_equals(null, request.shippingOption);
}, 'Shipping option identifier should be null at first when multiple shipping options are provided.');
@@ -134,7 +136,7 @@ generate_tests(assert_throws, [
new PaymentRequest(['foo'], {})
}],
['Empty items should throw', null, function() {
- new PaymentRequest(['foo'], {'items': []})
+ new PaymentRequest(['foo'], {'displayItems': []})
}],
['Aborting before showing should throw.', null, function() {
new PaymentRequest(['foo'], buildDetails()).abort()
@@ -168,7 +170,7 @@ generate_tests(assert_throws, [
}],
]);
-var detailNames = ['items', 'shippingOptions'];
+var detailNames = ['displayItems', 'shippingOptions'];
for (var i in detailNames) {
generate_tests(assert_throws, [
// Invalid currency code formats.

Powered by Google App Engine
This is Rietveld 408576698