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

Unified Diff: chrome/browser/bookmarks/bookmark_model_unittest.cc

Issue 8828006: Makes all permanent nodes share the same node class so that visibility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More tweaks Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/bookmarks/bookmark_model_unittest.cc
diff --git a/chrome/browser/bookmarks/bookmark_model_unittest.cc b/chrome/browser/bookmarks/bookmark_model_unittest.cc
index b3bfb52d0513423743b0d49f5bceb1e531370267..2e05a2bd12f91981f0533b17f931a021d68989bf 100644
--- a/chrome/browser/bookmarks/bookmark_model_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_model_unittest.cc
@@ -1087,12 +1087,23 @@ TEST_F(BookmarkModelTest, NodeVisibility) {
// Mobile node invisible by default
EXPECT_FALSE(model_.mobile_node()->IsVisible());
+ // Change visibility of permanent nodes.
+ model_.SetPermanentNodeVisible(BookmarkNode::BOOKMARK_BAR, false);
+ EXPECT_FALSE(model_.bookmark_bar_node()->IsVisible());
+ model_.SetPermanentNodeVisible(BookmarkNode::OTHER_NODE, false);
+ EXPECT_FALSE(model_.other_node()->IsVisible());
+ model_.SetPermanentNodeVisible(BookmarkNode::MOBILE, true);
+ EXPECT_TRUE(model_.mobile_node()->IsVisible());
+
// Arbitrary node should be visible
TestNode bbn;
PopulateNodeFromString("B", &bbn);
const BookmarkNode* parent = model_.bookmark_bar_node();
PopulateBookmarkNode(&bbn, &model_, parent);
EXPECT_TRUE(parent->GetChild(0)->IsVisible());
+
+ // Bookmark bar should be visible now that it has a child.
+ EXPECT_TRUE(model_.bookmark_bar_node()->IsVisible());
}
TEST_F(BookmarkModelTest, MobileNodeVisibileWithChildren) {

Powered by Google App Engine
This is Rietveld 408576698