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

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

Issue 2663313002: 📰 Merge the has_fetch_more and has_reload actions (Closed)
Patch Set: rebase Created 3 years, 11 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_fetcher_unittest.cc
diff --git a/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc
index 86b4bb16f38d2db9247a30d3ad01ae7250395e85..14ac6b11058cd907a5a27a2c85540503409cd60d 100644
--- a/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc
+++ b/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc
@@ -115,12 +115,8 @@ MATCHER_P(IsSingleArticle, url, "is a list with the single article %(url)s") {
}
MATCHER(IsCategoryInfoForArticles, "") {
- if (!arg.has_more_action()) {
- *result_listener << "missing expected has_more_action";
- return false;
- }
- if (!arg.has_reload_action()) {
- *result_listener << "missing expected has_reload_action";
+ if (!arg.has_fetch_action()) {
+ *result_listener << "missing expected has_fetc_action";
return false;
}
if (arg.has_view_all_action()) {
@@ -558,8 +554,7 @@ TEST_F(NTPSnippetsContentSuggestionsFetcherTest, ServerCategories) {
} else if (category.category == Category::FromRemoteCategory(2)) {
ASSERT_THAT(articles.size(), Eq(1u));
EXPECT_THAT(articles[0]->url().spec(), Eq("http://localhost/foo2"));
- EXPECT_THAT(category.info.has_more_action(), Eq(true));
- EXPECT_THAT(category.info.has_reload_action(), Eq(true));
+ EXPECT_THAT(category.info.has_fetch_action(), Eq(true));
EXPECT_THAT(category.info.has_view_all_action(), Eq(false));
EXPECT_THAT(category.info.show_if_empty(), Eq(false));
} else {
@@ -611,7 +606,7 @@ TEST_F(NTPSnippetsContentSuggestionsFetcherTest,
ASSERT_TRUE(fetched_categories);
ASSERT_THAT(fetched_categories->size(), Eq(1u));
- EXPECT_THAT(fetched_categories->front().info.has_more_action(), Eq(false));
+ EXPECT_THAT(fetched_categories->front().info.has_fetch_action(), Eq(false));
EXPECT_THAT(fetched_categories->front().info.title(),
Eq(base::UTF8ToUTF16("Articles for Me")));
}

Powered by Google App Engine
This is Rietveld 408576698