OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "chrome/browser/autocomplete/autocomplete_match.h" | 7 #include "chrome/browser/autocomplete/autocomplete_match.h" |
8 #include "chrome/browser/autocomplete/builtin_provider.h" | 8 #include "chrome/browser/autocomplete/builtin_provider.h" |
9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
10 #include "chrome/test/base/testing_browser_process.h" | 10 #include "chrome/test/base/testing_browser_process.h" |
11 #include "chrome/test/base/testing_browser_process_test.h" | |
12 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
14 | 13 |
15 class BuiltinProviderTest : public TestingBrowserProcessTest { | 14 class BuiltinProviderTest : public testing::Test { |
16 protected: | 15 protected: |
17 template<class ResultType> | 16 template<class ResultType> |
18 struct test_data { | 17 struct test_data { |
19 const string16 input; | 18 const string16 input; |
20 const size_t num_results; | 19 const size_t num_results; |
21 const ResultType output[3]; | 20 const ResultType output[3]; |
22 }; | 21 }; |
23 | 22 |
24 BuiltinProviderTest() : builtin_provider_(NULL) { } | 23 BuiltinProviderTest() : builtin_provider_(NULL) { } |
25 virtual ~BuiltinProviderTest() { } | 24 virtual ~BuiltinProviderTest() { } |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 {kSettings + kPage1.substr(0, 1), 2, {kURL1, kURL2}}, | 218 {kSettings + kPage1.substr(0, 1), 2, {kURL1, kURL2}}, |
220 {kSettings + kPage1.substr(0, 2), 1, {kURL1}}, | 219 {kSettings + kPage1.substr(0, 2), 1, {kURL1}}, |
221 {kSettings + kPage1.substr(0, kPage1.length() - 1), 1, {kURL1}}, | 220 {kSettings + kPage1.substr(0, kPage1.length() - 1), 1, {kURL1}}, |
222 {kSettings + kPage1, 1, {kURL1}}, | 221 {kSettings + kPage1, 1, {kURL1}}, |
223 {kSettings + kPage2, 1, {kURL2}}, | 222 {kSettings + kPage2, 1, {kURL2}}, |
224 }; | 223 }; |
225 | 224 |
226 RunTest<GURL>(settings_subpage_cases, arraysize(settings_subpage_cases), | 225 RunTest<GURL>(settings_subpage_cases, arraysize(settings_subpage_cases), |
227 &AutocompleteMatch::destination_url); | 226 &AutocompleteMatch::destination_url); |
228 } | 227 } |
OLD | NEW |