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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp

Issue 2851383002: Verify behavior of PaymentRequest constructor. (Closed)
Patch Set: Comments Created 3 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/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 c7d0851ad2da4369d9de7492a400e04504d3f984..6f684a76ff073536d3e7a8b4f77917e26b0c15cf 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
@@ -48,17 +48,6 @@ TEST(PaymentRequestTest, SupportedMethodListRequired) {
EXPECT_EQ(kV8TypeError, scope.GetExceptionState().Code());
}
-TEST(PaymentRequestTest, TotalRequired) {
- V8TestingScope scope;
- MakePaymentRequestOriginSecure(scope.GetDocument());
- PaymentRequest::Create(scope.GetExecutionContext(),
- BuildPaymentMethodDataForTest(), PaymentDetailsInit(),
- scope.GetExceptionState());
-
- EXPECT_TRUE(scope.GetExceptionState().HadException());
- EXPECT_EQ(kV8TypeError, scope.GetExceptionState().Code());
-}
-
TEST(PaymentRequestTest, NullShippingOptionWhenNoOptionsAvailable) {
V8TestingScope scope;
MakePaymentRequestOriginSecure(scope.GetDocument());
@@ -274,22 +263,6 @@ TEST(PaymentRequestTest, PickupShippingTypeWhenShippingTypeIsPickup) {
EXPECT_EQ("pickup", request->shippingType());
}
-TEST(PaymentRequestTest, DefaultShippingTypeWhenShippingTypeIsInvalid) {
- V8TestingScope scope;
- MakePaymentRequestOriginSecure(scope.GetDocument());
- PaymentDetailsInit details;
- details.setTotal(BuildPaymentItemForTest());
- PaymentOptions options;
- options.setRequestShipping(true);
- options.setShippingType("invalid");
-
- PaymentRequest* request = PaymentRequest::Create(
- scope.GetExecutionContext(), BuildPaymentMethodDataForTest(), details,
- options, scope.GetExceptionState());
-
- EXPECT_EQ("shipping", request->shippingType());
-}
-
TEST(PaymentRequestTest, RejectShowPromiseOnInvalidShippingAddress) {
V8TestingScope scope;
PaymentRequestMockFunctionScope funcs(scope.GetScriptState());

Powered by Google App Engine
This is Rietveld 408576698