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

Unified Diff: components/sync/test/engine/mock_connection_manager.cc

Issue 2916133002: [Sync] Support commit only types. (Closed)
Patch Set: Added more checks to syncer unittest. Created 3 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
Index: components/sync/test/engine/mock_connection_manager.cc
diff --git a/components/sync/test/engine/mock_connection_manager.cc b/components/sync/test/engine/mock_connection_manager.cc
index 79b5b3a05f529f8a92a9a2fa52ace69203e72c7a..1495364ad29aa95fcb23da5819c905195dde06da 100644
--- a/components/sync/test/engine/mock_connection_manager.cc
+++ b/components/sync/test/engine/mock_connection_manager.cc
@@ -548,9 +548,12 @@ void MockConnectionManager::ProcessGetUpdates(
std::string token = response->get_updates().new_progress_marker(0).token();
response->mutable_get_updates()->clear_new_progress_marker();
for (int i = 0; i < gu.from_progress_marker_size(); ++i) {
+ int data_type_id = gu.from_progress_marker(i).data_type_id();
Patrick Noland 2017/06/01 21:34:40 any reason not to just inline this into the EXPECT
skym 2017/06/01 22:43:20 Cause it gets used down below on line 556!
+ EXPECT_TRUE(expected_filter_.Has(
+ GetModelTypeFromSpecificsFieldNumber(data_type_id)));
sync_pb::DataTypeProgressMarker* new_marker =
response->mutable_get_updates()->add_new_progress_marker();
- new_marker->set_data_type_id(gu.from_progress_marker(i).data_type_id());
+ new_marker->set_data_type_id(data_type_id);
new_marker->set_token(token);
}

Powered by Google App Engine
This is Rietveld 408576698