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_result.h" | 5 #include "chrome/browser/autocomplete/autocomplete_result.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" | 14 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" |
15 #include "chrome/browser/omnibox/omnibox_field_trial.h" | |
16 #include "chrome/browser/search_engines/template_url_service_test_util.h" | 15 #include "chrome/browser/search_engines/template_url_service_test_util.h" |
17 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
18 #include "components/metrics/proto/omnibox_event.pb.h" | 17 #include "components/metrics/proto/omnibox_event.pb.h" |
19 #include "components/omnibox/autocomplete_input.h" | 18 #include "components/omnibox/autocomplete_input.h" |
20 #include "components/omnibox/autocomplete_match.h" | 19 #include "components/omnibox/autocomplete_match.h" |
21 #include "components/omnibox/autocomplete_match_type.h" | 20 #include "components/omnibox/autocomplete_match_type.h" |
22 #include "components/omnibox/autocomplete_provider.h" | 21 #include "components/omnibox/autocomplete_provider.h" |
| 22 #include "components/omnibox/omnibox_field_trial.h" |
23 #include "components/search_engines/template_url_prepopulate_data.h" | 23 #include "components/search_engines/template_url_prepopulate_data.h" |
24 #include "components/search_engines/template_url_service.h" | 24 #include "components/search_engines/template_url_service.h" |
25 #include "components/variations/entropy_provider.h" | 25 #include "components/variations/entropy_provider.h" |
26 #include "components/variations/variations_associated_data.h" | 26 #include "components/variations/variations_associated_data.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 | 28 |
29 using metrics::OmniboxEventProto; | 29 using metrics::OmniboxEventProto; |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 result.Reset(); | 849 result.Reset(); |
850 matches.clear(); | 850 matches.clear(); |
851 | 851 |
852 // Case 5: Multiple verbatim matches found in AutocompleteResult. | 852 // Case 5: Multiple verbatim matches found in AutocompleteResult. |
853 PopulateAutocompleteMatchesFromTestData(kVerbatimMatches, | 853 PopulateAutocompleteMatchesFromTestData(kVerbatimMatches, |
854 arraysize(kVerbatimMatches), | 854 arraysize(kVerbatimMatches), |
855 &matches); | 855 &matches); |
856 result.AppendMatches(matches); | 856 result.AppendMatches(matches); |
857 EXPECT_FALSE(result.ShouldHideTopMatch()); | 857 EXPECT_FALSE(result.ShouldHideTopMatch()); |
858 } | 858 } |
OLD | NEW |