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

Side by Side Diff: chromeos/network/network_connection_handler_impl_unittest.cc

Issue 2858113003: Enable device-wide EAP-TLS networks (Closed)
Patch Set: Addressed comments and fixed weak_ptr access from wrong thread. Created 3 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
« no previous file with comments | « chromeos/network/network_connection_handler_impl.cc ('k') | no next file » | 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 "chromeos/network/network_connection_handler_impl.h" 5 #include "chromeos/network/network_connection_handler_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 result_ = error_name; 235 result_ = error_name;
236 } 236 }
237 237
238 std::string GetResultAndReset() { 238 std::string GetResultAndReset() {
239 std::string result; 239 std::string result;
240 result.swap(result_); 240 result.swap(result_);
241 return result; 241 return result;
242 } 242 }
243 243
244 void StartCertLoader() { 244 void StartCertLoader() {
245 CertLoader::Get()->StartWithNSSDB(test_nsscertdb_.get()); 245 CertLoader::Get()->SetUserNSSDB(test_nsscertdb_.get());
246 base::RunLoop().RunUntilIdle(); 246 base::RunLoop().RunUntilIdle();
247 } 247 }
248 248
249 void LoginToRegularUser() { 249 void LoginToRegularUser() {
250 LoginState::Get()->SetLoggedInState(LoginState::LOGGED_IN_ACTIVE, 250 LoginState::Get()->SetLoggedInState(LoginState::LOGGED_IN_ACTIVE,
251 LoginState::LOGGED_IN_USER_REGULAR); 251 LoginState::LOGGED_IN_USER_REGULAR);
252 base::RunLoop().RunUntilIdle(); 252 base::RunLoop().RunUntilIdle();
253 } 253 }
254 254
255 scoped_refptr<net::X509Certificate> ImportTestClientCert() { 255 scoped_refptr<net::X509Certificate> ImportTestClientCert() {
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 EXPECT_EQ(FakeTetherDelegate::DelegateFunctionType::NONE, 622 EXPECT_EQ(FakeTetherDelegate::DelegateFunctionType::NONE,
623 fake_tether_delegate_->last_delegate_function_type()); 623 fake_tether_delegate_->last_delegate_function_type());
624 EXPECT_EQ(NetworkConnectionHandler::kErrorTetherAttemptWithNoDelegate, 624 EXPECT_EQ(NetworkConnectionHandler::kErrorTetherAttemptWithNoDelegate,
625 GetResultAndReset()); 625 GetResultAndReset());
626 EXPECT_TRUE(network_connection_observer_->GetRequested(kTetherGuid)); 626 EXPECT_TRUE(network_connection_observer_->GetRequested(kTetherGuid));
627 EXPECT_EQ(NetworkConnectionHandler::kErrorTetherAttemptWithNoDelegate, 627 EXPECT_EQ(NetworkConnectionHandler::kErrorTetherAttemptWithNoDelegate,
628 network_connection_observer_->GetResult(kTetherGuid)); 628 network_connection_observer_->GetResult(kTetherGuid));
629 } 629 }
630 630
631 } // namespace chromeos 631 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_connection_handler_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698