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

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: Add integration test Created 4 years, 9 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: 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..eaca1161e1d00c8072dcd103bc4ab4efcba360ac 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.
maxbogue 2016/04/01 22:30:48 s/Getupdates/GetUpdates
Nicolas Zea 2016/04/04 19:57:31 Done.
+ // 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_;

Powered by Google App Engine
This is Rietveld 408576698