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

Unified Diff: chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc

Issue 6931018: Initial implementation of "Synced Bookmarks" folder. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixes for non-linux breakage on trybot Created 9 years, 8 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
Index: chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc
index 318f2467daf3464a2f5b5392e52e5ea8cc7e1747..11b06406d50079533369b084edde68cccced61f4 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc
@@ -71,6 +71,8 @@ class BookmarkEditorGtkTest : public testing::Test {
// oa
// OF1
// of1a
+ // synced node
+ // sa
void AddTestData() {
std::string test_base = base_path();
@@ -89,6 +91,10 @@ class BookmarkEditorGtkTest : public testing::Test {
const BookmarkNode* of1 =
model_->AddFolder(model_->other_node(), 1, ASCIIToUTF16("OF1"));
model_->AddURL(of1, 0, ASCIIToUTF16("of1a"), GURL(test_base + "of1a"));
+
+ // Children of the synced node.
+ model_->AddURL(model_->synced_node(), 0, ASCIIToUTF16("sa"),
+ GURL(test_base + "sa"));
}
};
@@ -106,6 +112,8 @@ TEST_F(BookmarkEditorGtkTest, ModelsMatch) {
GtkTreeIter bookmark_bar_node = toplevel;
ASSERT_TRUE(gtk_tree_model_iter_next(store, &toplevel));
GtkTreeIter other_node = toplevel;
+ ASSERT_TRUE(gtk_tree_model_iter_next(store, &toplevel));
+ GtkTreeIter synced_node = toplevel;
ASSERT_FALSE(gtk_tree_model_iter_next(store, &toplevel));
// The bookmark bar should have 2 nodes: folder F1 and F2.
@@ -130,6 +138,9 @@ TEST_F(BookmarkEditorGtkTest, ModelsMatch) {
ASSERT_TRUE(gtk_tree_model_iter_children(store, &child, &other_node));
ASSERT_EQ("OF1", UTF16ToUTF8(GetTitleFromTreeIter(store, &child)));
ASSERT_FALSE(gtk_tree_model_iter_next(store, &child));
+
+ // Synced node should have one child (sa).
+ ASSERT_EQ(0, gtk_tree_model_iter_n_children(store, &synced_node));
}
// Changes the title and makes sure parent/visual order doesn't change.

Powered by Google App Engine
This is Rietveld 408576698