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

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

Issue 393703002: Rename *Fake to Fake* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/fake_screen_capturer.cc ('k') | remoting/host/host_status_monitor_fake.h » ('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/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 "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "remoting/host/host_status_monitor_fake.h" 9 #include "remoting/host/fake_host_status_monitor.h"
10 #include "remoting/signaling/mock_signal_strategy.h" 10 #include "remoting/signaling/mock_signal_strategy.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gmock_mutant.h" 12 #include "testing/gmock_mutant.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" 14 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
15 15
16 using buzz::XmlElement; 16 using buzz::XmlElement;
17 using buzz::QName; 17 using buzz::QName;
18 using testing::_; 18 using testing::_;
19 using testing::DeleteArg; 19 using testing::DeleteArg;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 &signal_strategy_, 134 &signal_strategy_,
135 kTestBotJid)); 135 kTestBotJid));
136 EXPECT_CALL(signal_strategy_, RemoveListener(_)); 136 EXPECT_CALL(signal_strategy_, RemoveListener(_));
137 } 137 }
138 138
139 protected: 139 protected:
140 base::MessageLoop message_loop_; 140 base::MessageLoop message_loop_;
141 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; 141 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
142 MockSignalStrategy signal_strategy_; 142 MockSignalStrategy signal_strategy_;
143 scoped_ptr<HostStatusLogger> host_status_logger_; 143 scoped_ptr<HostStatusLogger> host_status_logger_;
144 HostStatusMonitorFake host_status_monitor_; 144 FakeHostStatusMonitor host_status_monitor_;
145 }; 145 };
146 146
147 TEST_F(HostStatusLoggerTest, SendNow) { 147 TEST_F(HostStatusLoggerTest, SendNow) {
148 { 148 {
149 InSequence s; 149 InSequence s;
150 EXPECT_CALL(signal_strategy_, GetLocalJid()) 150 EXPECT_CALL(signal_strategy_, GetLocalJid())
151 .WillRepeatedly(Return(kHostJid)); 151 .WillRepeatedly(Return(kHostJid));
152 EXPECT_CALL(signal_strategy_, AddListener(_)); 152 EXPECT_CALL(signal_strategy_, AddListener(_));
153 EXPECT_CALL(signal_strategy_, GetNextId()); 153 EXPECT_CALL(signal_strategy_, GetNextId());
154 EXPECT_CALL(signal_strategy_, SendStanzaPtr(IsClientConnected("direct"))) 154 EXPECT_CALL(signal_strategy_, SendStanzaPtr(IsClientConnected("direct")))
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 route2.type = protocol::TransportRoute::STUN; 249 route2.type = protocol::TransportRoute::STUN;
250 host_status_logger_->OnClientRouteChange(kClientJid2, "video", route2); 250 host_status_logger_->OnClientRouteChange(kClientJid2, "video", route2);
251 host_status_logger_->OnClientDisconnected(kClientJid1); 251 host_status_logger_->OnClientDisconnected(kClientJid1);
252 host_status_logger_->OnClientAuthenticated(kClientJid2); 252 host_status_logger_->OnClientAuthenticated(kClientJid2);
253 host_status_logger_->OnClientConnected(kClientJid2); 253 host_status_logger_->OnClientConnected(kClientJid2);
254 host_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED); 254 host_status_logger_->SetSignalingStateForTest(SignalStrategy::DISCONNECTED);
255 message_loop_.Run(); 255 message_loop_.Run();
256 } 256 }
257 257
258 } // namespace remoting 258 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/fake_screen_capturer.cc ('k') | remoting/host/host_status_monitor_fake.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698