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

Unified Diff: chrome/browser/sync/syncable/syncable_unittest.cc

Issue 8402014: [Sync] Make GetFirstChildId return a flag indicating success (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 2 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 | « chrome/browser/sync/syncable/syncable.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/syncable/syncable_unittest.cc
diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/chrome/browser/sync/syncable/syncable_unittest.cc
index 0950ada4462f45df1948981a423491f89ed14b8e..6ce650de9d7760706445d25049bd8a0f6a3f5696 100644
--- a/chrome/browser/sync/syncable/syncable_unittest.cc
+++ b/chrome/browser/sync/syncable/syncable_unittest.cc
@@ -228,7 +228,9 @@ TEST_F(SyncableGeneralTest, ChildrenOps) {
ASSERT_FALSE(e.good()); // Hasn't been written yet.
EXPECT_FALSE(dir.HasChildren(&rtrans, rtrans.root_id()));
- EXPECT_TRUE(dir.GetFirstChildId(&rtrans, rtrans.root_id()).IsRoot());
+ Id child_id;
+ EXPECT_TRUE(dir.GetFirstChildId(&rtrans, rtrans.root_id(), &child_id));
+ EXPECT_TRUE(child_id.IsRoot());
}
{
@@ -250,7 +252,9 @@ TEST_F(SyncableGeneralTest, ChildrenOps) {
ASSERT_TRUE(child.good());
EXPECT_TRUE(dir.HasChildren(&rtrans, rtrans.root_id()));
- EXPECT_EQ(e.Get(ID), dir.GetFirstChildId(&rtrans, rtrans.root_id()));
+ Id child_id;
+ EXPECT_TRUE(dir.GetFirstChildId(&rtrans, rtrans.root_id(), &child_id));
+ EXPECT_EQ(e.Get(ID), child_id);
}
{
@@ -267,7 +271,9 @@ TEST_F(SyncableGeneralTest, ChildrenOps) {
ASSERT_TRUE(e.good());
EXPECT_FALSE(dir.HasChildren(&rtrans, rtrans.root_id()));
- EXPECT_TRUE(dir.GetFirstChildId(&rtrans, rtrans.root_id()).IsRoot());
+ Id child_id;
+ EXPECT_TRUE(dir.GetFirstChildId(&rtrans, rtrans.root_id(), &child_id));
+ EXPECT_TRUE(child_id.IsRoot());
}
dir.SaveChanges();
« no previous file with comments | « chrome/browser/sync/syncable/syncable.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698