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

Unified Diff: sync/test/engine/syncer_command_test.h

Issue 14963002: sync: Report GetUpdate triggers to the server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes Created 7 years, 7 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
« sync/sessions/sync_session.h ('K') | « sync/test/engine/fake_sync_scheduler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/engine/syncer_command_test.h
diff --git a/sync/test/engine/syncer_command_test.h b/sync/test/engine/syncer_command_test.h
index fa51d8221d2169fc9cfbaa31e6052e1e128d821d..0157637b687b0d5fb995f6cad53c4fbabfb090b2 100644
--- a/sync/test/engine/syncer_command_test.h
+++ b/sync/test/engine/syncer_command_test.h
@@ -68,6 +68,9 @@ class SyncerCommandTestBase : public testing::Test,
const base::TimeDelta& new_delay) OVERRIDE {
FAIL() << "Should not get sessions commit delay.";
}
+ virtual void OnReceivedClientInvalidationHintBufferSize(int size) OVERRIDE {
+ FAIL() << "Should not get hint buffer size.";
+ }
virtual void OnShouldStopSyncingPermanently() OVERRIDE {
FAIL() << "Shouldn't be called.";
}
@@ -107,9 +110,16 @@ class SyncerCommandTestBase : public testing::Test,
// Create a session with the provided source.
sessions::SyncSession* session(const sessions::SyncSourceInfo& source) {
- if (!session_) {
+ // These sources require a valid nudge tracker.
+ DCHECK_NE(sync_pb::GetUpdatesCallerInfo::LOCAL, source.updates_source);
+ DCHECK_NE(sync_pb::GetUpdatesCallerInfo::NOTIFICATION,
+ source.updates_source);
+ DCHECK_NE(sync_pb::GetUpdatesCallerInfo::DATATYPE_REFRESH,
+ source.updates_source);
+ if (!session_.get()) {
std::vector<ModelSafeWorker*> workers = GetWorkers();
- session_.reset(new sessions::SyncSession(context(), delegate(), source));
+ session_.reset(
+ sessions::SyncSession::Build(context(), delegate(), source));
}
return session_.get();
}
« sync/sessions/sync_session.h ('K') | « sync/test/engine/fake_sync_scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698