| 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_test_base.h" | 5 #include "chrome/browser/policy/asynchronous_policy_test_base.h" |
| 6 | 6 |
| 7 using content::BrowserThread; | 7 using content::BrowserThread; |
| 8 | 8 |
| 9 namespace policy { | 9 namespace policy { |
| 10 | 10 |
| 11 ProviderDelegateMock::ProviderDelegateMock() | 11 ProviderDelegateMock::ProviderDelegateMock() |
| 12 : AsynchronousPolicyProvider::Delegate() {} | 12 : AsynchronousPolicyProvider::Delegate() {} |
| 13 | 13 |
| 14 ProviderDelegateMock::~ProviderDelegateMock() {} | 14 ProviderDelegateMock::~ProviderDelegateMock() {} |
| 15 | 15 |
| 16 AsynchronousPolicyTestBase::AsynchronousPolicyTestBase() | 16 AsynchronousPolicyTestBase::AsynchronousPolicyTestBase() |
| 17 : ui_thread_(BrowserThread::UI, &loop_), | 17 : ui_thread_(BrowserThread::UI, &loop_), |
| 18 file_thread_(BrowserThread::FILE, &loop_) {} | 18 file_thread_(BrowserThread::FILE, &loop_) {} |
| 19 | 19 |
| 20 AsynchronousPolicyTestBase::~AsynchronousPolicyTestBase() {} | 20 AsynchronousPolicyTestBase::~AsynchronousPolicyTestBase() {} |
| 21 | 21 |
| 22 void AsynchronousPolicyTestBase::SetUp() { | |
| 23 delegate_.reset(new ProviderDelegateMock()); | |
| 24 } | |
| 25 | |
| 26 void AsynchronousPolicyTestBase::TearDown() { | 22 void AsynchronousPolicyTestBase::TearDown() { |
| 27 loop_.RunAllPending(); | 23 loop_.RunAllPending(); |
| 28 } | 24 } |
| 29 | 25 |
| 30 } // namespace policy | 26 } // namespace policy |
| OLD | NEW |