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

Unified Diff: chrome/browser/autocomplete/bookmark_provider_unittest.cc

Issue 499343004: Omnibox: Fix to Display Bookmarks With Leading Spaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter's rewrite Created 6 years, 4 months 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/autocomplete/bookmark_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/bookmark_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/bookmark_provider_unittest.cc b/chrome/browser/autocomplete/bookmark_provider_unittest.cc
index ed6a160c2b5b081a8ca411851ccc73cce87be9de..6294b5697f8b44a99708168be93e2231c0c796f7 100644
--- a/chrome/browser/autocomplete/bookmark_provider_unittest.cc
+++ b/chrome/browser/autocomplete/bookmark_provider_unittest.cc
@@ -62,6 +62,8 @@ struct BookmarksTestInfo {
{"worming burns #10", "http://www.burned.com/" },
{"worming burns #20", "http://www.worms.com/" },
{"jive music", "http://www.worms.com/" },
+ // For testing strange spacing in bookmark titles.
+ {" hello1 hello2 ", "http://whatever.com/" },
};
class BookmarkProviderTest : public testing::Test {
@@ -253,6 +255,8 @@ TEST_F(BookmarkProviderTest, Positions) {
{"frankly frankly", 1, {{{0, 7}, {8, 15}, {0, 0}}}},
{"foobar foo", 1, {{{0, 6}, {7, 13}, {0, 0}}}},
{"foo foobar", 1, {{{0, 6}, {7, 13}, {0, 0}}}},
+ // This one makes sure that leading whitespace in the title is removed.
+ {"hello", 1, {{{0, 5}, {7, 12}, {0, 0}}}},
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(query_data); ++i) {
« no previous file with comments | « chrome/browser/autocomplete/bookmark_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698