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/async_policy_provider.h" | 5 #include "chrome/browser/policy/async_policy_provider.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/policy/async_policy_loader.h" | 9 #include "chrome/browser/policy/async_policy_loader.h" |
10 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 10 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
| 11 #include "chrome/browser/policy/policy_namespace.h" |
11 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
12 #include "content/public/test/test_browser_thread.h" | 13 #include "content/public/test/test_browser_thread.h" |
13 #include "policy/policy_constants.h" | 14 #include "policy/policy_constants.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 | 17 |
17 using testing::Mock; | 18 using testing::Mock; |
18 using testing::Return; | 19 using testing::Return; |
19 using testing::Sequence; | 20 using testing::Sequence; |
20 | 21 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(0); | 217 EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(0); |
217 provider_->Shutdown(); | 218 provider_->Shutdown(); |
218 loop_.RunUntilIdle(); | 219 loop_.RunUntilIdle(); |
219 Mock::VerifyAndClearExpectations(&observer); | 220 Mock::VerifyAndClearExpectations(&observer); |
220 | 221 |
221 provider_->RemoveObserver(&observer); | 222 provider_->RemoveObserver(&observer); |
222 provider_.reset(); | 223 provider_.reset(); |
223 } | 224 } |
224 | 225 |
225 } // namespace policy | 226 } // namespace policy |
OLD | NEW |