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

Unified Diff: components/bookmarks/browser/bookmark_index_unittest.cc

Issue 688473005: Make sure to update the BookmarkIndex on a URL Change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: components/bookmarks/browser/bookmark_index_unittest.cc
diff --git a/components/bookmarks/browser/bookmark_index_unittest.cc b/components/bookmarks/browser/bookmark_index_unittest.cc
index 90168ffbcc7c566b0ee19da7ef94077906394e79..dbdb9f01469d5cc3a1aed5f407e9ff5ded1684b7 100644
--- a/components/bookmarks/browser/bookmark_index_unittest.cc
+++ b/components/bookmarks/browser/bookmark_index_unittest.cc
@@ -388,6 +388,18 @@ TEST_F(BookmarkIndexTest, ChangeTitle) {
ExpectMatches("BlAh", expected, arraysize(expected));
}
+// Makes sure index is updated when a node's URL is changed.
+TEST_F(BookmarkIndexTest, ChangeURL) {
+ const char* titles[] = { "a", "b" };
+ const char* urls[] = {"http://fizz",
+ "http://fuzz"};
+ AddBookmarks(titles, urls, arraysize(titles));
+
+ const char* expected[] = { "a" };
+ model_->SetURL(model_->other_node()->GetChild(0), GURL("http://blah"));
+ ExpectMatches("blah", expected, arraysize(expected));
+}
+
// Makes sure no more than max queries is returned.
TEST_F(BookmarkIndexTest, HonorMax) {
const char* titles[] = { "abcd", "abcde" };
« no previous file with comments | « no previous file | components/bookmarks/browser/bookmark_model.h » ('j') | components/bookmarks/browser/bookmark_model.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698