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

Side by Side Diff: chrome/browser/sync/profile_sync_service_bookmark_unittest.cc

Issue 11533008: Use delete journal to remove bookmarks that are already deleted in sync model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // TODO(akalin): This file is basically just a unit test for 5 // TODO(akalin): This file is basically just a unit test for
6 // BookmarkChangeProcessor. Write unit tests for 6 // BookmarkChangeProcessor. Write unit tests for
7 // BookmarkModelAssociator separately. 7 // BookmarkModelAssociator separately.
8 8
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 EXPECT_EQ(initial_versions[model_->root_node()->id()] + 2, 1743 EXPECT_EQ(initial_versions[model_->root_node()->id()] + 2,
1744 new_versions[model_->root_node()->id()]); 1744 new_versions[model_->root_node()->id()]);
1745 EXPECT_EQ(initial_versions[changed_bookmark->id()] + 1, 1745 EXPECT_EQ(initial_versions[changed_bookmark->id()] + 1,
1746 new_versions[changed_bookmark->id()]); 1746 new_versions[changed_bookmark->id()]);
1747 initial_versions.erase(changed_bookmark->id()); 1747 initial_versions.erase(changed_bookmark->id());
1748 ExpectTransactionVersionMatch(model_->bookmark_bar_node(), initial_versions); 1748 ExpectTransactionVersionMatch(model_->bookmark_bar_node(), initial_versions);
1749 ExpectTransactionVersionMatch(model_->other_node(), initial_versions); 1749 ExpectTransactionVersionMatch(model_->other_node(), initial_versions);
1750 ExpectTransactionVersionMatch(model_->mobile_node(), initial_versions); 1750 ExpectTransactionVersionMatch(model_->mobile_node(), initial_versions);
1751 } 1751 }
1752 1752
1753 TEST_F(ProfileSyncServiceBookmarkTestWithData, ApplySyncDeletesFromJournal) {
1754 LoadBookmarkModel(DELETE_EXISTING_STORAGE, DONT_SAVE_TO_STORAGE);
1755 StartSync();
1756 WriteTestDataToBookmarkModel();
1757 MessageLoop::current()->RunUntilIdle();
1758
1759
1760 }
1761
1753 } // namespace 1762 } // namespace
1754 1763
1755 } // namespace browser_sync 1764 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698