| Index: chrome/browser/policy/device_policy_cache_unittest.cc
|
| diff --git a/chrome/browser/policy/device_policy_cache_unittest.cc b/chrome/browser/policy/device_policy_cache_unittest.cc
|
| index 675af19539437d7a296bd87da616c9237928349b..f28b99e5284e2d87b6a57ad7413b03c7b0c9b638 100644
|
| --- a/chrome/browser/policy/device_policy_cache_unittest.cc
|
| +++ b/chrome/browser/policy/device_policy_cache_unittest.cc
|
| @@ -8,6 +8,7 @@
|
| #include "chrome/browser/chromeos/login/mock_signed_settings_helper.h"
|
| #include "chrome/browser/policy/cloud_policy_data_store.h"
|
| #include "chrome/browser/policy/enterprise_install_attributes.h"
|
| +#include "content/test/test_browser_thread.h"
|
| #include "policy/configuration_policy_type.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -70,7 +71,10 @@ class DevicePolicyCacheTest : public testing::Test {
|
| protected:
|
| DevicePolicyCacheTest()
|
| : cryptohome_(chromeos::CryptohomeLibrary::GetImpl(true)),
|
| - install_attributes_(cryptohome_.get()) {}
|
| + install_attributes_(cryptohome_.get()),
|
| + message_loop_(MessageLoop::TYPE_UI),
|
| + ui_thread_(content::BrowserThread::UI, &message_loop_),
|
| + file_thread_(content::BrowserThread::FILE, &message_loop_) {}
|
|
|
| virtual void SetUp() {
|
| data_store_.reset(CloudPolicyDataStore::CreateForUserPolicies());
|
| @@ -80,7 +84,6 @@ class DevicePolicyCacheTest : public testing::Test {
|
| }
|
|
|
| virtual void TearDown() {
|
| - EXPECT_CALL(signed_settings_helper_, CancelCallback(_));
|
| cache_.reset();
|
| }
|
|
|
| @@ -103,6 +106,10 @@ class DevicePolicyCacheTest : public testing::Test {
|
| chromeos::MockSignedSettingsHelper signed_settings_helper_;
|
| scoped_ptr<DevicePolicyCache> cache_;
|
|
|
| + MessageLoop message_loop_;
|
| + content::TestBrowserThread ui_thread_;
|
| + content::TestBrowserThread file_thread_;
|
| +
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(DevicePolicyCacheTest);
|
| };
|
| @@ -147,7 +154,6 @@ TEST_F(DevicePolicyCacheTest, SetPolicy) {
|
| EXPECT_CALL(signed_settings_helper_, StartRetrievePolicyOp(_)).WillOnce(
|
| MockSignedSettingsHelperRetrievePolicy(SignedSettings::SUCCESS,
|
| new_policy));
|
| - EXPECT_CALL(signed_settings_helper_, CancelCallback(_));
|
| cache_->SetPolicy(new_policy);
|
| testing::Mock::VerifyAndClearExpectations(&signed_settings_helper_);
|
| base::FundamentalValue updated_expected(300);
|
|
|