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

Unified Diff: sync/syncable/parent_child_index_unittest.cc

Issue 1008993004: Sync: Handle empty (implicit) ParentId in GetPredecessorId and GetSuccessorId (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added extra unit test. Created 5 years, 9 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
« no previous file with comments | « sync/syncable/parent_child_index.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/parent_child_index_unittest.cc
diff --git a/sync/syncable/parent_child_index_unittest.cc b/sync/syncable/parent_child_index_unittest.cc
index 2519aab7d4edb2ed80ecd55063d72b8fdb9ffd90..6362242f2481c9a933c6da01d3817fc7327d9b41 100644
--- a/sync/syncable/parent_child_index_unittest.cc
+++ b/sync/syncable/parent_child_index_unittest.cc
@@ -389,10 +389,13 @@ TEST_F(ParentChildIndexTest, NodesWithImplicitParentId) {
EXPECT_TRUE(index_.Contains(p2));
// Items should appear under the type root
- const OrderedChildSet* children = index_.GetChildren(type_root_id);
+ const OrderedChildSet* children = index_.GetChildren(type_root);
ASSERT_TRUE(children);
EXPECT_EQ(2UL, children->size());
+ EXPECT_EQ(2UL, index_.GetSiblings(p1)->size());
+ EXPECT_EQ(2UL, index_.GetSiblings(p2)->size());
+
index_.Remove(p1);
EXPECT_FALSE(index_.Contains(p1));
@@ -404,7 +407,7 @@ TEST_F(ParentChildIndexTest, NodesWithImplicitParentId) {
index_.Remove(p2);
EXPECT_FALSE(index_.Contains(p2));
- children = index_.GetChildren(type_root_id);
+ children = index_.GetChildren(type_root);
ASSERT_EQ(nullptr, children);
index_.Remove(type_root);
« no previous file with comments | « sync/syncable/parent_child_index.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698