Index: chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc |
diff --git a/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc b/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc |
index d076ae9badeac88f8ee1c9b3845f6f633cc06b95..997c1cd0398a3ece2cf08d27668f3c1eb55b2037 100644 |
--- a/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc |
+++ b/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc |
@@ -17,6 +17,7 @@ |
#include "base/run_loop.h" |
#include "base/values.h" |
#include "chrome/browser/chrome_notification_types.h" |
+#include "chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.h" |
#include "chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_util.h" |
#include "chrome/browser/chromeos/policy/device_local_account.h" |
#include "chrome/browser/chromeos/policy/device_local_account_external_data_manager.h" |
@@ -140,6 +141,8 @@ class CloudExternalDataPolicyObserverTest |
chromeos::CrosSettings cros_settings_; |
scoped_ptr<DeviceLocalAccountPolicyService> |
device_local_account_policy_service_; |
+ scoped_ptr<AffiliatedInvalidationServiceProvider> |
+ affiliated_invalidation_service_provider_; |
net::TestURLFetcherFactory url_fetcher_factory_; |
scoped_ptr<DeviceLocalAccountPolicyProvider> |
@@ -177,16 +180,28 @@ CloudExternalDataPolicyObserverTest::~CloudExternalDataPolicyObserverTest() { |
void CloudExternalDataPolicyObserverTest::SetUp() { |
chromeos::DeviceSettingsTestBase::SetUp(); |
+ |
ASSERT_TRUE(profile_manager_.SetUp()); |
+ |
+ affiliated_invalidation_service_provider_.reset( |
+ new AffiliatedInvalidationServiceProvider); |
+ // Mark the |affiliated_invalidation_service_provider_| as shut down |
+ // immediately. This will prevent it from trying to find an available |
+ // invalidation service, which pulls in a lot of additional run-time |
+ // dependencies. |
+ affiliated_invalidation_service_provider_->Shutdown(); |
+ |
device_local_account_policy_service_.reset( |
- new DeviceLocalAccountPolicyService(&device_settings_test_helper_, |
- &device_settings_service_, |
- &cros_settings_, |
- base::MessageLoopProxy::current(), |
- base::MessageLoopProxy::current(), |
- base::MessageLoopProxy::current(), |
- base::MessageLoopProxy::current(), |
- NULL)); |
+ new DeviceLocalAccountPolicyService( |
+ &device_settings_test_helper_, |
+ &device_settings_service_, |
+ &cros_settings_, |
+ affiliated_invalidation_service_provider_.get(), |
+ base::MessageLoopProxy::current(), |
+ base::MessageLoopProxy::current(), |
+ base::MessageLoopProxy::current(), |
+ base::MessageLoopProxy::current(), |
+ NULL)); |
pneubeck (no reviews)
2015/01/30 14:23:58
nit: nullptr
bartfab (slow)
2015/02/03 18:31:05
Done.
|
url_fetcher_factory_.set_remove_fetcher_on_delete(true); |
EXPECT_CALL(user_policy_provider_, IsInitializationComplete(_)) |