| OLD | NEW |
| 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 "chrome/browser/chromeos/policy/network_configuration_updater_impl_cros
.h" | 5 #include "chrome/browser/chromeos/policy/network_configuration_updater_impl_cros
.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 if (name == key::kDeviceOpenNetworkConfiguration) | 83 if (name == key::kDeviceOpenNetworkConfiguration) |
| 84 return chromeos::onc::ONC_SOURCE_DEVICE_POLICY; | 84 return chromeos::onc::ONC_SOURCE_DEVICE_POLICY; |
| 85 if (name == key::kOpenNetworkConfiguration) | 85 if (name == key::kOpenNetworkConfiguration) |
| 86 return chromeos::onc::ONC_SOURCE_USER_POLICY; | 86 return chromeos::onc::ONC_SOURCE_USER_POLICY; |
| 87 return chromeos::onc::ONC_SOURCE_NONE; | 87 return chromeos::onc::ONC_SOURCE_NONE; |
| 88 } | 88 } |
| 89 | 89 |
| 90 chromeos::MockNetworkLibrary network_library_; | 90 chromeos::MockNetworkLibrary network_library_; |
| 91 MockConfigurationPolicyProvider provider_; | 91 MockConfigurationPolicyProvider provider_; |
| 92 scoped_ptr<PolicyServiceImpl> policy_service_; | 92 scoped_ptr<PolicyServiceImpl> policy_service_; |
| 93 MessageLoop loop_; | 93 base::MessageLoop loop_; |
| 94 content::TestBrowserThread ui_thread_; | 94 content::TestBrowserThread ui_thread_; |
| 95 content::TestBrowserThread io_thread_; | 95 content::TestBrowserThread io_thread_; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 TEST_P(NetworkConfigurationUpdaterTest, InitialUpdates) { | 98 TEST_P(NetworkConfigurationUpdaterTest, InitialUpdates) { |
| 99 PolicyMap policy; | 99 PolicyMap policy; |
| 100 policy.Set(GetParam(), POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, | 100 policy.Set(GetParam(), POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
| 101 Value::CreateStringValue(kFakeONC)); | 101 Value::CreateStringValue(kFakeONC)); |
| 102 UpdateProviderPolicy(policy); | 102 UpdateProviderPolicy(policy); |
| 103 | 103 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 Mock::VerifyAndClearExpectations(&network_library_); | 236 Mock::VerifyAndClearExpectations(&network_library_); |
| 237 } | 237 } |
| 238 | 238 |
| 239 INSTANTIATE_TEST_CASE_P( | 239 INSTANTIATE_TEST_CASE_P( |
| 240 NetworkConfigurationUpdaterTestInstance, | 240 NetworkConfigurationUpdaterTestInstance, |
| 241 NetworkConfigurationUpdaterTest, | 241 NetworkConfigurationUpdaterTest, |
| 242 testing::Values(key::kDeviceOpenNetworkConfiguration, | 242 testing::Values(key::kDeviceOpenNetworkConfiguration, |
| 243 key::kOpenNetworkConfiguration)); | 243 key::kOpenNetworkConfiguration)); |
| 244 | 244 |
| 245 } // namespace policy | 245 } // namespace policy |
| OLD | NEW |