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

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

Issue 353223002: Omnibox: Fix URL-What-You-Typed Allowed-To-Be-Default-Match Issues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove extra << Created 6 years, 5 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/search_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/search_provider_unittest.cc b/chrome/browser/autocomplete/search_provider_unittest.cc
index e68286bc88c2aec5ddcd54fe9543f4437952811d..7aaba419eda658162abb0524bc3fa3ead0ce2244 100644
--- a/chrome/browser/autocomplete/search_provider_unittest.cc
+++ b/chrome/browser/autocomplete/search_provider_unittest.cc
@@ -2207,14 +2207,14 @@ TEST_F(SearchProviderTest, NavigationInline) {
"http://www.abc.com", std::string(), false,
false },
{ "http://www.abc.com", "https://www.abc.com",
- "https://www.abc.com", std::string(), false,
- false },
+ "https://www.abc.com", std::string(), true,
+ true },
Peter Kasting 2014/07/09 00:46:43 Hmm. This seems like a bad outcome. I think if t
Mark P 2014/07/09 19:54:17 I agree. Yet [see below]
Peter Kasting 2014/07/09 21:05:03 Yeah, I think we should.
Mark P 2014/07/09 22:31:36 Done.
{ "http://abc.com", "ftp://abc.com",
"ftp://abc.com", std::string(), false,
false },
{ "https://www.abc.com", "http://www.abc.com",
- "www.abc.com", std::string(), false,
- false },
+ "www.abc.com", std::string(), true,
+ true },
{ "ftp://abc.com", "http://abc.com",
"abc.com", std::string(), false,
false },
@@ -2262,6 +2262,13 @@ TEST_F(SearchProviderTest, NavigationInline) {
{ "abc.com ", "http://www.abc.com/bar",
"www.abc.com/bar", "/bar", false, false },
+ // A suggestion that's equivalent to what the input gets fixed up to
+ // should be inlined.
+ { "abc.com:", "http://abc.com/",
+ "abc.com", "", true, true },
+ { "abc.com:", "http://www.abc.com",
+ "www.abc.com", "", true, true },
+
// Inline matches when the input is a leading substring of the scheme.
{ "h", "http://www.abc.com",
"http://www.abc.com", "ttp://www.abc.com", true, false },

Powered by Google App Engine
This is Rietveld 408576698