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

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/ContentSuggestionsTestUtils.java

Issue 2663313002: 📰 Merge the has_fetch_more and has_reload actions (Closed)
Patch Set: fix tests pt 2 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: chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/ContentSuggestionsTestUtils.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/ContentSuggestionsTestUtils.java b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/ContentSuggestionsTestUtils.java
index b0f9295e5b5264fed266b8dc3332bf8e11f183ab..2dcf99b89006557ad2dcc3a5c00e1e6f31978ee6 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/ContentSuggestionsTestUtils.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/ContentSuggestionsTestUtils.java
@@ -47,7 +47,7 @@ private ContentSuggestionsTestUtils() {}
@CategoryInt int category, int suggestionCount) {
// Important: showIfEmpty flag to true.
SuggestionsCategoryInfo categoryInfo =
- new CategoryInfoBuilder(category).withReloadAction().showIfEmpty().build();
+ new CategoryInfoBuilder(category).withFetchAction().showIfEmpty().build();
return registerCategory(suggestionsSource, categoryInfo, suggestionCount);
}
@@ -101,9 +101,8 @@ public static String viewTypeToString(@ItemViewType int viewType) {
public static class CategoryInfoBuilder {
@CategoryInt
private final int mCategory;
- private boolean mHasMoreAction;
+ private boolean mHasFetchAction;
private boolean mHasViewAllAction;
- private boolean mHasReloadAction;
private boolean mShowIfEmpty;
private String mTitle = "";
private String mNoSuggestionsMessage = "";
@@ -114,8 +113,8 @@ public CategoryInfoBuilder(@CategoryInt int category) {
mCategory = category;
}
- public CategoryInfoBuilder withMoreAction() {
- mHasMoreAction = true;
+ public CategoryInfoBuilder withFetchAction() {
+ mHasFetchAction = true;
return this;
}
@@ -124,11 +123,6 @@ public CategoryInfoBuilder withViewAllAction() {
return this;
}
- public CategoryInfoBuilder withReloadAction() {
- mHasReloadAction = true;
- return this;
- }
-
public CategoryInfoBuilder showIfEmpty() {
mShowIfEmpty = true;
return this;
@@ -151,8 +145,8 @@ public CategoryInfoBuilder withCardLayout(
}
public SuggestionsCategoryInfo build() {
- return new SuggestionsCategoryInfo(mCategory, mTitle, mCardLayout, mHasMoreAction,
- mHasReloadAction, mHasViewAllAction, mShowIfEmpty, mNoSuggestionsMessage);
+ return new SuggestionsCategoryInfo(mCategory, mTitle, mCardLayout, mHasFetchAction,
+ mHasViewAllAction, mShowIfEmpty, mNoSuggestionsMessage);
}
}

Powered by Google App Engine
This is Rietveld 408576698