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

Unified Diff: chrome/browser/notifications/extension_welcome_notification_unittest.cc

Issue 151963002: Remove duplicated code from sync related unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename SyncChangeProcessorDelgate to SyncChangeProcessorDelgator. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/extension_welcome_notification_unittest.cc
diff --git a/chrome/browser/notifications/extension_welcome_notification_unittest.cc b/chrome/browser/notifications/extension_welcome_notification_unittest.cc
index 2998036264b18eb422b9a2c6042ffd3a4b24d6a8..3f31e8906d251dc8d4a7306b75216579d655df40 100644
--- a/chrome/browser/notifications/extension_welcome_notification_unittest.cc
+++ b/chrome/browser/notifications/extension_welcome_notification_unittest.cc
@@ -17,6 +17,7 @@
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/testing_profile.h"
#include "components/user_prefs/pref_registry_syncable.h"
+#include "sync/api/fake_sync_change_processor.h"
#include "sync/api/sync_error_factory_mock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/message_center/fake_message_center.h"
@@ -116,19 +117,6 @@ private:
base::Closure pending_task_;
};
-class TestSyncProcessor : public syncer::SyncChangeProcessor {
- virtual syncer::SyncError ProcessSyncChanges(
- const tracked_objects::Location& from_here,
- const syncer::SyncChangeList& change_list) OVERRIDE {
- return syncer::SyncError();
- }
-
- virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type)
- const OVERRIDE {
- return syncer::SyncDataList();
- }
-};
-
class ExtensionWelcomeNotificationTest : public testing::Test {
protected:
ExtensionWelcomeNotificationTest() {
@@ -158,12 +146,12 @@ class ExtensionWelcomeNotificationTest : public testing::Test {
void StartPreferenceSyncing() {
PrefServiceSyncable::FromProfile(profile_.get())
->GetSyncableService(syncer::PREFERENCES)
- ->MergeDataAndStartSyncing(
- syncer::PREFERENCES,
- syncer::SyncDataList(),
- scoped_ptr<syncer::SyncChangeProcessor>(new TestSyncProcessor),
- scoped_ptr<syncer::SyncErrorFactory>(
- new syncer::SyncErrorFactoryMock()));
+ ->MergeDataAndStartSyncing(syncer::PREFERENCES,
+ syncer::SyncDataList(),
+ scoped_ptr<syncer::SyncChangeProcessor>(
+ new syncer::FakeSyncChangeProcessor),
+ scoped_ptr<syncer::SyncErrorFactory>(
+ new syncer::SyncErrorFactoryMock()));
}
void ShowChromeNowNotification() {

Powered by Google App Engine
This is Rietveld 408576698