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 "chrome/browser/autocomplete/autocomplete_input.h" | 5 #include "chrome/browser/autocomplete/autocomplete_input.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "googleurl/src/url_parse.h" | 11 #include "googleurl/src/url_parse.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 TEST(AutocompleteInputTest, InputType) { | 14 TEST(AutocompleteInputTest, InputType) { |
15 struct test_data { | 15 struct test_data { |
16 const string16 input; | 16 const string16 input; |
17 const AutocompleteInput::Type type; | 17 const AutocompleteInput::Type type; |
18 } input_cases[] = { | 18 } input_cases[] = { |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 SCOPED_TRACE(input_cases[i].input); | 243 SCOPED_TRACE(input_cases[i].input); |
244 AutocompleteInput input(input_cases[i].input, | 244 AutocompleteInput input(input_cases[i].input, |
245 input_cases[i].cursor_position, | 245 input_cases[i].cursor_position, |
246 string16(), GURL(), true, false, true, | 246 string16(), GURL(), true, false, true, |
247 AutocompleteInput::ALL_MATCHES); | 247 AutocompleteInput::ALL_MATCHES); |
248 EXPECT_EQ(input_cases[i].normalized_input, input.text()); | 248 EXPECT_EQ(input_cases[i].normalized_input, input.text()); |
249 EXPECT_EQ(input_cases[i].normalized_cursor_position, | 249 EXPECT_EQ(input_cases[i].normalized_cursor_position, |
250 input.cursor_position()); | 250 input.cursor_position()); |
251 } | 251 } |
252 } | 252 } |
OLD | NEW |