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

Unified Diff: remoting/host/chromoting_host_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/host/chromoting_host.cc ('k') | remoting/host/client_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host_unittest.cc
diff --git a/remoting/host/chromoting_host_unittest.cc b/remoting/host/chromoting_host_unittest.cc
index 2ae5ee43aefa3ec8176d8747be31a92a0d2ae382..4f48e530c6787c1396303310fcd68219b8943ccc 100644
--- a/remoting/host/chromoting_host_unittest.cc
+++ b/remoting/host/chromoting_host_unittest.cc
@@ -50,8 +50,7 @@ void PostQuitTask(MessageLoop* message_loop) {
// Run the task and delete it afterwards. This action is used to deal with
// done callbacks.
ACTION(RunDoneTask) {
- arg1->Run();
- delete arg1;
+ arg1.Run();
}
ACTION_P(QuitMainMessageLoop, message_loop) {
@@ -118,11 +117,9 @@ class ChromotingHostTest : public testing::Test {
session_config2_ = SessionConfig::GetDefault();
ON_CALL(video_stub_, ProcessVideoPacket(_, _))
- .WillByDefault(
- DoAll(DeleteArg<0>(), DeleteArg<1>()));
+ .WillByDefault(DeleteArg<0>());
ON_CALL(video_stub2_, ProcessVideoPacket(_, _))
- .WillByDefault(
- DoAll(DeleteArg<0>(), DeleteArg<1>()));
+ .WillByDefault(DeleteArg<0>());
ON_CALL(*connection_.get(), video_stub())
.WillByDefault(Return(&video_stub_));
ON_CALL(*connection_.get(), client_stub())
@@ -191,7 +188,7 @@ class ChromotingHostTest : public testing::Test {
NewRunnableMethod(client.get(),
&ClientSession::BeginSessionRequest,
&credentials_,
- NewRunnableFunction(&DummyDoneTask)));
+ base::Bind(&DummyDoneTask)));
}
// Helper method to remove a client connection from ChromotingHost.
@@ -501,4 +498,5 @@ TEST_F(ChromotingHostTest, CurtainModeIT2Me) {
host_->set_it2me(false);
EXPECT_THAT(curtain_activated, false);
}
+
} // namespace remoting
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698