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

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: rebase 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 026fd103adb6144373929ead26157181b36c452b..ae633dcaebf744e93d28acfc428d483403ae29d7 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentResponseTest.cpp
@@ -32,7 +32,7 @@ public:
~MockPaymentCompleter() override {}
- MOCK_METHOD2(complete, ScriptPromise(ScriptState*, bool success));
+ MOCK_METHOD2(complete, ScriptPromise(ScriptState*, PaymentComplete result));
DEFINE_INLINE_TRACE() {}
@@ -83,9 +83,9 @@ TEST(PaymentResponseTest, CompleteCalledWithSuccess)
MockPaymentCompleter* completeCallback = new MockPaymentCompleter;
PaymentResponse output(std::move(input), completeCallback);
- EXPECT_CALL(*completeCallback, complete(scope.getScriptState(), true));
+ EXPECT_CALL(*completeCallback, complete(scope.getScriptState(), Success));
- output.complete(scope.getScriptState(), true);
+ output.complete(scope.getScriptState(), "success");
}
TEST(PaymentResponseTest, CompleteCalledWithFailure)
@@ -97,9 +97,9 @@ TEST(PaymentResponseTest, CompleteCalledWithFailure)
MockPaymentCompleter* completeCallback = new MockPaymentCompleter;
PaymentResponse output(std::move(input), completeCallback);
- EXPECT_CALL(*completeCallback, complete(scope.getScriptState(), false));
+ EXPECT_CALL(*completeCallback, complete(scope.getScriptState(), Fail));
- output.complete(scope.getScriptState(), false);
+ output.complete(scope.getScriptState(), "fail");
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698