| OLD | NEW |
| 1 // Copyright (c) 2011 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/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/file_based_policy_provider.h" | 8 #include "chrome/browser/policy/file_based_policy_provider.h" |
| 9 #include "chrome/browser/policy/policy_map.h" |
| 9 #include "policy/policy_constants.h" | 10 #include "policy/policy_constants.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 13 |
| 13 using testing::_; | 14 using testing::_; |
| 14 using testing::InSequence; | 15 using testing::InSequence; |
| 15 using testing::Return; | 16 using testing::Return; |
| 16 | 17 |
| 17 namespace policy { | 18 namespace policy { |
| 18 | 19 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 EXPECT_CALL(*provider_delegate, Load()).WillOnce(Return(policies)); | 76 EXPECT_CALL(*provider_delegate, Load()).WillOnce(Return(policies)); |
| 76 file_based_provider.loader()->Reload(); | 77 file_based_provider.loader()->Reload(); |
| 77 loop_.RunAllPending(); | 78 loop_.RunAllPending(); |
| 78 PolicyMap policy_map; | 79 PolicyMap policy_map; |
| 79 file_based_provider.Provide(&policy_map); | 80 file_based_provider.Provide(&policy_map); |
| 80 EXPECT_TRUE(policy_map.Get(policy::kPolicySyncDisabled)); | 81 EXPECT_TRUE(policy_map.Get(policy::kPolicySyncDisabled)); |
| 81 EXPECT_EQ(1U, policy_map.size()); | 82 EXPECT_EQ(1U, policy_map.size()); |
| 82 } | 83 } |
| 83 | 84 |
| 84 } // namespace policy | 85 } // namespace policy |
| OLD | NEW |