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

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

Issue 2054823002: PaymentRequest: complete() method should take PaymentComplete enum value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/PaymentResponseTest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp b/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp
index 5677cb40a10bd0a6b2cfb1f8577eceeab730e328..2624193a73ba6cbe9dd34746f775425ed9b57881 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp
@@ -30,7 +30,7 @@ public:
~MockPaymentCompleter() override {}
- MOCK_METHOD2(complete, ScriptPromise(ScriptState*, bool success));
+ MOCK_METHOD2(complete, ScriptPromise(ScriptState*, const PaymentComplete result));
DEFINE_INLINE_TRACE() {}
@@ -86,9 +86,9 @@ TEST_F(PaymentResponseTest, CompleteCalledWithSuccess)
MockPaymentCompleter* completeCallback = new MockPaymentCompleter;
PaymentResponse output(std::move(input), completeCallback);
- EXPECT_CALL(*completeCallback, complete(getScriptState(), true));
+ EXPECT_CALL(*completeCallback, complete(getScriptState(), Success));
- output.complete(getScriptState(), true);
+ output.complete(getScriptState(), "success");
}
TEST_F(PaymentResponseTest, CompleteCalledWithFailure)
@@ -99,9 +99,9 @@ TEST_F(PaymentResponseTest, CompleteCalledWithFailure)
MockPaymentCompleter* completeCallback = new MockPaymentCompleter;
PaymentResponse output(std::move(input), completeCallback);
- EXPECT_CALL(*completeCallback, complete(getScriptState(), false));
+ EXPECT_CALL(*completeCallback, complete(getScriptState(), Fail));
- output.complete(getScriptState(), false);
+ output.complete(getScriptState(), "fail");
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698