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/chromeos/policy/configuration_policy_handler_chromeos.h
" | 5 #include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h
" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" | 15 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 #include "components/policy/core/browser/policy_error_map.h" | 17 #include "components/policy/core/browser/policy_error_map.h" |
18 #include "components/policy/core/common/external_data_fetcher.h" | 18 #include "components/policy/core/common/external_data_fetcher.h" |
19 #include "components/policy/core/common/policy_map.h" | 19 #include "components/policy/core/common/policy_map.h" |
20 #include "components/policy/core/common/policy_types.h" | 20 #include "components/policy/core/common/policy_types.h" |
21 #include "components/policy/core/common/schema.h" | 21 #include "components/policy/core/common/schema.h" |
| 22 #include "components/policy/policy_constants.h" |
22 #include "components/prefs/pref_value_map.h" | 23 #include "components/prefs/pref_value_map.h" |
23 #include "policy/policy_constants.h" | |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 | 25 |
26 namespace policy { | 26 namespace policy { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 // Test cases for the screen magnifier type policy setting. | 30 // Test cases for the screen magnifier type policy setting. |
31 class ScreenMagnifierPolicyHandlerTest : public testing::Test { | 31 class ScreenMagnifierPolicyHandlerTest : public testing::Test { |
32 protected: | 32 protected: |
33 PolicyMap policy_; | 33 PolicyMap policy_; |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, | 357 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, |
358 base::WrapUnique(new base::FundamentalValue(false)), nullptr); | 358 base::WrapUnique(new base::FundamentalValue(false)), nullptr); |
359 LoginScreenPowerManagementPolicyHandler handler(chrome_schema_); | 359 LoginScreenPowerManagementPolicyHandler handler(chrome_schema_); |
360 PolicyErrorMap errors; | 360 PolicyErrorMap errors; |
361 EXPECT_FALSE(handler.CheckPolicySettings(policy_map, &errors)); | 361 EXPECT_FALSE(handler.CheckPolicySettings(policy_map, &errors)); |
362 EXPECT_FALSE( | 362 EXPECT_FALSE( |
363 errors.GetErrors(key::kDeviceLoginScreenPowerManagement).empty()); | 363 errors.GetErrors(key::kDeviceLoginScreenPowerManagement).empty()); |
364 } | 364 } |
365 | 365 |
366 } // namespace policy | 366 } // namespace policy |
OLD | NEW |