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

Side by Side Diff: remoting/host/host_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
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/host/host_status_logger.h" 5 #include "remoting/host/host_status_logger.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "remoting/host/fake_host_status_monitor.h" 8 #include "remoting/host/fake_host_status_monitor.h"
9 #include "remoting/signaling/mock_signal_strategy.h" 9 #include "remoting/signaling/mock_signal_strategy.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
11 #include "testing/gmock_mutant.h" 11 #include "testing/gmock_mutant.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 testing::_; 17 using testing::_;
18 using testing::DeleteArg; 18 using testing::DeleteArg;
19 using testing::InSequence; 19 using testing::InSequence;
20 using testing::Return; 20 using testing::Return;
21 21
22 namespace remoting { 22 namespace remoting {
23 23
24 namespace { 24 namespace {
25 25
26 ACTION_P(QuitMainMessageLoop, message_loop) { 26 ACTION_P(QuitMainMessageLoop, message_loop) {
27 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); 27 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
28 } 28 }
29 29
30 const char kJabberClientNamespace[] = "jabber:client"; 30 const char kJabberClientNamespace[] = "jabber:client";
31 const char kChromotingNamespace[] = "google:remoting"; 31 const char kChromotingNamespace[] = "google:remoting";
32 const char kTestBotJid[] = "remotingunittest@bot.talk.google.com"; 32 const char kTestBotJid[] = "remotingunittest@bot.talk.google.com";
33 const char kClientJid1[] = "client@domain.com/1234"; 33 const char kClientJid1[] = "client@domain.com/1234";
34 const char kClientJid2[] = "client@domain.com/5678"; 34 const char kClientJid2[] = "client@domain.com/5678";
35 const char kHostJid[] = "host@domain.com/1234"; 35 const char kHostJid[] = "host@domain.com/1234";
36 36
37 bool IsLogEntryForConnection(XmlElement* node, const char* connection_type) { 37 bool IsLogEntryForConnection(XmlElement* node, const char* connection_type) {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 route2.type = protocol::TransportRoute::STUN; 246 route2.type = protocol::TransportRoute::STUN;
247 host_status_logger_->OnClientRouteChange(kClientJid2, "video", route2); 247 host_status_logger_->OnClientRouteChange(kClientJid2, "video", route2);
248 host_status_logger_->OnClientDisconnected(kClientJid1); 248 host_status_logger_->OnClientDisconnected(kClientJid1);
249 host_status_logger_->OnClientAuthenticated(kClientJid2); 249 host_status_logger_->OnClientAuthenticated(kClientJid2);
250 host_status_logger_->OnClientConnected(kClientJid2); 250 host_status_logger_->OnClientConnected(kClientJid2);
251 host_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED); 251 host_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED);
252 message_loop_.Run(); 252 message_loop_.Run();
253 } 253 }
254 254
255 } // namespace remoting 255 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/host_change_notification_listener_unittest.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698