| Index: chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc
|
| diff --git a/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc b/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc
|
| index 3c443103430ca8c1f2a62173e5d5447d9a277f5b..b46718343def7215dd8b7e79a222b0dd7e6ed086 100644
|
| --- a/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc
|
| +++ b/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc
|
| @@ -13,9 +13,14 @@
|
| #include "chrome/common/pref_names.h"
|
| #include "chrome/test/base/in_process_browser_test.h"
|
| #include "chrome/test/base/testing_profile.h"
|
| +#include "components/policy/core/browser/browser_policy_connector.h"
|
| +#include "components/policy/core/common/mock_configuration_policy_provider.h"
|
| +#include "components/policy/core/common/policy_map.h"
|
| +#include "components/policy/core/common/policy_types.h"
|
| #include "components/syncable_prefs/synced_pref_change_registrar.h"
|
| #include "components/syncable_prefs/testing_pref_service_syncable.h"
|
| #include "content/public/test/test_utils.h"
|
| +#include "policy/policy_constants.h"
|
| #include "sync/api/attachments/attachment_id.h"
|
| #include "sync/api/fake_sync_change_processor.h"
|
| #include "sync/api/sync_change.h"
|
| @@ -25,14 +30,6 @@
|
| #include "sync/internal_api/public/attachments/attachment_service_proxy_for_test.h"
|
| #include "sync/protocol/sync.pb.h"
|
|
|
| -#if defined(ENABLE_CONFIGURATION_POLICY)
|
| -#include "components/policy/core/browser/browser_policy_connector.h"
|
| -#include "components/policy/core/common/mock_configuration_policy_provider.h"
|
| -#include "components/policy/core/common/policy_map.h"
|
| -#include "components/policy/core/common/policy_types.h"
|
| -#include "policy/policy_constants.h"
|
| -#endif
|
| -
|
| namespace {
|
|
|
| using testing::Return;
|
| @@ -43,14 +40,12 @@ class SyncedPrefChangeRegistrarTest : public InProcessBrowserTest {
|
| SyncedPrefChangeRegistrarTest() : next_sync_data_id_(0) {}
|
| ~SyncedPrefChangeRegistrarTest() override {}
|
|
|
| -#if defined(ENABLE_CONFIGURATION_POLICY)
|
| void UpdateChromePolicy(const policy::PolicyMap& policies) {
|
| policy_provider_.UpdateChromePolicy(policies);
|
| DCHECK(base::MessageLoop::current());
|
| base::RunLoop loop;
|
| loop.RunUntilIdle();
|
| }
|
| -#endif
|
|
|
| void SetBooleanPrefValueFromSync(const std::string& name, bool value) {
|
| std::string serialized_value;
|
| @@ -95,14 +90,12 @@ class SyncedPrefChangeRegistrarTest : public InProcessBrowserTest {
|
| }
|
|
|
| private:
|
| -#if defined(ENABLE_CONFIGURATION_POLICY)
|
| void SetUpInProcessBrowserTestFixture() override {
|
| EXPECT_CALL(policy_provider_, IsInitializationComplete(_))
|
| .WillRepeatedly(Return(true));
|
| policy::BrowserPolicyConnector::SetPolicyProviderForTesting(
|
| &policy_provider_);
|
| }
|
| -#endif
|
|
|
| void SetUpOnMainThread() override {
|
| prefs_ = PrefServiceSyncableFromProfile(browser()->profile());
|
| @@ -123,9 +116,7 @@ class SyncedPrefChangeRegistrarTest : public InProcessBrowserTest {
|
| int next_sync_data_id_;
|
|
|
| scoped_ptr<syncable_prefs::SyncedPrefChangeRegistrar> registrar_;
|
| -#if defined(ENABLE_CONFIGURATION_POLICY)
|
| policy::MockConfigurationPolicyProvider policy_provider_;
|
| -#endif
|
| };
|
|
|
| struct TestSyncedPrefObserver {
|
| @@ -181,7 +172,6 @@ IN_PROC_BROWSER_TEST_F(SyncedPrefChangeRegistrarTest,
|
| EXPECT_FALSE(observer.last_seen_value);
|
| }
|
|
|
| -#if defined(ENABLE_CONFIGURATION_POLICY)
|
| IN_PROC_BROWSER_TEST_F(SyncedPrefChangeRegistrarTest,
|
| IgnoreLocalChangesToManagedPrefs) {
|
| TestSyncedPrefObserver observer = {};
|
| @@ -224,4 +214,3 @@ IN_PROC_BROWSER_TEST_F(SyncedPrefChangeRegistrarTest,
|
| EXPECT_FALSE(observer.has_been_notified);
|
| EXPECT_TRUE(GetBooleanPrefValue(prefs::kShowHomeButton));
|
| }
|
| -#endif
|
|
|