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

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: fix crashes on about: schemes 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
« no previous file with comments | « chrome/browser/autocomplete/search_provider.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 46756db03f17c535a38733973948742ce5aa28dc..9d71b84b8e80b39aab5c1bca98d3bba5a94493b8 100644
--- a/chrome/browser/autocomplete/search_provider_unittest.cc
+++ b/chrome/browser/autocomplete/search_provider_unittest.cc
@@ -2206,18 +2206,6 @@ TEST_F(SearchProviderTest, NavigationInline) {
{ "http://www.abc.com/a", "http://www.abc.com",
"http://www.abc.com", std::string(), false,
false },
- { "http://www.abc.com", "https://www.abc.com",
- "https://www.abc.com", std::string(), false,
- false },
- { "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 },
- { "ftp://abc.com", "http://abc.com",
- "abc.com", std::string(), false,
- false },
// Do not inline matches with invalid input prefixes; trim http as needed.
{ "ttp", "http://www.abc.com",
@@ -2262,6 +2250,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 },
« no previous file with comments | « chrome/browser/autocomplete/search_provider.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698