Chromium Code Reviews| Index: chrome/browser/bookmarks/bookmark_utils_unittest.cc |
| diff --git a/chrome/browser/bookmarks/bookmark_utils_unittest.cc b/chrome/browser/bookmarks/bookmark_utils_unittest.cc |
| index bfd284e427bcfc4655ba595ce705908d42a4f9c1..bfc12ba4b2781996c5f6da3d71cdc23e8fd83fa1 100644 |
| --- a/chrome/browser/bookmarks/bookmark_utils_unittest.cc |
| +++ b/chrome/browser/bookmarks/bookmark_utils_unittest.cc |
| @@ -33,19 +33,19 @@ class BookmarkUtilsTest : public ::testing::Test { |
| TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) { |
| BookmarkModel model(NULL); |
| const BookmarkNode* node1 = model.AddURL(model.other_node(), |
| - 0, |
| - ASCIIToUTF16("foo bar"), |
| - GURL("http://www.google.com")); |
| + 0, |
| + ASCIIToUTF16("foo bar"), |
| + GURL("http://www.google.com")); |
| const BookmarkNode* node2 = model.AddURL(model.other_node(), |
| - 0, |
| - ASCIIToUTF16("baz buz"), |
| - GURL("http://www.cnn.com")); |
| - |
| - const BookmarkNode* folder1 = model.AddFolder(model.other_node(), |
| 0, |
| - ASCIIToUTF16("foo")); |
| - |
| + ASCIIToUTF16("baz buz"), |
| + GURL("http://www.cnn.com")); |
| + const BookmarkNode* folder1 = model.AddFolder(model.other_node(), |
| + 0, |
| + ASCIIToUTF16("foo")); |
| std::vector<const BookmarkNode*> nodes; |
| + |
| + // Ensure search matches node "foo bar" and folder "foo" |
| GetBookmarksContainingText( |
| &model, ASCIIToUTF16("foo"), 100, string(), &nodes); |
| ASSERT_EQ(2U, nodes.size()); |
| @@ -64,6 +64,12 @@ TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) { |
| ASSERT_EQ(1U, nodes.size()); |
| EXPECT_TRUE(nodes[0] == node1); |
| nodes.clear(); |
| + |
| + // Ensure Bookmark Bar and Other Bookmarks do not return in search results |
|
sky
2013/12/17 22:46:33
'do not return' -> 'are not returned'. And end sen
|
| + GetBookmarksContainingText( |
| + &model, ASCIIToUTF16("Bookmark"), 100, string(), &nodes); |
| + ASSERT_EQ(0U, nodes.size()); |
| + nodes.clear(); |
| } |
| TEST_F(BookmarkUtilsTest, CopyPaste) { |