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

Unified Diff: remoting/protocol/connection_to_client_unittest.cc

Issue 8116021: Switch remoting/protocol to new callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 2 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
« no previous file with comments | « remoting/protocol/connection_to_client.cc ('k') | remoting/protocol/connection_to_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « remoting/protocol/connection_to_client.cc ('k') | remoting/protocol/connection_to_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698