diff options
Diffstat (limited to 'chrome/browser/autocomplete/keyword_provider_unittest.cc')
-rw-r--r-- | chrome/browser/autocomplete/keyword_provider_unittest.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/autocomplete/keyword_provider_unittest.cc b/chrome/browser/autocomplete/keyword_provider_unittest.cc index 0578496..5583519 100644 --- a/chrome/browser/autocomplete/keyword_provider_unittest.cc +++ b/chrome/browser/autocomplete/keyword_provider_unittest.cc @@ -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 @@ TEST_F(KeywordProviderTest, Edit) { {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 @@ TEST_F(KeywordProviderTest, Description) { {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)"}}, |