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

Side by Side Diff: remoting/host/screen_recorder_unittest.cc

Issue 8889024: Removing MessageLoop::QuitTask() from remoting/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/log_to_server_unittest.cc ('k') | remoting/jingle_glue/jingle_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/screen_recorder.h" 5 #include "remoting/host/screen_recorder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "remoting/base/base_mock_objects.h" 10 #include "remoting/base/base_mock_objects.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 packet->set_flags(VideoPacket::LAST_PACKET | VideoPacket::LAST_PARTITION); 45 packet->set_flags(VideoPacket::LAST_PACKET | VideoPacket::LAST_PARTITION);
46 arg2.Run(packet.release()); 46 arg2.Run(packet.release());
47 } 47 }
48 48
49 ACTION(FinishSend) { 49 ACTION(FinishSend) {
50 arg1.Run(); 50 arg1.Run();
51 } 51 }
52 52
53 // Helper method to quit the main message loop. 53 // Helper method to quit the main message loop.
54 void QuitMessageLoop(MessageLoop* message_loop) { 54 void QuitMessageLoop(MessageLoop* message_loop) {
55 message_loop->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 55 message_loop->PostTask(FROM_HERE, MessageLoop::QuitClosure());
56 } 56 }
57 57
58 ACTION_P2(StopScreenRecorder, recorder, task) { 58 ACTION_P2(StopScreenRecorder, recorder, task) {
59 recorder->Stop(task); 59 recorder->Stop(task);
60 } 60 }
61 61
62 } // namespace 62 } // namespace
63 63
64 static const int kWidth = 640; 64 static const int kWidth = 640;
65 static const int kHeight = 480; 65 static const int kHeight = 480;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 record_->Start(); 163 record_->Start();
164 message_loop_.Run(); 164 message_loop_.Run();
165 } 165 }
166 166
167 TEST_F(ScreenRecorderTest, StopWithoutStart) { 167 TEST_F(ScreenRecorderTest, StopWithoutStart) {
168 record_->Stop(base::Bind(&QuitMessageLoop, &message_loop_)); 168 record_->Stop(base::Bind(&QuitMessageLoop, &message_loop_));
169 message_loop_.Run(); 169 message_loop_.Run();
170 } 170 }
171 171
172 } // namespace remoting 172 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/log_to_server_unittest.cc ('k') | remoting/jingle_glue/jingle_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698