OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/sync_driver/sync_policy_handler.h" | 5 #include "components/sync/driver/sync_policy_handler.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "components/policy/core/common/policy_map.h" | 9 #include "components/policy/core/common/policy_map.h" |
10 #include "components/policy/core/common/policy_types.h" | 10 #include "components/policy/core/common/policy_types.h" |
11 #include "components/prefs/pref_value_map.h" | 11 #include "components/prefs/pref_value_map.h" |
12 #include "components/sync_driver/pref_names.h" | 12 #include "components/sync/driver/pref_names.h" |
13 #include "policy/policy_constants.h" | 13 #include "policy/policy_constants.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace sync_driver { | 16 namespace sync_driver { |
17 | 17 |
18 // Test cases for the Sync policy setting. | 18 // Test cases for the Sync policy setting. |
19 class SyncPolicyHandlerTest : public testing::Test {}; | 19 class SyncPolicyHandlerTest : public testing::Test {}; |
20 | 20 |
21 TEST_F(SyncPolicyHandlerTest, Default) { | 21 TEST_F(SyncPolicyHandlerTest, Default) { |
22 policy::PolicyMap policy; | 22 policy::PolicyMap policy; |
(...skipping 29 matching lines...) Expand all Loading... |
52 const base::Value* value = NULL; | 52 const base::Value* value = NULL; |
53 EXPECT_TRUE(prefs.GetValue(sync_driver::prefs::kSyncManaged, &value)); | 53 EXPECT_TRUE(prefs.GetValue(sync_driver::prefs::kSyncManaged, &value)); |
54 ASSERT_TRUE(value); | 54 ASSERT_TRUE(value); |
55 bool sync_managed = false; | 55 bool sync_managed = false; |
56 bool result = value->GetAsBoolean(&sync_managed); | 56 bool result = value->GetAsBoolean(&sync_managed); |
57 ASSERT_TRUE(result); | 57 ASSERT_TRUE(result); |
58 EXPECT_TRUE(sync_managed); | 58 EXPECT_TRUE(sync_managed); |
59 } | 59 } |
60 | 60 |
61 } // namespace sync_driver | 61 } // namespace sync_driver |
OLD | NEW |