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

Side by Side Diff: remoting/protocol/negotiating_authenticator_unittest.cc

Issue 2104363004: Remove remaining calls to deprecated MessageLoop methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR gab Created 4 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
« no previous file with comments | « remoting/protocol/monitored_video_stub_unittest.cc ('k') | remoting/test/protocol_perftest.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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/run_loop.h"
8 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
9 #include "remoting/base/rsa_key_pair.h" 10 #include "remoting/base/rsa_key_pair.h"
10 #include "remoting/protocol/auth_util.h" 11 #include "remoting/protocol/auth_util.h"
11 #include "remoting/protocol/authenticator_test_base.h" 12 #include "remoting/protocol/authenticator_test_base.h"
12 #include "remoting/protocol/channel_authenticator.h" 13 #include "remoting/protocol/channel_authenticator.h"
13 #include "remoting/protocol/connection_tester.h" 14 #include "remoting/protocol/connection_tester.h"
14 #include "remoting/protocol/negotiating_authenticator_base.h" 15 #include "remoting/protocol/negotiating_authenticator_base.h"
15 #include "remoting/protocol/negotiating_client_authenticator.h" 16 #include "remoting/protocol/negotiating_client_authenticator.h"
16 #include "remoting/protocol/negotiating_host_authenticator.h" 17 #include "remoting/protocol/negotiating_host_authenticator.h"
17 #include "remoting/protocol/pairing_registry.h" 18 #include "remoting/protocol/pairing_registry.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 host_auth_ = host_->CreateChannelAuthenticator(); 135 host_auth_ = host_->CreateChannelAuthenticator();
135 RunChannelAuth(false); 136 RunChannelAuth(false);
136 137
137 EXPECT_TRUE(client_socket_.get() != nullptr); 138 EXPECT_TRUE(client_socket_.get() != nullptr);
138 EXPECT_TRUE(host_socket_.get() != nullptr); 139 EXPECT_TRUE(host_socket_.get() != nullptr);
139 140
140 StreamConnectionTester tester(host_socket_.get(), client_socket_.get(), 141 StreamConnectionTester tester(host_socket_.get(), client_socket_.get(),
141 kMessageSize, kMessages); 142 kMessageSize, kMessages);
142 143
143 tester.Start(); 144 tester.Start();
144 message_loop_.Run(); 145 base::RunLoop().Run();
145 tester.CheckResults(); 146 tester.CheckResults();
146 } 147 }
147 148
148 NegotiatingAuthenticatorBase::Method current_method() { 149 NegotiatingAuthenticatorBase::Method current_method() {
149 return client_as_negotiating_authenticator_->current_method_; 150 return client_as_negotiating_authenticator_->current_method_;
150 } 151 }
151 152
152 // Use a bare pointer because the storage is managed by the base class. 153 // Use a bare pointer because the storage is managed by the base class.
153 NegotiatingHostAuthenticator* host_as_negotiating_authenticator_; 154 NegotiatingHostAuthenticator* host_as_negotiating_authenticator_;
154 NegotiatingClientAuthenticator* client_as_negotiating_authenticator_; 155 NegotiatingClientAuthenticator* client_as_negotiating_authenticator_;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 TEST_P(NegotiatingPairingAuthenticatorTest, PairingFailedInvalidSecretAndPin) { 310 TEST_P(NegotiatingPairingAuthenticatorTest, PairingFailedInvalidSecretAndPin) {
310 CreatePairingRegistry(true); 311 CreatePairingRegistry(true);
311 ASSERT_NO_FATAL_FAILURE(InitAuthenticators( 312 ASSERT_NO_FATAL_FAILURE(InitAuthenticators(
312 kTestClientId, kTestPairedSecretBad, kTestPinBad, kTestPin)); 313 kTestClientId, kTestPairedSecretBad, kTestPinBad, kTestPin));
313 ASSERT_NO_FATAL_FAILURE(RunAuthExchange()); 314 ASSERT_NO_FATAL_FAILURE(RunAuthExchange());
314 VerifyRejected(Authenticator::INVALID_CREDENTIALS); 315 VerifyRejected(Authenticator::INVALID_CREDENTIALS);
315 } 316 }
316 317
317 } // namespace protocol 318 } // namespace protocol
318 } // namespace remoting 319 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/monitored_video_stub_unittest.cc ('k') | remoting/test/protocol_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698