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

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

Issue 23129007: sync: Add GetAllSyncData to sync/api (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 7 years, 3 months 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"
(...skipping 19 matching lines...) Expand all
30 using testing::AnyNumber; 30 using testing::AnyNumber;
31 using testing::Return; 31 using testing::Return;
32 using testing::_; 32 using testing::_;
33 33
34 class TestSyncProcessorStub : public syncer::SyncChangeProcessor { 34 class TestSyncProcessorStub : public syncer::SyncChangeProcessor {
35 virtual syncer::SyncError ProcessSyncChanges( 35 virtual syncer::SyncError ProcessSyncChanges(
36 const tracked_objects::Location& from_here, 36 const tracked_objects::Location& from_here,
37 const syncer::SyncChangeList& change_list) OVERRIDE { 37 const syncer::SyncChangeList& change_list) OVERRIDE {
38 return syncer::SyncError(); 38 return syncer::SyncError();
39 } 39 }
40
41 virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const
42 OVERRIDE {
43 return syncer::SyncDataList();
44 }
40 }; 45 };
41 46
42 class SyncedPrefChangeRegistrarTest : public InProcessBrowserTest { 47 class SyncedPrefChangeRegistrarTest : public InProcessBrowserTest {
43 public: 48 public:
44 SyncedPrefChangeRegistrarTest() : next_sync_data_id_(0) {} 49 SyncedPrefChangeRegistrarTest() : next_sync_data_id_(0) {}
45 virtual ~SyncedPrefChangeRegistrarTest() {} 50 virtual ~SyncedPrefChangeRegistrarTest() {}
46 51
47 void UpdateChromePolicy(const policy::PolicyMap& policies) { 52 void UpdateChromePolicy(const policy::PolicyMap& policies) {
48 policy_provider_.UpdateChromePolicy(policies); 53 policy_provider_.UpdateChromePolicy(policies);
49 DCHECK(base::MessageLoop::current()); 54 DCHECK(base::MessageLoop::current());
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 policy::POLICY_SCOPE_USER, 212 policy::POLICY_SCOPE_USER,
208 base::Value::CreateBooleanValue(true), 213 base::Value::CreateBooleanValue(true),
209 NULL); 214 NULL);
210 UpdateChromePolicy(policies); 215 UpdateChromePolicy(policies);
211 216
212 EXPECT_TRUE(prefs()->IsManagedPreference(prefs::kShowHomeButton)); 217 EXPECT_TRUE(prefs()->IsManagedPreference(prefs::kShowHomeButton));
213 SetBooleanPrefValueFromSync(prefs::kShowHomeButton, false); 218 SetBooleanPrefValueFromSync(prefs::kShowHomeButton, false);
214 EXPECT_FALSE(observer.has_been_notified); 219 EXPECT_FALSE(observer.has_been_notified);
215 EXPECT_TRUE(GetBooleanPrefValue(prefs::kShowHomeButton)); 220 EXPECT_TRUE(GetBooleanPrefValue(prefs::kShowHomeButton));
216 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698