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

Unified Diff: chrome/browser/sync/engine/download_updates_command_unittest.cc

Issue 6104003: sync: use progress markers instead of timestamps during GetUpdates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tim's fixes Created 9 years, 11 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: chrome/browser/sync/engine/download_updates_command_unittest.cc
diff --git a/chrome/browser/sync/engine/download_updates_command_unittest.cc b/chrome/browser/sync/engine/download_updates_command_unittest.cc
index 8df602c4403e008360ae7ae8f0342d6e056ed4dc..5eb010c526865cf3c74a210629c2967af01f1f8d 100644
--- a/chrome/browser/sync/engine/download_updates_command_unittest.cc
+++ b/chrome/browser/sync/engine/download_updates_command_unittest.cc
@@ -87,50 +87,4 @@ TEST_F(DownloadUpdatesCommandTest, SetRequestedTypes) {
}
}
-TEST_F(DownloadUpdatesCommandTest, OldestTimestampPicked) {
- syncable::ScopedDirLookup dir(syncdb()->manager(), syncdb()->name());
- ASSERT_TRUE(dir.good());
-
- // i,j,k range over every possible model type. j and k are enabled and at
- // the same timestamp. if i != j or k, i is enabled but at an older
- // timestamp.
- for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) {
- syncable::ModelType type_i = syncable::ModelTypeFromInt(i);
- for (int j = FIRST_REAL_MODEL_TYPE; j < MODEL_TYPE_COUNT; ++j) {
- syncable::ModelType type_j = syncable::ModelTypeFromInt(j);
- for (int k = FIRST_REAL_MODEL_TYPE; k < MODEL_TYPE_COUNT; ++k) {
- syncable::ModelType type_k = syncable::ModelTypeFromInt(k);
- SCOPED_TRACE(testing::Message() << "Iteration (" << i << "," << j
- << "," << k << ")");
- mutable_routing_info()->clear();
- (*mutable_routing_info())[type_i] = browser_sync::GROUP_UI;
- (*mutable_routing_info())[type_j] = browser_sync::GROUP_DB;
- (*mutable_routing_info())[type_k] = browser_sync::GROUP_UI;
- dir->set_last_download_timestamp(type_i, 5000 + j);
- dir->set_last_download_timestamp(type_j, 1000 + i);
- dir->set_last_download_timestamp(type_k, 1000 + i);
-
- ConfigureMockServerConnection();
- dir->set_store_birthday(mock_server()->store_birthday());
-
- syncable::ModelTypeBitSet expected_request_types;
- expected_request_types[j] = true;
- expected_request_types[k] = true;
- mock_server()->ExpectGetUpdatesRequestTypes(expected_request_types);
-
- command_.Execute(session());
-
- const sync_pb::ClientToServerMessage& r = mock_server()->last_request();
- EXPECT_EQ(1, mock_server()->GetAndClearNumGetUpdatesRequests());
- EXPECT_TRUE(r.has_get_updates());
- EXPECT_TRUE(r.get_updates().has_from_timestamp());
- EXPECT_EQ(1000 + i, r.get_updates().from_timestamp());
- EXPECT_TRUE(r.get_updates().has_fetch_folders());
- EXPECT_TRUE(r.get_updates().fetch_folders());
- EXPECT_TRUE(r.get_updates().has_requested_types());
- }
- }
- }
-}
-
} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/engine/download_updates_command.cc ('k') | chrome/browser/sync/engine/store_timestamps_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698