Index: third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp |
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp |
index 985006d73822f75664a1b59358fc9ea839d47800..da50d216323f4809dd14e9e74d33247981940f51 100644 |
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp |
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp |
@@ -76,6 +76,17 @@ TEST_F(PaymentRequestTest, ItemListRequired) |
EXPECT_EQ(V8TypeError, getExceptionState().code()); |
} |
+TEST_F(PaymentRequestTest, ItemListIsNotEmpty) |
+{ |
+ PaymentDetails details; |
+ details.setItems(HeapVector<PaymentItem>()); |
+ |
+ PaymentRequest::create(getScriptState(), Vector<String>(1, "foo"), details, getExceptionState()); |
+ |
+ EXPECT_TRUE(getExceptionState().hadException()); |
+ EXPECT_EQ(V8TypeError, getExceptionState().code()); |
+} |
+ |
TEST_F(PaymentRequestTest, AtLeastOnePaymentDetailsItemRequired) |
{ |
PaymentDetails details; |