| 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" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 AsyncPolicyProviderTest(); | 73 AsyncPolicyProviderTest(); |
| 74 virtual ~AsyncPolicyProviderTest(); | 74 virtual ~AsyncPolicyProviderTest(); |
| 75 | 75 |
| 76 virtual void SetUp() OVERRIDE; | 76 virtual void SetUp() OVERRIDE; |
| 77 virtual void TearDown() OVERRIDE; | 77 virtual void TearDown() OVERRIDE; |
| 78 | 78 |
| 79 PolicyBundle initial_bundle_; | 79 PolicyBundle initial_bundle_; |
| 80 MockPolicyLoader* loader_; | 80 MockPolicyLoader* loader_; |
| 81 scoped_ptr<AsyncPolicyProvider> provider_; | 81 scoped_ptr<AsyncPolicyProvider> provider_; |
| 82 | 82 |
| 83 MessageLoop loop_; | 83 base::MessageLoop loop_; |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 content::TestBrowserThread ui_thread_; | 86 content::TestBrowserThread ui_thread_; |
| 87 content::TestBrowserThread file_thread_; | 87 content::TestBrowserThread file_thread_; |
| 88 | 88 |
| 89 DISALLOW_COPY_AND_ASSIGN(AsyncPolicyProviderTest); | 89 DISALLOW_COPY_AND_ASSIGN(AsyncPolicyProviderTest); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 AsyncPolicyProviderTest::AsyncPolicyProviderTest() | 92 AsyncPolicyProviderTest::AsyncPolicyProviderTest() |
| 93 : ui_thread_(content::BrowserThread::UI, &loop_), | 93 : ui_thread_(content::BrowserThread::UI, &loop_), |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(0); | 216 EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(0); |
| 217 provider_->Shutdown(); | 217 provider_->Shutdown(); |
| 218 loop_.RunUntilIdle(); | 218 loop_.RunUntilIdle(); |
| 219 Mock::VerifyAndClearExpectations(&observer); | 219 Mock::VerifyAndClearExpectations(&observer); |
| 220 | 220 |
| 221 provider_->RemoveObserver(&observer); | 221 provider_->RemoveObserver(&observer); |
| 222 provider_.reset(); | 222 provider_.reset(); |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace policy | 225 } // namespace policy |
| OLD | NEW |