| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 // continues to point to that instance but |certificate_importer_owned_| is | 305 // continues to point to that instance but |certificate_importer_owned_| is |
| 306 // released. | 306 // released. |
| 307 FakeCertificateImporter* certificate_importer_; | 307 FakeCertificateImporter* certificate_importer_; |
| 308 std::unique_ptr<chromeos::onc::CertificateImporter> | 308 std::unique_ptr<chromeos::onc::CertificateImporter> |
| 309 certificate_importer_owned_; | 309 certificate_importer_owned_; |
| 310 | 310 |
| 311 StrictMock<MockConfigurationPolicyProvider> provider_; | 311 StrictMock<MockConfigurationPolicyProvider> provider_; |
| 312 std::unique_ptr<PolicyServiceImpl> policy_service_; | 312 std::unique_ptr<PolicyServiceImpl> policy_service_; |
| 313 FakeUser fake_user_; | 313 FakeUser fake_user_; |
| 314 | 314 |
| 315 // Must outlive |profile_|. |
| 316 content::TestBrowserThreadBundle thread_bundle_; |
| 317 |
| 315 TestingProfile profile_; | 318 TestingProfile profile_; |
| 316 | 319 |
| 317 std::unique_ptr<NetworkConfigurationUpdater> network_configuration_updater_; | 320 std::unique_ptr<NetworkConfigurationUpdater> network_configuration_updater_; |
| 318 content::TestBrowserThreadBundle thread_bundle_; | |
| 319 }; | 321 }; |
| 320 | 322 |
| 321 TEST_F(NetworkConfigurationUpdaterTest, CellularAllowRoaming) { | 323 TEST_F(NetworkConfigurationUpdaterTest, CellularAllowRoaming) { |
| 322 // Ignore network config updates. | 324 // Ignore network config updates. |
| 323 EXPECT_CALL(network_config_handler_, SetPolicy(_, _, _, _)).Times(AtLeast(1)); | 325 EXPECT_CALL(network_config_handler_, SetPolicy(_, _, _, _)).Times(AtLeast(1)); |
| 324 | 326 |
| 325 settings_helper_.ReplaceProvider(chromeos::kSignedDataRoamingEnabled); | 327 settings_helper_.ReplaceProvider(chromeos::kSignedDataRoamingEnabled); |
| 326 settings_helper_.SetBoolean(chromeos::kSignedDataRoamingEnabled, false); | 328 settings_helper_.SetBoolean(chromeos::kSignedDataRoamingEnabled, false); |
| 327 EXPECT_FALSE(network_device_handler_.allow_roaming_); | 329 EXPECT_FALSE(network_device_handler_.allow_roaming_); |
| 328 | 330 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 EXPECT_EQ(ExpectedImportCertificatesCallCount(), | 674 EXPECT_EQ(ExpectedImportCertificatesCallCount(), |
| 673 certificate_importer_->GetAndResetImportCount()); | 675 certificate_importer_->GetAndResetImportCount()); |
| 674 } | 676 } |
| 675 | 677 |
| 676 INSTANTIATE_TEST_CASE_P(NetworkConfigurationUpdaterTestWithParamInstance, | 678 INSTANTIATE_TEST_CASE_P(NetworkConfigurationUpdaterTestWithParamInstance, |
| 677 NetworkConfigurationUpdaterTestWithParam, | 679 NetworkConfigurationUpdaterTestWithParam, |
| 678 testing::Values(key::kDeviceOpenNetworkConfiguration, | 680 testing::Values(key::kDeviceOpenNetworkConfiguration, |
| 679 key::kOpenNetworkConfiguration)); | 681 key::kOpenNetworkConfiguration)); |
| 680 | 682 |
| 681 } // namespace policy | 683 } // namespace policy |
| OLD | NEW |