OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" | 8 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" |
9 #include "chrome/browser/autocomplete/keyword_provider.h" | 9 #include "chrome/browser/autocomplete/keyword_provider.h" |
10 #include "chrome/test/base/testing_browser_process.h" | 10 #include "chrome/test/base/testing_browser_process.h" |
11 #include "components/autocomplete/autocomplete_match.h" | |
12 #include "components/metrics/proto/omnibox_event.pb.h" | 11 #include "components/metrics/proto/omnibox_event.pb.h" |
| 12 #include "components/omnibox/autocomplete_match.h" |
13 #include "components/search_engines/search_engines_switches.h" | 13 #include "components/search_engines/search_engines_switches.h" |
14 #include "components/search_engines/template_url.h" | 14 #include "components/search_engines/template_url.h" |
15 #include "components/search_engines/template_url_service.h" | 15 #include "components/search_engines/template_url_service.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "url/gurl.h" | 17 #include "url/gurl.h" |
18 | 18 |
19 using base::ASCIIToUTF16; | 19 using base::ASCIIToUTF16; |
20 | 20 |
21 class KeywordProviderTest : public testing::Test { | 21 class KeywordProviderTest : public testing::Test { |
22 protected: | 22 protected: |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 TestData<GURL> url_cases[] = { | 350 TestData<GURL> url_cases[] = { |
351 { ASCIIToUTF16("a 1 2 3"), 3, | 351 { ASCIIToUTF16("a 1 2 3"), 3, |
352 { { GURL("aa.com?a=b&foo=1+2+3"), false }, | 352 { { GURL("aa.com?a=b&foo=1+2+3"), false }, |
353 { GURL("bogus URL 1+2+3"), false }, | 353 { GURL("bogus URL 1+2+3"), false }, |
354 { GURL("http://aaaa/?aaaa=1&b=1+2+3&c"), false } } }, | 354 { GURL("http://aaaa/?aaaa=1&b=1+2+3&c"), false } } }, |
355 }; | 355 }; |
356 | 356 |
357 RunTest<GURL>(url_cases, arraysize(url_cases), | 357 RunTest<GURL>(url_cases, arraysize(url_cases), |
358 &AutocompleteMatch::destination_url); | 358 &AutocompleteMatch::destination_url); |
359 } | 359 } |
OLD | NEW |