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

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

Issue 1098843004: Omnibox - Do Not Allow HTTP/HTTPS Equivalence if User Explicitly Entered A Scheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no equivalence across schemes if any scheme is present Created 5 years, 7 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_url_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc
index d111f25bae8ba4349d553f1364bbc083104583d8..4b50cedfc52027de05202c8cc081a6da301e9cd6 100644
--- a/chrome/browser/autocomplete/history_url_provider_unittest.cc
+++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc
@@ -8,6 +8,7 @@
#include "base/message_loop/message_loop.h"
#include "base/prefs/pref_service.h"
+#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
@@ -317,8 +318,11 @@ void HistoryURLProviderTest::RunTest(
if (sort_matches_) {
TemplateURLService* service =
TemplateURLServiceFactory::GetForProfile(profile_.get());
- for (ACMatches::iterator i = matches_.begin(); i != matches_.end(); ++i)
- i->ComputeStrippedDestinationURL(service);
+ std::vector<base::string16> words;
+ base::SplitString(input.text(), ' ', &words);
+ for (ACMatches::iterator i = matches_.begin(); i != matches_.end(); ++i) {
+ i->ComputeStrippedDestinationURL(words, service);
+ }
AutocompleteResult::DedupMatchesByDestination(
input.current_page_classification(), false, &matches_);
std::sort(matches_.begin(), matches_.end(),

Powered by Google App Engine
This is Rietveld 408576698