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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/autocomplete/autocomplete.h" | 11 #include "chrome/browser/autocomplete/autocomplete.h" |
12 #include "chrome/browser/autocomplete/autocomplete_match.h" | 12 #include "chrome/browser/autocomplete/autocomplete_match.h" |
13 #include "chrome/browser/autocomplete/keyword_provider.h" | 13 #include "chrome/browser/autocomplete/keyword_provider.h" |
14 #include "chrome/browser/autocomplete/search_provider.h" | 14 #include "chrome/browser/autocomplete/search_provider.h" |
15 #include "chrome/browser/search_engines/template_url.h" | 15 #include "chrome/browser/search_engines/template_url.h" |
16 #include "chrome/browser/search_engines/template_url_service.h" | 16 #include "chrome/browser/search_engines/template_url_service.h" |
17 #include "chrome/browser/search_engines/template_url_service_factory.h" | 17 #include "chrome/browser/search_engines/template_url_service_factory.h" |
18 #include "chrome/common/chrome_notification_types.h" | 18 #include "chrome/common/chrome_notification_types.h" |
19 #include "chrome/test/base/testing_browser_process.h" | 19 #include "chrome/test/base/testing_browser_process.h" |
20 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
21 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
22 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
23 #include "content/common/notification_service.h" | 23 #include "content/public/browser/notification_source.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 | 25 |
26 static std::ostream& operator<<(std::ostream& os, | 26 static std::ostream& operator<<(std::ostream& os, |
27 const AutocompleteResult::const_iterator& it) { | 27 const AutocompleteResult::const_iterator& it) { |
28 return os << static_cast<const AutocompleteMatch*>(&(*it)); | 28 return os << static_cast<const AutocompleteMatch*>(&(*it)); |
29 } | 29 } |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 const size_t num_results_per_provider = 3; | 33 const size_t num_results_per_provider = 3; |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 AutocompleteInput input(input_cases[i].input, string16(), true, false, | 479 AutocompleteInput input(input_cases[i].input, string16(), true, false, |
480 true, AutocompleteInput::ALL_MATCHES); | 480 true, AutocompleteInput::ALL_MATCHES); |
481 EXPECT_EQ(input_cases[i].scheme.begin, scheme.begin); | 481 EXPECT_EQ(input_cases[i].scheme.begin, scheme.begin); |
482 EXPECT_EQ(input_cases[i].scheme.len, scheme.len); | 482 EXPECT_EQ(input_cases[i].scheme.len, scheme.len); |
483 EXPECT_EQ(input_cases[i].host.begin, host.begin); | 483 EXPECT_EQ(input_cases[i].host.begin, host.begin); |
484 EXPECT_EQ(input_cases[i].host.len, host.len); | 484 EXPECT_EQ(input_cases[i].host.len, host.len); |
485 } | 485 } |
486 } | 486 } |
487 | 487 |
488 } // namespace | 488 } // namespace |
OLD | NEW |