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

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

Issue 1394803004: Don't use base::MessageLoop::{Quit,QuitClosure} in remoting/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « remoting/client/jni/chromoting_jni_runtime.cc ('k') | remoting/host/daemon_process_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "remoting/base/auto_thread_task_runner.h" 8 #include "remoting/base/auto_thread_task_runner.h"
9 #include "remoting/host/audio_capturer.h" 9 #include "remoting/host/audio_capturer.h"
10 #include "remoting/host/chromoting_host.h" 10 #include "remoting/host/chromoting_host.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 using testing::Return; 46 using testing::Return;
47 using testing::ReturnRef; 47 using testing::ReturnRef;
48 using testing::SaveArg; 48 using testing::SaveArg;
49 using testing::Sequence; 49 using testing::Sequence;
50 50
51 namespace remoting { 51 namespace remoting {
52 52
53 namespace { 53 namespace {
54 54
55 void PostQuitTask(base::MessageLoop* message_loop) { 55 void PostQuitTask(base::MessageLoop* message_loop) {
56 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); 56 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
57 } 57 }
58 58
59 // Run the task and delete it afterwards. This action is used to deal with 59 // Run the task and delete it afterwards. This action is used to deal with
60 // done callbacks. 60 // done callbacks.
61 ACTION(RunDoneTask) { 61 ACTION(RunDoneTask) {
62 arg1.Run(); 62 arg1.Run();
63 } 63 }
64 64
65 } // namespace 65 } // namespace
66 66
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 ExpectClientDisconnected(0, true, video_packet_sent, 670 ExpectClientDisconnected(0, true, video_packet_sent,
671 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); 671 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost));
672 EXPECT_CALL(host_status_observer_, OnShutdown()); 672 EXPECT_CALL(host_status_observer_, OnShutdown());
673 673
674 host_->Start(xmpp_login_); 674 host_->Start(xmpp_login_);
675 SimulateClientConnection(0, true, false); 675 SimulateClientConnection(0, true, false);
676 message_loop_.Run(); 676 message_loop_.Run();
677 } 677 }
678 678
679 } // namespace remoting 679 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/jni/chromoting_jni_runtime.cc ('k') | remoting/host/daemon_process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698