Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Unified Diff: components/ntp_snippets/content_suggestions_service_unittest.cc

Issue 2167063003: Rename discard to dismiss for NTP snippets and content suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bridgeumbiegen
Patch Set: Fix unit test Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/ntp_snippets/content_suggestions_service.cc ('k') | components/ntp_snippets/ntp_snippet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6d5d85b50b0b7c483d134371fe6c99d62bde398d..02bbdbd82247588ff2e323add95d2a4810a745c0 100644
--- a/components/ntp_snippets/content_suggestions_service_unittest.cc
+++ b/components/ntp_snippets/content_suggestions_service_unittest.cc
@@ -86,8 +86,8 @@ class MockProvider : public ContentSuggestionsProvider {
}
MOCK_METHOD0(ClearCachedSuggestionsForDebugging, void());
- MOCK_METHOD0(ClearDiscardedSuggestionsForDebugging, void());
- MOCK_METHOD1(DiscardSuggestion, void(const std::string& suggestion_id));
+ MOCK_METHOD0(ClearDismissedSuggestionsForDebugging, void());
+ MOCK_METHOD1(DismissSuggestion, void(const std::string& suggestion_id));
MOCK_METHOD2(FetchSuggestionImage,
void(const std::string& suggestion_id,
const ImageFetchedCallback& callback));
@@ -305,7 +305,7 @@ TEST_F(ContentSuggestionsServiceTest,
base::Unretained(this)));
}
-TEST_F(ContentSuggestionsServiceTest, ShouldRedirectDiscardSuggestion) {
+TEST_F(ContentSuggestionsServiceTest, ShouldRedirectDismissSuggestion) {
MockProvider provider1(ContentSuggestionsCategory::ARTICLES);
MockProvider provider2(ContentSuggestionsCategory::OFFLINE_PAGES);
service()->RegisterProvider(&provider1);
@@ -315,9 +315,9 @@ TEST_F(ContentSuggestionsServiceTest, ShouldRedirectDiscardSuggestion) {
{11});
std::string suggestion_id = CreateSuggestion(11).id();
- EXPECT_CALL(provider1, DiscardSuggestion(_)).Times(0);
- EXPECT_CALL(provider2, DiscardSuggestion(suggestion_id)).Times(1);
- service()->DiscardSuggestion(suggestion_id);
+ EXPECT_CALL(provider1, DismissSuggestion(_)).Times(0);
+ EXPECT_CALL(provider2, DismissSuggestion(suggestion_id)).Times(1);
+ service()->DismissSuggestion(suggestion_id);
provider1.FireShutdown();
provider2.FireShutdown();
}
« no previous file with comments | « components/ntp_snippets/content_suggestions_service.cc ('k') | components/ntp_snippets/ntp_snippet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698