| Index: sync/engine/process_commit_response_command_unittest.cc
|
| diff --git a/sync/engine/process_commit_response_command_unittest.cc b/sync/engine/process_commit_response_command_unittest.cc
|
| index 482036d7b1815e9fc6b866b2dc2a9457f6879481..2545d9ff2084616f010758f3d06c321b8f1028c3 100644
|
| --- a/sync/engine/process_commit_response_command_unittest.cc
|
| +++ b/sync/engine/process_commit_response_command_unittest.cc
|
| @@ -28,6 +28,7 @@ using sync_pb::CommitResponse;
|
|
|
| namespace syncer {
|
|
|
| +using sessions::StatusController;
|
| using sessions::SyncSession;
|
| using syncable::BASE_VERSION;
|
| using syncable::Entry;
|
| @@ -378,6 +379,27 @@ TEST_F(ProcessCommitResponseCommandTest, NewFolderCommitKeepsChildOrder) {
|
| << "Too few or too many children in parent folder after commit.";
|
| }
|
|
|
| +TEST_F(ProcessCommitResponseCommandTest, BagOfChipsPersistence) {
|
| + sessions::OrderedCommitSet commit_set(session()->routing_info());
|
| + sync_pb::ClientToServerMessage request;
|
| + sync_pb::ClientToServerResponse* response = const_cast<StatusController&>(
|
| + session()->status_controller()).mutable_updates_response();
|
| +
|
| + sync_pb::ClientToServerResponse random_message;
|
| + random_message.set_error_message("hello");
|
| + random_message.set_store_birthday("world");
|
| + std::string serialized_message;
|
| + random_message.SerializeToString(&serialized_message);
|
| + // Bag Of Chips must be allowed to be extended by the server without the
|
| + // client noticing. Using a random message for it is a way to check that it is
|
| + // possible.
|
| + response->mutable_new_bag_of_chips()->ParseFromString(serialized_message);
|
| +
|
| + ProcessCommitResponseCommand command(commit_set, request, *response);
|
| + command.ExecuteImpl(session());
|
| + EXPECT_EQ(serialized_message, directory()->bag_of_chips());
|
| +}
|
| +
|
| // This test fixture runs across a Cartesian product of per-type fail/success
|
| // possibilities.
|
| enum {
|
|
|