OLD | NEW |
1 // Copyright (c) 2010 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_management_policy_cache.h" | 5 #include "chrome/browser/policy/cloud_policy_cache.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/scoped_temp_dir.h" | 12 #include "base/scoped_temp_dir.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/browser_thread.h" | 14 #include "chrome/browser/browser_thread.h" |
15 #include "chrome/browser/policy/proto/device_management_constants.h" | 15 #include "chrome/browser/policy/proto/device_management_constants.h" |
16 #include "chrome/browser/policy/proto/device_management_local.pb.h" | 16 #include "chrome/browser/policy/proto/device_management_local.pb.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
| 19 #if 0 |
| 20 |
19 namespace policy { | 21 namespace policy { |
20 | 22 |
21 // Wraps base functionaly for the test cases. | 23 // Wraps base functionaly for the test cases. |
22 class DeviceManagementPolicyCacheTestBase : public testing::Test { | 24 class DeviceManagementPolicyCacheTestBase : public testing::Test { |
23 protected: | 25 protected: |
24 // Add a string policy setting to a policy response message. | 26 // Add a string policy setting to a policy response message. |
25 void AddStringPolicy(em::DevicePolicyResponse* policy, | 27 void AddStringPolicy(em::DevicePolicyResponse* policy, |
26 const std::string& name, | 28 const std::string& name, |
27 const std::string& value) { | 29 const std::string& value) { |
28 em::DevicePolicySetting* setting = policy->add_setting(); | 30 em::DevicePolicySetting* setting = policy->add_setting(); |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 em::DevicePolicyResponse policy; | 314 em::DevicePolicyResponse policy; |
313 AddStringPolicy(&policy, "HomepageLocation", "http://www.example.com"); | 315 AddStringPolicy(&policy, "HomepageLocation", "http://www.example.com"); |
314 scoped_ptr<Value> decoded(DeviceManagementPolicyCache::DecodePolicy(policy)); | 316 scoped_ptr<Value> decoded(DeviceManagementPolicyCache::DecodePolicy(policy)); |
315 DictionaryValue expected; | 317 DictionaryValue expected; |
316 expected.Set("HomepageLocation", | 318 expected.Set("HomepageLocation", |
317 Value::CreateStringValue("http://www.example.com")); | 319 Value::CreateStringValue("http://www.example.com")); |
318 EXPECT_TRUE(expected.Equals(decoded.get())); | 320 EXPECT_TRUE(expected.Equals(decoded.get())); |
319 } | 321 } |
320 | 322 |
321 } // namespace policy | 323 } // namespace policy |
| 324 |
| 325 #endif |
OLD | NEW |