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

Side by Side Diff: chromeos/network/auto_connect_handler_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/cert_loader_unittest.cc ('k') | chromeos/network/client_cert_resolver.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 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 "chromeos/network/auto_connect_handler.h" 5 #include "chromeos/network/auto_connect_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 DBusThreadManager::Shutdown(); 119 DBusThreadManager::Shutdown();
120 CertLoader::Shutdown(); 120 CertLoader::Shutdown();
121 } 121 }
122 122
123 protected: 123 protected:
124 std::string GetServiceState(const std::string& service_path) { 124 std::string GetServiceState(const std::string& service_path) {
125 return GetServiceStringProperty(service_path, shill::kStateProperty); 125 return GetServiceStringProperty(service_path, shill::kStateProperty);
126 } 126 }
127 127
128 void StartCertLoader() { 128 void StartCertLoader() {
129 CertLoader::Get()->StartWithNSSDB(test_nsscertdb_.get()); 129 CertLoader::Get()->SetUserNSSDB(test_nsscertdb_.get());
130 base::RunLoop().RunUntilIdle(); 130 base::RunLoop().RunUntilIdle();
131 } 131 }
132 132
133 void LoginToRegularUser() { 133 void LoginToRegularUser() {
134 LoginState::Get()->SetLoggedInState(LoginState::LOGGED_IN_ACTIVE, 134 LoginState::Get()->SetLoggedInState(LoginState::LOGGED_IN_ACTIVE,
135 LoginState::LOGGED_IN_USER_REGULAR); 135 LoginState::LOGGED_IN_USER_REGULAR);
136 base::RunLoop().RunUntilIdle(); 136 base::RunLoop().RunUntilIdle();
137 } 137 }
138 138
139 scoped_refptr<net::X509Certificate> ImportTestClientCert() { 139 scoped_refptr<net::X509Certificate> ImportTestClientCert() {
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 // Applying the user policy after login would usually trigger connecting to 452 // Applying the user policy after login would usually trigger connecting to
453 // the 'best' network. But the manual connect prevents this. 453 // the 'best' network. But the manual connect prevents this.
454 SetupPolicy(std::string(), // no network configs 454 SetupPolicy(std::string(), // no network configs
455 base::DictionaryValue(), // no global config 455 base::DictionaryValue(), // no global config
456 true); // load as user policy 456 true); // load as user policy
457 EXPECT_EQ(shill::kStateOnline, GetServiceState("wifi0")); 457 EXPECT_EQ(shill::kStateOnline, GetServiceState("wifi0"));
458 EXPECT_EQ(shill::kStateIdle, GetServiceState("wifi1")); 458 EXPECT_EQ(shill::kStateIdle, GetServiceState("wifi1"));
459 } 459 }
460 460
461 } // namespace chromeos 461 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/cert_loader_unittest.cc ('k') | chromeos/network/client_cert_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698