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

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

Issue 1861543003: DO NOT SUBMIT This fixes CFI bot, but it's ugly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentRequestDetailsTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8cdb6102a41d7f7058de6971a9c1bfb954dc6de5..28f4e609ba5efb24ff1628aa1b88ff7a4666362b 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestTest.cpp
@@ -45,7 +45,7 @@ private:
TEST_F(PaymentRequestTest, NoExceptionWithValidData)
{
- PaymentRequest::create(getScriptState(), Vector<String>(1, "foo"), buildPaymentDetailsForTest(), getExceptionState());
+ PaymentRequest::create(getScriptState(), Vector<String>(1, "foo"), buildPaymentDetailsForTest(true), getExceptionState());
EXPECT_FALSE(getExceptionState().hadException());
}
@@ -54,7 +54,7 @@ TEST_F(PaymentRequestTest, SecureContextRequired)
{
setSecurityOrigin("http://www.example.com");
- PaymentRequest::create(getScriptState(), Vector<String>(1, "foo"), buildPaymentDetailsForTest(), getExceptionState());
+ PaymentRequest::create(getScriptState(), Vector<String>(1, "foo"), buildPaymentDetailsForTest(true), getExceptionState());
EXPECT_TRUE(getExceptionState().hadException());
EXPECT_EQ(SecurityError, getExceptionState().code());
@@ -62,7 +62,7 @@ TEST_F(PaymentRequestTest, SecureContextRequired)
TEST_F(PaymentRequestTest, SupportedMethodListRequired)
{
- PaymentRequest::create(getScriptState(), Vector<String>(), buildPaymentDetailsForTest(), getExceptionState());
+ PaymentRequest::create(getScriptState(), Vector<String>(), buildPaymentDetailsForTest(true), getExceptionState());
EXPECT_TRUE(getExceptionState().hadException());
EXPECT_EQ(V8TypeError, getExceptionState().code());
@@ -89,7 +89,7 @@ TEST_F(PaymentRequestTest, AtLeastOnePaymentDetailsItemRequired)
TEST_F(PaymentRequestTest, NullShippingOptionWhenNoOptionsAvailable)
{
- PaymentDetails details = buildPaymentDetailsForTest();
+ PaymentDetails details = buildPaymentDetailsForTest(false);
details.setShippingOptions(HeapVector<ShippingOption>());
PaymentRequest* request = PaymentRequest::create(getScriptState(), Vector<String>(1, "foo"), details, getExceptionState());
@@ -99,7 +99,7 @@ TEST_F(PaymentRequestTest, NullShippingOptionWhenNoOptionsAvailable)
TEST_F(PaymentRequestTest, NullShippingOptionWhenMultipleOptionsAvailable)
{
- PaymentDetails details = buildPaymentDetailsForTest();
+ PaymentDetails details = buildPaymentDetailsForTest(true);
EXPECT_LE(2U, details.shippingOptions().size());
PaymentRequest* request = PaymentRequest::create(getScriptState(), Vector<String>(1, "foo"), details, getExceptionState());
@@ -116,7 +116,7 @@ TEST_F(PaymentRequestTest, SelectSingleAvailableShippingOption)
option.setAmount(amount);
option.setId("standard");
option.setLabel("Standard shipping");
- PaymentDetails details = buildPaymentDetailsForTest();
+ PaymentDetails details = buildPaymentDetailsForTest(true);
details.setShippingOptions(HeapVector<ShippingOption>(1, option));
PaymentRequest* request = PaymentRequest::create(getScriptState(), Vector<String>(1, "foo"), details, getExceptionState());
@@ -126,7 +126,7 @@ TEST_F(PaymentRequestTest, SelectSingleAvailableShippingOption)
TEST_F(PaymentRequestTest, AbortWithoutShowShouldThrow)
{
- PaymentRequest* request = PaymentRequest::create(getScriptState(), Vector<String>(1, "foo"), buildPaymentDetailsForTest(), getExceptionState());
+ PaymentRequest* request = PaymentRequest::create(getScriptState(), Vector<String>(1, "foo"), buildPaymentDetailsForTest(true), getExceptionState());
EXPECT_FALSE(getExceptionState().hadException());
request->abort(getExceptionState());
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentRequestDetailsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698