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

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

Issue 75963003: Include folders in bookmark search (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for trybots? Created 7 years, 1 month 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/bookmarks/bookmark_utils.cc ('k') | chrome/test/data/extensions/api_test/bookmarks/test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9e5396b1faeedc92e10a0c36767470481bc45b35..b7977eba051d01199e54901d5fdcf50c99c5901e 100644
--- a/chrome/browser/bookmarks/bookmark_utils_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_utils_unittest.cc
@@ -29,34 +29,37 @@ class BookmarkUtilsTest : public ::testing::Test {
TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) {
BookmarkModel model(NULL);
- const BookmarkNode* n1 = model.AddURL(model.other_node(),
+ const BookmarkNode* node1 = model.AddURL(model.other_node(),
0,
ASCIIToUTF16("foo bar"),
GURL("http://www.google.com"));
- const BookmarkNode* n2 = model.AddURL(model.other_node(),
+ const BookmarkNode* node2 = model.AddURL(model.other_node(),
0,
ASCIIToUTF16("baz buz"),
GURL("http://www.cnn.com"));
- model.AddFolder(model.other_node(), 0, ASCIIToUTF16("foo"));
+ const BookmarkNode* folder1 = model.AddFolder(model.other_node(),
+ 0,
+ ASCIIToUTF16("foo"));
std::vector<const BookmarkNode*> nodes;
GetBookmarksContainingText(
&model, ASCIIToUTF16("foo"), 100, string(), &nodes);
- ASSERT_EQ(1U, nodes.size());
- EXPECT_TRUE(nodes[0] == n1);
+ ASSERT_EQ(2U, nodes.size());
+ EXPECT_TRUE(nodes[0] == folder1);
+ EXPECT_TRUE(nodes[1] == node1);
nodes.clear();
GetBookmarksContainingText(
&model, ASCIIToUTF16("cnn"), 100, string(), &nodes);
ASSERT_EQ(1U, nodes.size());
- EXPECT_TRUE(nodes[0] == n2);
+ EXPECT_TRUE(nodes[0] == node2);
nodes.clear();
GetBookmarksContainingText(
&model, ASCIIToUTF16("foo bar"), 100, string(), &nodes);
ASSERT_EQ(1U, nodes.size());
- EXPECT_TRUE(nodes[0] == n1);
+ EXPECT_TRUE(nodes[0] == node1);
nodes.clear();
}
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils.cc ('k') | chrome/test/data/extensions/api_test/bookmarks/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698