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

Unified Diff: blimp/net/engine_authentication_handler_unittest.cc

Issue 1551583003: Implementation and fixes for Blimp client/engine E2E communication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dtrainor-linux-cl1528243002
Patch Set: Created 5 years 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: blimp/net/engine_authentication_handler_unittest.cc
diff --git a/blimp/net/engine_authentication_handler_unittest.cc b/blimp/net/engine_authentication_handler_unittest.cc
index 9a3f4ca6c0bf01b57caae1fd2593d00d91045267..90fb7fdb9bac5dd4c12bd7f037b6bb58b6eba429 100644
--- a/blimp/net/engine_authentication_handler_unittest.cc
+++ b/blimp/net/engine_authentication_handler_unittest.cc
@@ -41,11 +41,9 @@ class EngineAuthenticationHandlerTest : public testing::Test {
protected:
void ExpectOnConnection() {
EXPECT_CALL(*connection_, SetConnectionErrorObserver(_))
- .Times(2)
- .WillRepeatedly(SaveArg<0>(&error_observer_));
+ .WillOnce(SaveArg<0>(&error_observer_));
EXPECT_CALL(*connection_, SetIncomingMessageProcessor(_))
- .Times(2)
- .WillRepeatedly(SaveArg<0>(&incoming_message_processor_));
+ .WillOnce(SaveArg<0>(&incoming_message_processor_));
}
scoped_refptr<base::TestMockTimeTaskRunner> runner_;
@@ -69,8 +67,6 @@ TEST_F(EngineAuthenticationHandlerTest, AuthenticationSucceeds) {
incoming_message_processor_->ProcessMessage(std::move(blimp_message),
process_message_cb.callback());
EXPECT_EQ(net::OK, process_message_cb.WaitForResult());
- EXPECT_EQ(nullptr, error_observer_);
- EXPECT_EQ(nullptr, incoming_message_processor_);
}
TEST_F(EngineAuthenticationHandlerTest, WrongMessageReceived) {
@@ -83,8 +79,6 @@ TEST_F(EngineAuthenticationHandlerTest, WrongMessageReceived) {
incoming_message_processor_->ProcessMessage(std::move(blimp_message),
process_message_cb.callback());
EXPECT_EQ(net::OK, process_message_cb.WaitForResult());
- EXPECT_EQ(nullptr, error_observer_);
- EXPECT_EQ(nullptr, incoming_message_processor_);
}
TEST_F(EngineAuthenticationHandlerTest, ConnectionError) {
@@ -93,8 +87,6 @@ TEST_F(EngineAuthenticationHandlerTest, ConnectionError) {
EXPECT_NE(nullptr, error_observer_);
EXPECT_NE(nullptr, incoming_message_processor_);
error_observer_->OnConnectionError(net::ERR_FAILED);
- EXPECT_EQ(nullptr, error_observer_);
- EXPECT_EQ(nullptr, incoming_message_processor_);
}
TEST_F(EngineAuthenticationHandlerTest, Timeout) {
@@ -104,8 +96,6 @@ TEST_F(EngineAuthenticationHandlerTest, Timeout) {
EXPECT_NE(nullptr, incoming_message_processor_);
runner_->FastForwardBy(base::TimeDelta::FromSeconds(11));
- EXPECT_EQ(nullptr, error_observer_);
- EXPECT_EQ(nullptr, incoming_message_processor_);
}
TEST_F(EngineAuthenticationHandlerTest, AuthHandlerDeletedFirst) {

Powered by Google App Engine
This is Rietveld 408576698