| Index: remoting/protocol/connection_to_client_unittest.cc
|
| diff --git a/remoting/protocol/connection_to_client_unittest.cc b/remoting/protocol/connection_to_client_unittest.cc
|
| index e123cfaf0db922a7a6492d43de476d2977d6ac2f..5a7dd9be384f1b1cd492b4368b8aca93e678ffc0 100644
|
| --- a/remoting/protocol/connection_to_client_unittest.cc
|
| +++ b/remoting/protocol/connection_to_client_unittest.cc
|
| @@ -14,6 +14,7 @@
|
| #include "testing/gmock/include/gmock/gmock.h"
|
|
|
| using ::testing::_;
|
| +using ::testing::InvokeWithoutArgs;
|
| using ::testing::NotNull;
|
| using ::testing::StrictMock;
|
|
|
| @@ -31,11 +32,10 @@ class ConnectionToClientTest : public testing::Test {
|
|
|
| // Allocate a ClientConnection object with the mock objects.
|
| viewer_.reset(new ConnectionToClient(session_));
|
| - viewer_->set_clipboard_stub(&clipboard_stub_);
|
| - viewer_->set_host_stub(&host_stub_);
|
| - viewer_->set_input_stub(&input_stub_);
|
| viewer_->SetEventHandler(&handler_);
|
| - EXPECT_CALL(handler_, OnConnectionAuthenticated(viewer_.get()));
|
| + EXPECT_CALL(handler_, OnConnectionAuthenticated(viewer_.get()))
|
| + .WillOnce(
|
| + InvokeWithoutArgs(this, &ConnectionToClientTest::ConnectStubs));
|
| EXPECT_CALL(handler_, OnConnectionChannelsConnected(viewer_.get()));
|
| session_->event_handler()->OnSessionStateChange(Session::CONNECTED);
|
| session_->event_handler()->OnSessionStateChange(Session::AUTHENTICATED);
|
| @@ -47,6 +47,12 @@ class ConnectionToClientTest : public testing::Test {
|
| base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| + void ConnectStubs() {
|
| + viewer_->set_clipboard_stub(&clipboard_stub_);
|
| + viewer_->set_host_stub(&host_stub_);
|
| + viewer_->set_input_stub(&input_stub_);
|
| + }
|
| +
|
| base::MessageLoop message_loop_;
|
| MockConnectionToClientEventHandler handler_;
|
| MockClipboardStub clipboard_stub_;
|
|
|