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

Side by Side Diff: chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc

Issue 113813003: Cleanup the policy code after the recent moves into the component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | Annotate | Revision Log
OLDNEW
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 protected: 129 protected:
130 NetworkConfigurationUpdaterTest() { 130 NetworkConfigurationUpdaterTest() {
131 } 131 }
132 132
133 virtual void SetUp() OVERRIDE { 133 virtual void SetUp() OVERRIDE {
134 EXPECT_CALL(provider_, IsInitializationComplete(_)) 134 EXPECT_CALL(provider_, IsInitializationComplete(_))
135 .WillRepeatedly(Return(true)); 135 .WillRepeatedly(Return(true));
136 provider_.Init(); 136 provider_.Init();
137 PolicyServiceImpl::Providers providers; 137 PolicyServiceImpl::Providers providers;
138 providers.push_back(&provider_); 138 providers.push_back(&provider_);
139 policy_service_.reset(new PolicyServiceImpl( 139 policy_service_.reset(new PolicyServiceImpl(providers));
140 providers, PolicyServiceImpl::PreprocessCallback()));
141 140
142 scoped_ptr<base::DictionaryValue> fake_toplevel_onc = 141 scoped_ptr<base::DictionaryValue> fake_toplevel_onc =
143 chromeos::onc::ReadDictionaryFromJson(kFakeONC); 142 chromeos::onc::ReadDictionaryFromJson(kFakeONC);
144 143
145 base::ListValue* network_configs = NULL; 144 base::ListValue* network_configs = NULL;
146 fake_toplevel_onc->GetListWithoutPathExpansion( 145 fake_toplevel_onc->GetListWithoutPathExpansion(
147 onc::toplevel_config::kNetworkConfigurations, &network_configs); 146 onc::toplevel_config::kNetworkConfigurations, &network_configs);
148 AppendAll(*network_configs, &fake_network_configs_); 147 AppendAll(*network_configs, &fake_network_configs_);
149 148
150 base::DictionaryValue* global_config = NULL; 149 base::DictionaryValue* global_config = NULL;
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 policy.Erase(GetParam()); 463 policy.Erase(GetParam());
465 UpdateProviderPolicy(policy); 464 UpdateProviderPolicy(policy);
466 } 465 }
467 466
468 INSTANTIATE_TEST_CASE_P(NetworkConfigurationUpdaterTestWithParamInstance, 467 INSTANTIATE_TEST_CASE_P(NetworkConfigurationUpdaterTestWithParamInstance,
469 NetworkConfigurationUpdaterTestWithParam, 468 NetworkConfigurationUpdaterTestWithParam,
470 testing::Values(key::kDeviceOpenNetworkConfiguration, 469 testing::Values(key::kDeviceOpenNetworkConfiguration,
471 key::kOpenNetworkConfiguration)); 470 key::kOpenNetworkConfiguration));
472 471
473 } // namespace policy 472 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698