| 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 4199a02c1ebf4551c18dbbe3b4e7784919719ae3..ce14b96a212365b5690d04eebed67b8139c71414 100644
|
| --- a/remoting/protocol/connection_to_client_unittest.cc
|
| +++ b/remoting/protocol/connection_to_client_unittest.cc
|
| @@ -2,6 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "base/bind.h"
|
| #include "base/message_loop.h"
|
| #include "base/message_loop_proxy.h"
|
| #include "remoting/base/base_mock_objects.h"
|
| @@ -35,9 +36,9 @@ class ConnectionToClientTest : public testing::Test {
|
| viewer_->set_input_stub(&input_stub_);
|
| viewer_->Init(session_);
|
| EXPECT_CALL(handler_, OnConnectionOpened(viewer_.get()));
|
| - session_->state_change_callback()->Run(
|
| + session_->state_change_callback().Run(
|
| protocol::Session::CONNECTED);
|
| - session_->state_change_callback()->Run(
|
| + session_->state_change_callback().Run(
|
| protocol::Session::CONNECTED_CHANNELS);
|
| message_loop_.RunAllPending();
|
| }
|
| @@ -59,7 +60,7 @@ TEST_F(ConnectionToClientTest, SendUpdateStream) {
|
| // Then send the actual data.
|
| VideoPacket* packet = new VideoPacket();
|
| viewer_->video_stub()->ProcessVideoPacket(
|
| - packet, new DeleteTask<VideoPacket>(packet));
|
| + packet, base::Bind(&DeletePointer<VideoPacket>, packet));
|
|
|
| message_loop_.RunAllPending();
|
|
|
| @@ -79,7 +80,7 @@ TEST_F(ConnectionToClientTest, NoWriteAfterDisconnect) {
|
| // Then send the actual data.
|
| VideoPacket* packet = new VideoPacket();
|
| viewer_->video_stub()->ProcessVideoPacket(
|
| - packet, new DeleteTask<VideoPacket>(packet));
|
| + packet, base::Bind(&DeletePointer<VideoPacket>, packet));
|
|
|
| // And then close the connection to ConnectionToClient.
|
| viewer_->Disconnect();
|
| @@ -92,11 +93,11 @@ TEST_F(ConnectionToClientTest, NoWriteAfterDisconnect) {
|
|
|
| TEST_F(ConnectionToClientTest, StateChange) {
|
| EXPECT_CALL(handler_, OnConnectionClosed(viewer_.get()));
|
| - session_->state_change_callback()->Run(protocol::Session::CLOSED);
|
| + session_->state_change_callback().Run(protocol::Session::CLOSED);
|
| message_loop_.RunAllPending();
|
|
|
| EXPECT_CALL(handler_, OnConnectionFailed(viewer_.get()));
|
| - session_->state_change_callback()->Run(protocol::Session::FAILED);
|
| + session_->state_change_callback().Run(protocol::Session::FAILED);
|
| message_loop_.RunAllPending();
|
| }
|
|
|
|
|