| 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/omnibox/base_search_provider.h" | 5 #include "components/omnibox/base_search_provider.h" |
| 6 | 6 |
| 7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "components/omnibox/autocomplete_match.h" | 9 #include "components/omnibox/autocomplete_match.h" |
| 10 #include "components/omnibox/autocomplete_match_type.h" | 10 #include "components/omnibox/autocomplete_match_type.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 MOCK_CONST_METHOD0(GetSchemeClassifier, | 30 MOCK_CONST_METHOD0(GetSchemeClassifier, |
| 31 const AutocompleteSchemeClassifier&()); | 31 const AutocompleteSchemeClassifier&()); |
| 32 MOCK_METHOD0(GetAutocompleteClassifier, AutocompleteClassifier*()); | 32 MOCK_METHOD0(GetAutocompleteClassifier, AutocompleteClassifier*()); |
| 33 MOCK_METHOD0(GetHistoryService, history::HistoryService*()); | 33 MOCK_METHOD0(GetHistoryService, history::HistoryService*()); |
| 34 | 34 |
| 35 // Can't mock scoped_refptr :\. | 35 // Can't mock scoped_refptr :\. |
| 36 scoped_refptr<history::TopSites> GetTopSites() override { return nullptr; } | 36 scoped_refptr<history::TopSites> GetTopSites() override { return nullptr; } |
| 37 | 37 |
| 38 MOCK_METHOD0(GetBookmarkModel, bookmarks::BookmarkModel*()); | 38 MOCK_METHOD0(GetBookmarkModel, bookmarks::BookmarkModel*()); |
| 39 MOCK_METHOD0(GetInMemoryDatabase, history::URLDatabase*()); | 39 MOCK_METHOD0(GetInMemoryDatabase, history::URLDatabase*()); |
| 40 MOCK_METHOD0(GetInMemoryURLIndex, InMemoryURLIndex*()); |
| 40 MOCK_METHOD0(GetTemplateURLService, TemplateURLService*()); | 41 MOCK_METHOD0(GetTemplateURLService, TemplateURLService*()); |
| 41 MOCK_METHOD0(GetSearchTermsData, const SearchTermsData&()); | 42 MOCK_METHOD0(GetSearchTermsData, const SearchTermsData&()); |
| 42 | 43 |
| 43 // Can't mock scoped_refptr :\. | 44 // Can't mock scoped_refptr :\. |
| 44 scoped_refptr<ShortcutsBackend> GetShortcutsBackend() override { | 45 scoped_refptr<ShortcutsBackend> GetShortcutsBackend() override { |
| 45 return nullptr; | 46 return nullptr; |
| 46 } | 47 } |
| 47 scoped_refptr<ShortcutsBackend> GetShortcutsBackendIfExists() override { | 48 scoped_refptr<ShortcutsBackend> GetShortcutsBackendIfExists() override { |
| 48 return nullptr; | 49 return nullptr; |
| 49 } | 50 } |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 EXPECT_TRUE(answer2->Equals(*match.answer)); | 211 EXPECT_TRUE(answer2->Equals(*match.answer)); |
| 211 EXPECT_EQ(AutocompleteMatchType::SEARCH_HISTORY, match.type); | 212 EXPECT_EQ(AutocompleteMatchType::SEARCH_HISTORY, match.type); |
| 212 EXPECT_EQ(1300, match.relevance); | 213 EXPECT_EQ(1300, match.relevance); |
| 213 | 214 |
| 214 EXPECT_EQ(answer_contents, duplicate.answer_contents); | 215 EXPECT_EQ(answer_contents, duplicate.answer_contents); |
| 215 EXPECT_EQ(answer_type, duplicate.answer_type); | 216 EXPECT_EQ(answer_type, duplicate.answer_type); |
| 216 EXPECT_TRUE(answer->Equals(*duplicate.answer)); | 217 EXPECT_TRUE(answer->Equals(*duplicate.answer)); |
| 217 EXPECT_EQ(AutocompleteMatchType::SEARCH_SUGGEST, duplicate.type); | 218 EXPECT_EQ(AutocompleteMatchType::SEARCH_SUGGEST, duplicate.type); |
| 218 EXPECT_EQ(850, duplicate.relevance); | 219 EXPECT_EQ(850, duplicate.relevance); |
| 219 } | 220 } |
| OLD | NEW |