OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/autocomplete/autocomplete_match.h" | 5 #include "components/omnibox/autocomplete_match.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 TEST(AutocompleteMatchTest, MoreRelevant) { | 10 TEST(AutocompleteMatchTest, MoreRelevant) { |
11 struct RelevantCases { | 11 struct RelevantCases { |
12 int r1; | 12 int r1; |
13 int r2; | 13 int r2; |
14 bool expected_result; | 14 bool expected_result; |
15 } cases[] = { | 15 } cases[] = { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 NULL, 0, false, AutocompleteMatchType::URL_WHAT_YOU_TYPED)); | 120 NULL, 0, false, AutocompleteMatchType::URL_WHAT_YOU_TYPED)); |
121 m.duplicate_matches.push_back(AutocompleteMatch( | 121 m.duplicate_matches.push_back(AutocompleteMatch( |
122 NULL, 0, false, AutocompleteMatchType::URL_WHAT_YOU_TYPED)); | 122 NULL, 0, false, AutocompleteMatchType::URL_WHAT_YOU_TYPED)); |
123 EXPECT_FALSE(m.SupportsDeletion()); | 123 EXPECT_FALSE(m.SupportsDeletion()); |
124 | 124 |
125 // A non-deletable match, with at least one deletable duplicate. | 125 // A non-deletable match, with at least one deletable duplicate. |
126 m.duplicate_matches.push_back(AutocompleteMatch( | 126 m.duplicate_matches.push_back(AutocompleteMatch( |
127 NULL, 0, true, AutocompleteMatchType::URL_WHAT_YOU_TYPED)); | 127 NULL, 0, true, AutocompleteMatchType::URL_WHAT_YOU_TYPED)); |
128 EXPECT_TRUE(m.SupportsDeletion()); | 128 EXPECT_TRUE(m.SupportsDeletion()); |
129 } | 129 } |
OLD | NEW |