Index: chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc |
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc |
index 042dc1240ee6c52364cd62eaaefe730abb967175..16536faf3c51f1346d68b07cdf9d7bb633fe7f3c 100644 |
--- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc |
+++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc |
@@ -4,12 +4,14 @@ |
#include <string> |
+#include "base/command_line.h" |
#include "base/message_loop.h" |
#include "base/string_util.h" |
#include "base/utf_string_conversions.h" |
#include "chrome/browser/bookmarks/bookmark_model.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/views/bookmarks/bookmark_editor_view.h" |
+#include "chrome/common/chrome_switches.h" |
#include "chrome/test/testing_profile.h" |
#include "content/browser/browser_thread.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -132,9 +134,14 @@ TEST_F(BookmarkEditorViewTest, ModelsMatch) { |
CreateEditor(profile_.get(), NULL, BookmarkEditor::EditDetails(), |
BookmarkEditorView::SHOW_TREE); |
BookmarkEditorView::EditorNode* editor_root = editor_tree_model()->GetRoot(); |
- // The root should have two children, one for the bookmark bar node, |
- // the other for the 'other bookmarks' folder. |
- ASSERT_EQ(2, editor_root->child_count()); |
+ // The root should have two or three children: bookmark bar, other bookmarks |
+ // and conditionally synced bookmarks. |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableSyncedBookmarksFolder)) { |
+ ASSERT_EQ(3, editor_root->child_count()); |
+ } else { |
+ ASSERT_EQ(2, editor_root->child_count()); |
+ } |
BookmarkEditorView::EditorNode* bb_node = editor_root->GetChild(0); |
// The root should have 2 nodes: folder F1 and F2. |