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

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

Issue 18878007: Omnibox: Make the Controller Reorder Matches for Inlining (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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
Index: chrome/browser/autocomplete/history_quick_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/history_quick_provider_unittest.cc b/chrome/browser/autocomplete/history_quick_provider_unittest.cc
index 1d57daf7e1faf488d5871dd59cabc053ec1abbdc..ef3a50dc7e7a8a0fea98fc055132774400dee6d3 100644
--- a/chrome/browser/autocomplete/history_quick_provider_unittest.cc
+++ b/chrome/browser/autocomplete/history_quick_provider_unittest.cc
@@ -288,6 +288,7 @@ void HistoryQuickProviderTest::RunTest(const string16 text,
best_score = actual->relevance;
}
+ EXPECT_EQ(can_inline_top_result, ac_matches_[0].allowed_to_be_default_match);
if (can_inline_top_result) {
// When the top scorer is inline-able make sure we get the expected
// fill_into_edit and autocomplete offset.
@@ -302,6 +303,9 @@ void HistoryQuickProviderTest::RunTest(const string16 text,
// When the top scorer is not inline-able autocomplete offset must be npos.
EXPECT_TRUE(ac_matches_[0].inline_autocompletion.empty());
// Also, the score must be too low to be inlineable.
+ // TODO(mpearson): when the controller reorders for inlining, there's no
+ // longer any connection between scores and what's inlineable / allowed
+ // to be the default match. Remove this test.
EXPECT_LT(ac_matches_[0].relevance,
AutocompleteResult::kLowestDefaultScore);
}
« no previous file with comments | « chrome/browser/autocomplete/history_quick_provider.cc ('k') | chrome/browser/autocomplete/history_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698