summaryrefslogtreecommitdiffstats
path: root/chrome/browser/policy/asynchronous_policy_test_base.cc
blob: eadf41fa435214ba462ffb90f041fc8d2e2c11d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/policy/asynchronous_policy_test_base.h"

#include "chrome/browser/policy/mock_configuration_policy_store.h"

namespace policy {

ProviderDelegateMock::ProviderDelegateMock()
    : AsynchronousPolicyProvider::Delegate() {}

ProviderDelegateMock::~ProviderDelegateMock() {}

AsynchronousPolicyTestBase::AsynchronousPolicyTestBase()
    : ui_thread_(BrowserThread::UI, &loop_),
      file_thread_(BrowserThread::FILE, &loop_) {}

AsynchronousPolicyTestBase::~AsynchronousPolicyTestBase() {}

void AsynchronousPolicyTestBase::SetUp() {
  delegate_.reset(new ProviderDelegateMock());
  store_.reset(new MockConfigurationPolicyStore);
}

void AsynchronousPolicyTestBase::TearDown() {
  loop_.RunAllPending();
}

}  // namespace policy