OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/asynchronous_policy_loader.h" | 5 #include "chrome/browser/policy/asynchronous_policy_loader.h" |
6 #include "chrome/browser/policy/asynchronous_policy_test_base.h" | 6 #include "chrome/browser/policy/asynchronous_policy_test_base.h" |
7 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 7 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
8 #include "chrome/browser/policy/configuration_policy_store_interface.h" | 8 #include "chrome/browser/policy/configuration_policy_store_interface.h" |
9 #include "chrome/browser/policy/file_based_policy_provider.h" | 9 #include "chrome/browser/policy/file_based_policy_provider.h" |
| 10 #include "chrome/browser/policy/mock_configuration_policy_store.h" |
10 #include "policy/policy_constants.h" | 11 #include "policy/policy_constants.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 | 14 |
14 using testing::_; | 15 using testing::_; |
15 using testing::InSequence; | 16 using testing::InSequence; |
16 using testing::Return; | 17 using testing::Return; |
17 | 18 |
18 namespace policy { | 19 namespace policy { |
19 | 20 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 DictionaryValue* policies = new DictionaryValue(); | 73 DictionaryValue* policies = new DictionaryValue(); |
73 policies->SetBoolean(policy::key::kSyncDisabled, true); | 74 policies->SetBoolean(policy::key::kSyncDisabled, true); |
74 EXPECT_CALL(*provider_delegate, Load()).WillOnce(Return(policies)); | 75 EXPECT_CALL(*provider_delegate, Load()).WillOnce(Return(policies)); |
75 file_based_provider.loader()->Reload(); | 76 file_based_provider.loader()->Reload(); |
76 loop_.RunAllPending(); | 77 loop_.RunAllPending(); |
77 EXPECT_CALL(*store_, Apply(policy::kPolicySyncDisabled, _)).Times(1); | 78 EXPECT_CALL(*store_, Apply(policy::kPolicySyncDisabled, _)).Times(1); |
78 file_based_provider.Provide(store_.get()); | 79 file_based_provider.Provide(store_.get()); |
79 } | 80 } |
80 | 81 |
81 } // namespace policy | 82 } // namespace policy |
OLD | NEW |