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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return onc::ONC_SOURCE_NONE; 138 return onc::ONC_SOURCE_NONE;
139 } 139 }
140 140
141 scoped_ptr<base::ListValue> empty_network_configs_; 141 scoped_ptr<base::ListValue> empty_network_configs_;
142 scoped_ptr<base::ListValue> empty_certificates_; 142 scoped_ptr<base::ListValue> empty_certificates_;
143 scoped_ptr<base::ListValue> fake_network_configs_; 143 scoped_ptr<base::ListValue> fake_network_configs_;
144 scoped_ptr<base::ListValue> fake_certificates_; 144 scoped_ptr<base::ListValue> fake_certificates_;
145 StrictMock<chromeos::MockNetworkLibrary> network_library_; 145 StrictMock<chromeos::MockNetworkLibrary> network_library_;
146 StrictMock<MockConfigurationPolicyProvider> provider_; 146 StrictMock<MockConfigurationPolicyProvider> provider_;
147 scoped_ptr<PolicyServiceImpl> policy_service_; 147 scoped_ptr<PolicyServiceImpl> policy_service_;
148 MessageLoop loop_; 148 base::MessageLoop loop_;
149 content::TestBrowserThread ui_thread_; 149 content::TestBrowserThread ui_thread_;
150 content::TestBrowserThread io_thread_; 150 content::TestBrowserThread io_thread_;
151 }; 151 };
152 152
153 TEST_F(NetworkConfigurationUpdaterTest, PolicyIsValidatedAndRepaired) { 153 TEST_F(NetworkConfigurationUpdaterTest, PolicyIsValidatedAndRepaired) {
154 std::string onc_policy = 154 std::string onc_policy =
155 onc::test_utils::ReadTestData("toplevel_partially_invalid.onc"); 155 onc::test_utils::ReadTestData("toplevel_partially_invalid.onc");
156 156
157 scoped_ptr<base::DictionaryValue> onc_repaired = 157 scoped_ptr<base::DictionaryValue> onc_repaired =
158 onc::test_utils::ReadTestDictionary( 158 onc::test_utils::ReadTestDictionary(
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 UpdateProviderPolicy(policy); 387 UpdateProviderPolicy(policy);
388 } 388 }
389 389
390 INSTANTIATE_TEST_CASE_P( 390 INSTANTIATE_TEST_CASE_P(
391 NetworkConfigurationUpdaterTestWithParamInstance, 391 NetworkConfigurationUpdaterTestWithParamInstance,
392 NetworkConfigurationUpdaterTestWithParam, 392 NetworkConfigurationUpdaterTestWithParam,
393 testing::Values(key::kDeviceOpenNetworkConfiguration, 393 testing::Values(key::kDeviceOpenNetworkConfiguration,
394 key::kOpenNetworkConfiguration)); 394 key::kOpenNetworkConfiguration));
395 395
396 } // namespace policy 396 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698