| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |