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

Unified Diff: sync/test/fake_server/fake_server.h

Issue 1849563005: [Sync] Add cookie jar mismatch logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests again Created 4 years, 8 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
« no previous file with comments | « sync/sessions/sync_session_context.cc ('k') | sync/test/fake_server/fake_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/fake_server/fake_server.h
diff --git a/sync/test/fake_server/fake_server.h b/sync/test/fake_server/fake_server.h
index 21fb9635e63f3ad8e7a6ef3b2188fb39062acd9f..0f6e321ebb3228e4a001f7310b2f6276fab344c0 100644
--- a/sync/test/fake_server/fake_server.h
+++ b/sync/test/fake_server/fake_server.h
@@ -51,6 +51,12 @@ class FakeServer {
int* response_code,
std::string* response);
+ // Helpers for fetching the last Commit or GetUpdates messages, respectively.
+ // Returns true if the specified message existed, and false if no message has
+ // been received.
+ bool GetLastCommitMessage(sync_pb::ClientToServerMessage* message);
+ bool GetLastGetUpdatesMessage(sync_pb::ClientToServerMessage* message);
+
// Creates a DicionaryValue representation of all entities present in the
// server. The dictionary keys are the strings generated by ModelTypeToString
// and the values are ListValues containing StringValue versions of entity
@@ -246,6 +252,10 @@ class FakeServer {
// on every request. This is used to simulate a network failure on the client.
bool network_enabled_;
+ // The last received client to server messages.
+ sync_pb::ClientToServerMessage last_commit_message_;
+ sync_pb::ClientToServerMessage last_getupdates_message_;
+
// Used to verify that FakeServer is only used from one thread.
base::ThreadChecker thread_checker_;
« no previous file with comments | « sync/sessions/sync_session_context.cc ('k') | sync/test/fake_server/fake_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698