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

Unified Diff: components/omnibox/browser/history_quick_provider_unittest.cc

Issue 2846673006: Omnibox: Make InMemoryURLIndex respect hidden URLRows (Closed)
Patch Set: Created 3 years, 8 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 | « components/omnibox/browser/history_quick_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/history_quick_provider_unittest.cc
diff --git a/components/omnibox/browser/history_quick_provider_unittest.cc b/components/omnibox/browser/history_quick_provider_unittest.cc
index 16e4c65717ca444a79a3a5489d0de99df63d8557..58bf62e54211f4416743a41a13e305fd26c5f76e 100644
--- a/components/omnibox/browser/history_quick_provider_unittest.cc
+++ b/components/omnibox/browser/history_quick_provider_unittest.cc
@@ -252,6 +252,7 @@ HistoryQuickProviderTest::GetTestData() {
{"http://typeredest.com/x/c", "TC", 5, 3, 0},
{"http://typeredest.com/x/d", "TD", 5, 2, 0},
{"http://typeredest.com/y/e", "TE", 5, 1, 0},
+ {"http://nevertyped.com/", "NA", 20, 0, 0},
{"http://daysagoest.com/y/a", "DA", 1, 1, 0},
{"http://daysagoest.com/y/b", "DB", 1, 1, 1},
{"http://daysagoest.com/x/c", "DC", 1, 1, 2},
@@ -528,6 +529,13 @@ TEST_F(HistoryQuickProviderTest, TypedCountMatches) {
ASCIIToUTF16(".com/y/a"));
}
+TEST_F(HistoryQuickProviderTest, NeverTypedMatchesCantBeDefault) {
+ std::vector<std::string> expected_urls;
+ expected_urls.push_back("http://nevertyped.com/");
Peter Kasting 2017/04/28 06:02:13 Nit: Just init at the definition with = {...} inst
tommycli 2017/04/28 15:44:11 Done.
+ RunTest(ASCIIToUTF16("neverty"), false, expected_urls, false,
+ ASCIIToUTF16("nevertyped.com"), ASCIIToUTF16("ped.com/"));
+}
+
TEST_F(HistoryQuickProviderTest, DaysAgoMatches) {
std::vector<std::string> expected_urls;
expected_urls.push_back("http://daysagoest.com/y/a");
« no previous file with comments | « components/omnibox/browser/history_quick_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698