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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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/host/host_status_logger.cc ('k') | remoting/host/host_window.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 "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"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 new HostStatusLogger(host_status_monitor_.AsWeakPtr(), 130 new HostStatusLogger(host_status_monitor_.AsWeakPtr(),
131 ServerLogEntry::ME2ME, 131 ServerLogEntry::ME2ME,
132 &signal_strategy_, 132 &signal_strategy_,
133 kTestBotJid)); 133 kTestBotJid));
134 EXPECT_CALL(signal_strategy_, RemoveListener(_)); 134 EXPECT_CALL(signal_strategy_, RemoveListener(_));
135 } 135 }
136 136
137 protected: 137 protected:
138 base::MessageLoop message_loop_; 138 base::MessageLoop message_loop_;
139 MockSignalStrategy signal_strategy_; 139 MockSignalStrategy signal_strategy_;
140 scoped_ptr<HostStatusLogger> host_status_logger_; 140 std::unique_ptr<HostStatusLogger> host_status_logger_;
141 FakeHostStatusMonitor host_status_monitor_; 141 FakeHostStatusMonitor host_status_monitor_;
142 }; 142 };
143 143
144 TEST_F(HostStatusLoggerTest, SendNow) { 144 TEST_F(HostStatusLoggerTest, SendNow) {
145 { 145 {
146 InSequence s; 146 InSequence s;
147 EXPECT_CALL(signal_strategy_, GetLocalJid()) 147 EXPECT_CALL(signal_strategy_, GetLocalJid())
148 .WillRepeatedly(Return(kHostJid)); 148 .WillRepeatedly(Return(kHostJid));
149 EXPECT_CALL(signal_strategy_, AddListener(_)); 149 EXPECT_CALL(signal_strategy_, AddListener(_));
150 EXPECT_CALL(signal_strategy_, GetNextId()); 150 EXPECT_CALL(signal_strategy_, GetNextId());
(...skipping 95 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_status_logger.cc ('k') | remoting/host/host_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698