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

Side by Side Diff: chrome/browser/policy/device_policy_cache_unittest.cc

Issue 7941008: Cosmetic cleanups in chrome/browser/policy/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload was broken? Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/policy/device_policy_cache.h" 5 #include "chrome/browser/policy/device_policy_cache.h"
6 6
7 #include "chrome/browser/chromeos/cros/cryptohome_library.h" 7 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
8 #include "chrome/browser/chromeos/login/mock_signed_settings_helper.h" 8 #include "chrome/browser/chromeos/login/mock_signed_settings_helper.h"
9 #include "chrome/browser/policy/cloud_policy_data_store.h" 9 #include "chrome/browser/policy/cloud_policy_data_store.h"
10 #include "chrome/browser/policy/enterprise_install_attributes.h" 10 #include "chrome/browser/policy/enterprise_install_attributes.h"
11 #include "policy/configuration_policy_type.h" 11 #include "policy/configuration_policy_type.h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace policy { 15 namespace policy {
16 16
17 namespace { 17 namespace {
18 18
19 // Test registration user name. 19 // Test registration user name.
20 const char kTestUser[] = "test@example.com"; 20 const char kTestUser[] = "test@example.com";
21 21
22 using ::chromeos::SignedSettings; 22 using ::chromeos::SignedSettings;
23 using ::chromeos::SignedSettingsHelper;
24 using ::testing::_; 23 using ::testing::_;
25 using ::testing::InSequence; 24 using ::testing::InSequence;
26 25
27 void CreateRefreshRatePolicy(em::PolicyFetchResponse* policy, 26 void CreateRefreshRatePolicy(em::PolicyFetchResponse* policy,
28 const std::string& user, 27 const std::string& user,
29 int refresh_rate) { 28 int refresh_rate) {
30 // This method omits a few fields which currently aren't needed by tests: 29 // This method omits a few fields which currently aren't needed by tests:
31 // timestamp, machine_name, policy_type, public key info. 30 // timestamp, machine_name, policy_type, public key info.
32 em::PolicyData signed_response; 31 em::PolicyData signed_response;
33 em::ChromeDeviceSettingsProto settings; 32 em::ChromeDeviceSettingsProto settings;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 GetRecommendedPolicy(kPolicyProxyMode))); 232 GetRecommendedPolicy(kPolicyProxyMode)));
234 EXPECT_TRUE(Value::Equals(&expected_proxy_server, 233 EXPECT_TRUE(Value::Equals(&expected_proxy_server,
235 GetRecommendedPolicy(kPolicyProxyServer))); 234 GetRecommendedPolicy(kPolicyProxyServer)));
236 EXPECT_TRUE(Value::Equals(&expected_proxy_pac_url, 235 EXPECT_TRUE(Value::Equals(&expected_proxy_pac_url,
237 GetRecommendedPolicy(kPolicyProxyPacUrl))); 236 GetRecommendedPolicy(kPolicyProxyPacUrl)));
238 EXPECT_TRUE(Value::Equals(&expected_proxy_bypass_list, 237 EXPECT_TRUE(Value::Equals(&expected_proxy_bypass_list,
239 GetRecommendedPolicy(kPolicyProxyBypassList))); 238 GetRecommendedPolicy(kPolicyProxyBypassList)));
240 } 239 }
241 240
242 } // namespace policy 241 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_policy_cache.cc ('k') | chrome/browser/policy/device_token_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698