Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_NTP_SNIPPETS_MOCK_CONTENT_SUGGESTIONS_PROVIDER_OBSERVER_H_ | |
| 6 #define COMPONENTS_NTP_SNIPPETS_MOCK_CONTENT_SUGGESTIONS_PROVIDER_OBSERVER_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "components/ntp_snippets/content_suggestions_provider.h" | |
| 11 #include "testing/gmock/include/gmock/gmock.h" | |
| 12 | |
| 13 namespace ntp_snippets { | |
| 14 | |
| 15 class MockContentSuggestionsProviderObserver | |
| 16 : public ContentSuggestionsProvider::Observer { | |
| 17 public: | |
| 18 MockContentSuggestionsProviderObserver(); | |
| 19 ~MockContentSuggestionsProviderObserver(); | |
| 20 | |
| 21 void OnNewSuggestions(ContentSuggestionsProvider* provider, | |
|
Marc Treib
2016/08/11 12:53:09
This pattern (manually overridden method + mock be
vitaliii
2016/08/11 14:29:58
Done.
| |
| 22 Category category, | |
| 23 std::vector<ContentSuggestion> suggestions) override; | |
| 24 | |
| 25 MOCK_METHOD3(OnNewSuggestionsConst, | |
| 26 void(ContentSuggestionsProvider* provider, | |
| 27 Category category, | |
| 28 const std::vector<ContentSuggestion>& suggestions)); | |
| 29 MOCK_METHOD3(OnCategoryStatusChanged, | |
| 30 void(ContentSuggestionsProvider* provider, | |
| 31 Category category, | |
| 32 CategoryStatus new_status)); | |
| 33 }; | |
| 34 | |
| 35 } // namespace ntp_snippets | |
| 36 | |
| 37 #endif // COMPONENTS_NTP_SNIPPETS_MOCK_CONTENT_SUGGESTIONS_PROVIDER_OBSERVER_H_ | |
| OLD | NEW |