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

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

Issue 1286093006: Launch HQP & HUP score changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
Index: chrome/browser/autocomplete/in_memory_url_index_unittest.cc
diff --git a/chrome/browser/autocomplete/in_memory_url_index_unittest.cc b/chrome/browser/autocomplete/in_memory_url_index_unittest.cc
index 6f8da20b4aa352f81edb73201dee06d1f6d5338c..a660481d3f4634e61f1eb481af02c60fe870eaf5 100644
--- a/chrome/browser/autocomplete/in_memory_url_index_unittest.cc
+++ b/chrome/browser/autocomplete/in_memory_url_index_unittest.cc
@@ -549,17 +549,10 @@ TEST_F(InMemoryURLIndexTest, MAYBE_Retrieval) {
EXPECT_FALSE(matches[0].can_inline);
// Search which should result in very poor result.
+ // No results since it will be suppressed by default scoring.
matches = url_index_->HistoryItemsForTerms(ASCIIToUTF16("qui c"),
base::string16::npos, kMaxMatches);
- ASSERT_EQ(1U, matches.size());
- // The results should have a poor score.
- EXPECT_LT(matches[0].raw_score, 500);
- EXPECT_EQ(33, matches[0].url_info.id());
- EXPECT_EQ("http://quiteuselesssearchresultxyz.com/",
- matches[0].url_info.url().spec()); // Note: URL gets lowercased.
- EXPECT_EQ(ASCIIToUTF16("Practically Useless Search Result"),
- matches[0].url_info.title());
- EXPECT_FALSE(matches[0].can_inline);
+ ASSERT_EQ(0U, matches.size());
// Search which will match at the end of an URL with encoded characters.
matches = url_index_->HistoryItemsForTerms(ASCIIToUTF16("Mice"),
@@ -679,10 +672,10 @@ TEST_F(InMemoryURLIndexTest, URLPrefixMatching) {
ASSERT_EQ(1U, matches.size());
EXPECT_TRUE(matches[0].can_inline);
- // "ww.cnn.com" - found because we allow mid-term matches in hostnames
+ // "ww.cnn.com" - found because we suppress mid-term matches.
matches = url_index_->HistoryItemsForTerms(ASCIIToUTF16("ww.cnn.com"),
base::string16::npos, kMaxMatches);
- ASSERT_EQ(1U, matches.size());
+ ASSERT_EQ(0U, matches.size());
// "www.cnn.com" - found, can inline
matches = url_index_->HistoryItemsForTerms(ASCIIToUTF16("www.cnn.com"),
« no previous file with comments | « chrome/browser/autocomplete/history_url_provider_unittest.cc ('k') | components/omnibox/browser/history_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698