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

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

Issue 2470913009: 📰 Refactor SuggestionsSection change detection (Closed)
Patch Set: address comments Created 4 years, 1 month 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 191e3af7a2537ebeac8eb27c99b83395ba9a4a88..24f21daf71de4107323e94e7e1bd1b44d1d46a20 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
@@ -28,6 +28,7 @@ private ContentSuggestionsTestUtils() {}
return suggestions;
}
+ @Deprecated
public static SuggestionsCategoryInfo createInfo(
@CategoryInt int category, boolean moreButton, boolean showIfEmpty) {
return createInfo(category, false, true, moreButton, showIfEmpty);
@@ -39,9 +40,11 @@ public static SuggestionsCategoryInfo createInfo(@CategoryInt int category, bool
moreAction, reloadAction, viewAllAction, showIfEmpty, "");
}
- public static SuggestionsSection createSection(boolean moreButton, boolean showIfEmpty,
- NodeParent parent, NewTabPageManager manager, OfflinePageDownloadBridge bridge) {
- SuggestionsCategoryInfo info = createInfo(42, moreButton, showIfEmpty);
- return new SuggestionsSection(parent, info, manager, bridge);
+ public static SuggestionsSection createSection(boolean hasReloadAction, NodeParent parent,
+ NewTabPageManager manager, OfflinePageDownloadBridge bridge) {
+ return new SuggestionsSection(parent,
+ createInfo(42, /*hasMoreAction=*/false, /*hasReloadAction=*/hasReloadAction,
+ /*hasViewAllAction=*/false, /*showIfEmpty=*/true),
+ manager, bridge);
}
}

Powered by Google App Engine
This is Rietveld 408576698