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

Unified Diff: remoting/host/screen_recorder_unittest.cc

Issue 8493020: Move code in src/remoting to the new callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: - Created 9 years, 1 month 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/screen_recorder.cc ('k') | remoting/protocol/buffered_socket_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/screen_recorder_unittest.cc
diff --git a/remoting/host/screen_recorder_unittest.cc b/remoting/host/screen_recorder_unittest.cc
index 3a20283993f902e0644c802d17ba16a7d1d05dbc..51996dceb924c1a1fe49daa065df11d30d513922 100644
--- a/remoting/host/screen_recorder_unittest.cc
+++ b/remoting/host/screen_recorder_unittest.cc
@@ -25,7 +25,6 @@ using ::testing::DeleteArg;
using ::testing::DoAll;
using ::testing::InSequence;
using ::testing::InvokeWithoutArgs;
-using ::testing::NotNull;
using ::testing::Return;
using ::testing::SaveArg;
@@ -36,15 +35,13 @@ namespace {
ACTION_P2(RunCallback, region, data) {
SkRegion& dirty_region = data->mutable_dirty_region();
dirty_region.op(region, SkRegion::kUnion_Op);
- arg0->Run(data);
- delete arg0;
+ arg0.Run(data);
}
ACTION(FinishEncode) {
scoped_ptr<VideoPacket> packet(new VideoPacket());
packet->set_flags(VideoPacket::LAST_PACKET | VideoPacket::LAST_PARTITION);
- arg2->Run(packet.release());
- delete arg2;
+ arg2.Run(packet.release());
}
ACTION(FinishSend) {
@@ -119,11 +116,11 @@ TEST_F(ScreenRecorderTest, StartAndStop) {
EXPECT_CALL(capturer_, InvalidateFullScreen());
// First the capturer is called.
- EXPECT_CALL(capturer_, CaptureInvalidRegion(NotNull()))
+ EXPECT_CALL(capturer_, CaptureInvalidRegion(_))
.WillRepeatedly(RunCallback(update_region, data));
// Expect the encoder be called.
- EXPECT_CALL(*encoder_, Encode(data, false, NotNull()))
+ EXPECT_CALL(*encoder_, Encode(data, false, _))
.WillRepeatedly(FinishEncode());
MockVideoStub video_stub;
« no previous file with comments | « remoting/host/screen_recorder.cc ('k') | remoting/protocol/buffered_socket_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698