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

Side by Side Diff: sync/engine/syncer_unittest.cc

Issue 805633004: Enable Null Syncable ID which is different than Root ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback Created 5 years, 12 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 unified diff | Download patch
« no previous file with comments | « sync/engine/get_commit_ids.cc ('k') | sync/engine/syncer_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Syncer unit tests. Unfortunately a lot of these tests 5 // Syncer unit tests. Unfortunately a lot of these tests
6 // are outdated and need to be reworked and updated. 6 // are outdated and need to be reworked and updated.
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <limits> 9 #include <limits>
10 #include <list> 10 #include <list>
(...skipping 4661 matching lines...) Expand 10 before | Expand all | Expand 10 after
4672 TEST_F(SyncerBookmarksTest, LocalDeleteRemoteChangeConflict) { 4672 TEST_F(SyncerBookmarksTest, LocalDeleteRemoteChangeConflict) {
4673 Create(); 4673 Create();
4674 ExpectUnsyncedCreation(); 4674 ExpectUnsyncedCreation();
4675 SyncShareNudge(); 4675 SyncShareNudge();
4676 ExpectSyncedAndCreated(); 4676 ExpectSyncedAndCreated();
4677 Delete(); 4677 Delete();
4678 ExpectUnsyncedDeletion(); 4678 ExpectUnsyncedDeletion();
4679 4679
4680 // Trigger a getupdates that modifies the bookmark. The update should be 4680 // Trigger a getupdates that modifies the bookmark. The update should be
4681 // clobbered by the local delete. 4681 // clobbered by the local delete.
4682 mock_server_->AddUpdateBookmark(GetServerId(), Id(), "dummy", 10, 10, 4682 mock_server_->AddUpdateBookmark(GetServerId(), Id::GetRoot(), "dummy", 10, 10,
4683 local_cache_guid(), local_id_.GetServerId()); 4683 local_cache_guid(), local_id_.GetServerId());
4684 4684
4685 SyncShareNudge(); 4685 SyncShareNudge();
4686 ExpectSyncedAndDeleted(); 4686 ExpectSyncedAndDeleted();
4687 } 4687 }
4688 4688
4689 TEST_F(SyncerBookmarksTest, CreateThenDeleteDuringCommit) { 4689 TEST_F(SyncerBookmarksTest, CreateThenDeleteDuringCommit) {
4690 Create(); 4690 Create();
4691 ExpectUnsyncedCreation(); 4691 ExpectUnsyncedCreation();
4692 4692
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
5284 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); 5284 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id);
5285 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); 5285 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count);
5286 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); 5286 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count);
5287 } else { 5287 } else {
5288 EXPECT_TRUE(final_monitor_records.empty()) 5288 EXPECT_TRUE(final_monitor_records.empty())
5289 << "Should not restore records after successful bookmark commit."; 5289 << "Should not restore records after successful bookmark commit.";
5290 } 5290 }
5291 } 5291 }
5292 5292
5293 } // namespace syncer 5293 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/get_commit_ids.cc ('k') | sync/engine/syncer_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698