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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc

Issue 2751093003: Unifies the additional actions for Categories (Closed)
Patch Set: Fix compilation on Android (hopefully) Created 3 years, 9 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
Index: components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc
diff --git a/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc
index 9df3a6009579ddd3daf901e8ce87fbdc829beff9..2a97af61bb659c577d816b578418a06f91a341d7 100644
--- a/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc
+++ b/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc
@@ -605,8 +605,8 @@ TEST_F(RemoteSuggestionsProviderImplTest, CategoryTitle) {
CategoryInfo info_before = service->GetCategoryInfo(articles_category());
ASSERT_THAT(info_before.title(), Not(IsEmpty()));
ASSERT_THAT(info_before.title(), Not(Eq(test_default_title)));
- EXPECT_THAT(info_before.has_fetch_action(), Eq(true));
- EXPECT_THAT(info_before.has_view_all_action(), Eq(false));
+ EXPECT_THAT(info_before.additional_action(),
+ Eq(ContentSuggestionsAdditionalAction::FETCH));
EXPECT_THAT(info_before.show_if_empty(), Eq(true));
std::string json_str_with_title(GetTestJson({GetSuggestion()}));
@@ -622,8 +622,8 @@ TEST_F(RemoteSuggestionsProviderImplTest, CategoryTitle) {
CategoryInfo info_with_title = service->GetCategoryInfo(articles_category());
EXPECT_THAT(info_before.title(), Not(Eq(info_with_title.title())));
EXPECT_THAT(test_default_title, Eq(info_with_title.title()));
- EXPECT_THAT(info_before.has_fetch_action(), Eq(true));
- EXPECT_THAT(info_before.has_view_all_action(), Eq(false));
+ EXPECT_THAT(info_before.additional_action(),
+ Eq(ContentSuggestionsAdditionalAction::FETCH));
EXPECT_THAT(info_before.show_if_empty(), Eq(true));
}
@@ -678,8 +678,8 @@ TEST_F(RemoteSuggestionsProviderImplTest, MultipleCategories) {
TEST_F(RemoteSuggestionsProviderImplTest, ArticleCategoryInfo) {
auto service = MakeSuggestionsProvider();
CategoryInfo article_info = service->GetCategoryInfo(articles_category());
- EXPECT_THAT(article_info.has_fetch_action(), Eq(true));
- EXPECT_THAT(article_info.has_view_all_action(), Eq(false));
+ EXPECT_THAT(article_info.additional_action(),
+ Eq(ContentSuggestionsAdditionalAction::FETCH));
EXPECT_THAT(article_info.show_if_empty(), Eq(true));
}
@@ -695,8 +695,8 @@ TEST_F(RemoteSuggestionsProviderImplTest, ExperimentalCategoryInfo) {
LoadFromJSONString(service.get(), json_str);
CategoryInfo info = service->GetCategoryInfo(unknown_category());
- EXPECT_THAT(info.has_fetch_action(), Eq(false));
- EXPECT_THAT(info.has_view_all_action(), Eq(false));
+ EXPECT_THAT(info.additional_action(),
+ Eq(ContentSuggestionsAdditionalAction::NONE));
EXPECT_THAT(info.show_if_empty(), Eq(false));
}

Powered by Google App Engine
This is Rietveld 408576698