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

Side by Side Diff: remoting/client/client_status_logger_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/base/auto_thread_unittest.cc ('k') | remoting/client/jni/chromoting_jni_runtime.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/client/client_status_logger.h" 5 #include "remoting/client/client_status_logger.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "remoting/protocol/performance_tracker.h" 8 #include "remoting/protocol/performance_tracker.h"
9 #include "remoting/signaling/mock_signal_strategy.h" 9 #include "remoting/signaling/mock_signal_strategy.h"
10 #include "remoting/signaling/server_log_entry_unittest.h" 10 #include "remoting/signaling/server_log_entry_unittest.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" 13 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
14 14
15 using buzz::XmlElement; 15 using buzz::XmlElement;
16 using buzz::QName; 16 using buzz::QName;
17 using remoting::protocol::ConnectionToHost; 17 using remoting::protocol::ConnectionToHost;
18 using testing::_; 18 using testing::_;
19 using testing::DeleteArg; 19 using testing::DeleteArg;
20 using testing::InSequence; 20 using testing::InSequence;
21 using testing::Return; 21 using testing::Return;
22 22
23 namespace remoting { 23 namespace remoting {
24 24
25 namespace { 25 namespace {
26 26
27 ACTION_P(QuitMainMessageLoop, message_loop) { 27 ACTION_P(QuitMainMessageLoop, message_loop) {
28 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); 28 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
29 } 29 }
30 30
31 const char kTestBotJid[] = "remotingunittest@bot.talk.google.com"; 31 const char kTestBotJid[] = "remotingunittest@bot.talk.google.com";
32 const char kClientJid[] = "host@domain.com/1234"; 32 const char kClientJid[] = "host@domain.com/1234";
33 33
34 MATCHER_P2(IsStateChange, new_state, error, "") { 34 MATCHER_P2(IsStateChange, new_state, error, "") {
35 XmlElement* entry = GetSingleLogEntryFromStanza(arg); 35 XmlElement* entry = GetSingleLogEntryFromStanza(arg);
36 if (!entry) { 36 if (!entry) {
37 return false; 37 return false;
38 } 38 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 protocol::PerformanceTracker perf_tracker; 144 protocol::PerformanceTracker perf_tracker;
145 client_status_logger_->LogStatistics(&perf_tracker); 145 client_status_logger_->LogStatistics(&perf_tracker);
146 146
147 client_status_logger_->SetSignalingStateForTest(SignalStrategy::CONNECTED); 147 client_status_logger_->SetSignalingStateForTest(SignalStrategy::CONNECTED);
148 client_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED); 148 client_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED);
149 message_loop_.Run(); 149 message_loop_.Run();
150 } 150 }
151 151
152 } // namespace remoting 152 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/auto_thread_unittest.cc ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698