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/policy/cloud_policy_provider.h" | 5 #include "chrome/browser/policy/cloud_policy_provider.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/policy/browser_policy_connector.h" | 9 #include "chrome/browser/policy/browser_policy_connector.h" |
10 #include "chrome/browser/policy/cloud_policy_cache_base.h" | 10 #include "chrome/browser/policy/cloud_policy_cache_base.h" |
11 #include "chrome/browser/policy/cloud_policy_provider.h" | |
12 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 11 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
13 #include "chrome/browser/policy/policy_bundle.h" | 12 #include "chrome/browser/policy/policy_bundle.h" |
14 #include "chrome/browser/policy/policy_map.h" | 13 #include "chrome/browser/policy/policy_map.h" |
15 #include "content/public/test/test_browser_thread.h" | |
16 #include "policy/policy_constants.h" | 14 #include "policy/policy_constants.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
19 | 17 |
20 using testing::Mock; | 18 using testing::Mock; |
21 | 19 |
22 namespace em = enterprise_management; | 20 namespace em = enterprise_management; |
23 | 21 |
24 namespace policy { | 22 namespace policy { |
25 | 23 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 base::DictionaryValue* proxy_settings = new base::DictionaryValue(); | 211 base::DictionaryValue* proxy_settings = new base::DictionaryValue(); |
214 proxy_settings->SetString(key::kProxyMode, "user mode"); | 212 proxy_settings->SetString(key::kProxyMode, "user mode"); |
215 expected_bundle.Get(POLICY_DOMAIN_CHROME, "") | 213 expected_bundle.Get(POLICY_DOMAIN_CHROME, "") |
216 .Set(key::kProxySettings, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, | 214 .Set(key::kProxySettings, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
217 proxy_settings); | 215 proxy_settings); |
218 EXPECT_TRUE(cloud_policy_provider_.policies().Equals(expected_bundle)); | 216 EXPECT_TRUE(cloud_policy_provider_.policies().Equals(expected_bundle)); |
219 } | 217 } |
220 #endif | 218 #endif |
221 | 219 |
222 } // namespace policy | 220 } // namespace policy |
OLD | NEW |