OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |