| Index: chrome/browser/autocomplete/keyword_provider_unittest.cc
|
| ===================================================================
|
| --- chrome/browser/autocomplete/keyword_provider_unittest.cc (revision 58197)
|
| +++ chrome/browser/autocomplete/keyword_provider_unittest.cc (working copy)
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -99,14 +99,17 @@
|
| {L"aaaa foo", 1, {L"aaaa foo"}},
|
| {L"www.aaaa foo", 1, {L"aaaa foo"}},
|
|
|
| - // Clean up keyword input properly.
|
| + // Clean up keyword input properly. "http" and "https" are the only
|
| + // allowed schemes.
|
| {L"www", 1, {L"www "}},
|
| {L"www.", 0, {}},
|
| {L"www.w w", 2, {L"www w", L"weasel w"}},
|
| {L"http://www", 1, {L"www "}},
|
| {L"http://www.", 0, {}},
|
| {L"ftp: blah", 0, {}},
|
| - {L"mailto:z", 1, {L"z "}},
|
| + {L"mailto:z", 0, {}},
|
| + {L"ftp://z", 0, {}},
|
| + {L"https://z", 1, {L"z "}},
|
| };
|
|
|
| RunTest<std::wstring>(edit_cases, arraysize(edit_cases),
|
| @@ -165,7 +168,8 @@
|
| {L"z foo", 1, {L"(Keyword: z)"}},
|
| {L"a foo", 3, {L"(Keyword: aa)", L"(Keyword: ab)",
|
| L"(Keyword: aaaa)"}},
|
| - {L"ftp://www.www w", 1, {L"(Keyword: www)"}},
|
| + {L"ftp://www.www w", 0, {}},
|
| + {L"http://www.ab w", 1, {L"(Keyword: ab)"}},
|
|
|
| // Keyword should be returned regardless of query input.
|
| {L"z", 1, {L"(Keyword: z)"}},
|
|
|