Index: components/ntp_snippets/content_suggestions_service_unittest.cc |
diff --git a/components/ntp_snippets/content_suggestions_service_unittest.cc b/components/ntp_snippets/content_suggestions_service_unittest.cc |
index 81a7918254108472dd7ac98a15af17c4add75244..064cd38957ce38f0c90f2373f00c96e920760ba2 100644 |
--- a/components/ntp_snippets/content_suggestions_service_unittest.cc |
+++ b/components/ntp_snippets/content_suggestions_service_unittest.cc |
@@ -103,7 +103,7 @@ class MockProvider : public ContentSuggestionsProvider { |
class MockServiceObserver : public ContentSuggestionsService::Observer { |
public: |
- MOCK_METHOD0(OnNewSuggestions, void()); |
+ MOCK_METHOD1(OnNewSuggestions, void(Category category)); |
MOCK_METHOD2(OnCategoryStatusChanged, |
void(Category changed_category, CategoryStatus new_status)); |
MOCK_METHOD0(ContentSuggestionsServiceShutdown, void()); |
@@ -317,27 +317,27 @@ TEST_F(ContentSuggestionsServiceTest, ShouldForwardSuggestions) { |
service()->AddObserver(&observer); |
// Send suggestions 1 and 2 |
- EXPECT_CALL(observer, OnNewSuggestions()).Times(1); |
+ EXPECT_CALL(observer, OnNewSuggestions(articles_category)).Times(1); |
provider1->FireSuggestionsChanged(articles_category, {1, 2}); |
ExpectThatSuggestionsAre(articles_category, {1, 2}); |
Mock::VerifyAndClearExpectations(&observer); |
// Send them again, make sure they're not reported twice |
- EXPECT_CALL(observer, OnNewSuggestions()).Times(1); |
+ EXPECT_CALL(observer, OnNewSuggestions(articles_category)).Times(1); |
provider1->FireSuggestionsChanged(articles_category, {1, 2}); |
ExpectThatSuggestionsAre(articles_category, {1, 2}); |
ExpectThatSuggestionsAre(offline_pages_category, std::vector<int>()); |
Mock::VerifyAndClearExpectations(&observer); |
// Send suggestions 13 and 14 |
- EXPECT_CALL(observer, OnNewSuggestions()).Times(1); |
+ EXPECT_CALL(observer, OnNewSuggestions(offline_pages_category)).Times(1); |
provider2->FireSuggestionsChanged(offline_pages_category, {13, 14}); |
ExpectThatSuggestionsAre(articles_category, {1, 2}); |
ExpectThatSuggestionsAre(offline_pages_category, {13, 14}); |
Mock::VerifyAndClearExpectations(&observer); |
// Send suggestion 1 only |
- EXPECT_CALL(observer, OnNewSuggestions()).Times(1); |
+ EXPECT_CALL(observer, OnNewSuggestions(articles_category)).Times(1); |
provider1->FireSuggestionsChanged(articles_category, {1}); |
ExpectThatSuggestionsAre(articles_category, {1}); |
ExpectThatSuggestionsAre(offline_pages_category, {13, 14}); |