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

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

Issue 2868085: Fixes bug 12305 -- 1.66:1 should be UNKNOWN, not URL. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: comment tweaked Created 10 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/autocomplete_unittest.cc
diff --git a/chrome/browser/autocomplete/autocomplete_unittest.cc b/chrome/browser/autocomplete/autocomplete_unittest.cc
index e4f3b9274557fb1e870e5e49591b3ad50e2998a6..617cf87b0d2f4e1b2aaf721fbdb0d45bf72a2b35 100644
--- a/chrome/browser/autocomplete/autocomplete_unittest.cc
+++ b/chrome/browser/autocomplete/autocomplete_unittest.cc
@@ -218,7 +218,6 @@ TEST(AutocompleteTest, InputType) {
{ L"foo/bar", AutocompleteInput::URL },
{ L"foo/bar baz", AutocompleteInput::UNKNOWN },
{ L"foo bar.com", AutocompleteInput::QUERY },
- { L"http://foo/bar baz", AutocompleteInput::URL },
{ L"foo bar", AutocompleteInput::QUERY },
{ L"foo+bar", AutocompleteInput::QUERY },
{ L"foo+bar.com", AutocompleteInput::UNKNOWN },
@@ -228,10 +227,14 @@ TEST(AutocompleteTest, InputType) {
{ L"localhost:8080", AutocompleteInput::URL },
{ L"foo.com:123456", AutocompleteInput::QUERY },
{ L"foo.com:abc", AutocompleteInput::QUERY },
+ { L"1.2.3.4:abc", AutocompleteInput::QUERY },
{ L"user@foo.com", AutocompleteInput::UNKNOWN },
{ L"user:pass@foo.com", AutocompleteInput::UNKNOWN },
{ L"1.2", AutocompleteInput::UNKNOWN },
{ L"1.2/45", AutocompleteInput::UNKNOWN },
+ { L"1.2:45", AutocompleteInput::UNKNOWN },
+ { L"user@1.2:45", AutocompleteInput::UNKNOWN },
+ { L"user:foo@1.2:45", AutocompleteInput::UNKNOWN },
{ L"ps/2 games", AutocompleteInput::UNKNOWN },
{ L"en.wikipedia.org/wiki/James Bond", AutocompleteInput::URL },
// In Chrome itself, mailto: will get handled by ShellExecute, but in
@@ -249,17 +252,21 @@ TEST(AutocompleteTest, InputType) {
{ L"http://foo.c", AutocompleteInput::URL },
{ L"http://foo.com", AutocompleteInput::URL },
{ L"http://foo_bar.com", AutocompleteInput::URL },
+ { L"http://foo/bar baz", AutocompleteInput::URL },
{ L"http://-.com", AutocompleteInput::UNKNOWN },
{ L"http://_foo_.com", AutocompleteInput::UNKNOWN },
{ L"http://foo.com:abc", AutocompleteInput::QUERY },
{ L"http://foo.com:123456", AutocompleteInput::QUERY },
+ { L"http://1.2.3.4:abc", AutocompleteInput::QUERY },
{ L"http:user@foo.com", AutocompleteInput::URL },
{ L"http://user@foo.com", AutocompleteInput::URL },
+ { L"http:user:pass@foo.com", AutocompleteInput::URL },
{ L"http://user:pass@foo.com", AutocompleteInput::URL },
{ L"http://1.2", AutocompleteInput::URL },
{ L"http://1.2/45", AutocompleteInput::URL },
{ L"http:ps/2 games", AutocompleteInput::URL },
{ L"http://ps/2 games", AutocompleteInput::URL },
+ { L"https://foo.com", AutocompleteInput::URL },
{ L"127.0.0.1", AutocompleteInput::URL },
{ L"127.0.1", AutocompleteInput::UNKNOWN },
{ L"127.0.1/", AutocompleteInput::UNKNOWN },
« chrome/browser/autocomplete/autocomplete.cc ('K') | « chrome/browser/autocomplete/autocomplete.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698