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

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

Issue 14314026: remoting: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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/posix/signal_handler.cc ('k') | remoting/host/remoting_me2me_host.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 "remoting/host/register_support_host_request.h" 5 #include "remoting/host/register_support_host_request.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ASSERT_TRUE(key_pair_); 62 ASSERT_TRUE(key_pair_);
63 63
64 EXPECT_CALL(signal_strategy_, AddListener(NotNull())) 64 EXPECT_CALL(signal_strategy_, AddListener(NotNull()))
65 .WillRepeatedly(AddListener(&signal_strategy_listeners_)); 65 .WillRepeatedly(AddListener(&signal_strategy_listeners_));
66 EXPECT_CALL(signal_strategy_, RemoveListener(NotNull())) 66 EXPECT_CALL(signal_strategy_, RemoveListener(NotNull()))
67 .WillRepeatedly(RemoveListener(&signal_strategy_listeners_)); 67 .WillRepeatedly(RemoveListener(&signal_strategy_listeners_));
68 EXPECT_CALL(signal_strategy_, GetLocalJid()) 68 EXPECT_CALL(signal_strategy_, GetLocalJid())
69 .WillRepeatedly(Return(kTestJid)); 69 .WillRepeatedly(Return(kTestJid));
70 } 70 }
71 71
72 MessageLoop message_loop_; 72 base::MessageLoop message_loop_;
73 MockSignalStrategy signal_strategy_; 73 MockSignalStrategy signal_strategy_;
74 ObserverList<SignalStrategy::Listener, true> signal_strategy_listeners_; 74 ObserverList<SignalStrategy::Listener, true> signal_strategy_listeners_;
75 scoped_refptr<RsaKeyPair> key_pair_; 75 scoped_refptr<RsaKeyPair> key_pair_;
76 MockCallback callback_; 76 MockCallback callback_;
77 }; 77 };
78 78
79 TEST_F(RegisterSupportHostRequestTest, Send) { 79 TEST_F(RegisterSupportHostRequestTest, Send) {
80 // |iq_request| is freed by RegisterSupportHostRequest. 80 // |iq_request| is freed by RegisterSupportHostRequest.
81 int64 start_time = static_cast<int64>(base::Time::Now().ToDoubleT()); 81 int64 start_time = static_cast<int64>(base::Time::Now().ToDoubleT());
82 82
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 while ((listener = it.GetNext()) != NULL) { 156 while ((listener = it.GetNext()) != NULL) {
157 if (listener->OnSignalStrategyIncomingStanza(response.get())) 157 if (listener->OnSignalStrategyIncomingStanza(response.get()))
158 consumed++; 158 consumed++;
159 } 159 }
160 EXPECT_EQ(1, consumed); 160 EXPECT_EQ(1, consumed);
161 161
162 message_loop_.RunUntilIdle(); 162 message_loop_.RunUntilIdle();
163 } 163 }
164 164
165 } // namespace remoting 165 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/posix/signal_handler.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698