Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc

Issue 78763002: Move PolicyMap and its dependencies to components/policy/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export nested struct Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 6
7 #include "base/json/json_string_value_serializer.h" 7 #include "base/json/json_string_value_serializer.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/prefs/synced_pref_change_registrar.h" 11 #include "chrome/browser/prefs/synced_pref_change_registrar.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "chrome/test/base/in_process_browser_test.h" 14 #include "chrome/test/base/in_process_browser_test.h"
15 #include "chrome/test/base/testing_pref_service_syncable.h" 15 #include "chrome/test/base/testing_pref_service_syncable.h"
16 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
17 #include "content/public/test/test_utils.h" 17 #include "content/public/test/test_utils.h"
18 #include "sync/api/sync_change.h" 18 #include "sync/api/sync_change.h"
19 #include "sync/api/sync_error_factory.h" 19 #include "sync/api/sync_error_factory.h"
20 #include "sync/api/sync_error_factory_mock.h" 20 #include "sync/api/sync_error_factory_mock.h"
21 #include "sync/api/syncable_service.h" 21 #include "sync/api/syncable_service.h"
22 #include "sync/protocol/sync.pb.h" 22 #include "sync/protocol/sync.pb.h"
23 23
24 #if defined(ENABLE_CONFIGURATION_POLICY) 24 #if defined(ENABLE_CONFIGURATION_POLICY)
25 #include "chrome/browser/policy/browser_policy_connector.h" 25 #include "chrome/browser/policy/browser_policy_connector.h"
26 #include "chrome/browser/policy/mock_configuration_policy_provider.h" 26 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
27 #include "chrome/browser/policy/policy_map.h" 27 #include "components/policy/core/common/policy_map.h"
28 #include "policy/policy_constants.h" 28 #include "policy/policy_constants.h"
29 #endif 29 #endif
30 30
31 namespace { 31 namespace {
32 32
33 using testing::Return; 33 using testing::Return;
34 using testing::_; 34 using testing::_;
35 35
36 class TestSyncProcessorStub : public syncer::SyncChangeProcessor { 36 class TestSyncProcessorStub : public syncer::SyncChangeProcessor {
37 virtual syncer::SyncError ProcessSyncChanges( 37 virtual syncer::SyncError ProcessSyncChanges(
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 base::Value::CreateBooleanValue(true), 221 base::Value::CreateBooleanValue(true),
222 NULL); 222 NULL);
223 UpdateChromePolicy(policies); 223 UpdateChromePolicy(policies);
224 224
225 EXPECT_TRUE(prefs()->IsManagedPreference(prefs::kShowHomeButton)); 225 EXPECT_TRUE(prefs()->IsManagedPreference(prefs::kShowHomeButton));
226 SetBooleanPrefValueFromSync(prefs::kShowHomeButton, false); 226 SetBooleanPrefValueFromSync(prefs::kShowHomeButton, false);
227 EXPECT_FALSE(observer.has_been_notified); 227 EXPECT_FALSE(observer.has_been_notified);
228 EXPECT_TRUE(GetBooleanPrefValue(prefs::kShowHomeButton)); 228 EXPECT_TRUE(GetBooleanPrefValue(prefs::kShowHomeButton));
229 } 229 }
230 #endif 230 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698