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

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

Issue 2618893003: 📰 Tweak the suggestion ranks for UMA to handle fetchMore (Closed)
Patch Set: rebase, address comments 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
« no previous file with comments | « chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SectionListTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
index 1336e85b1d0823e050478cebd5c1b46e42ae859a..5d965e19da582aa03c92a1cf15dacb3417a78a9d 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
@@ -39,6 +39,8 @@
import org.chromium.chrome.browser.ntp.snippets.SnippetArticle;
import org.chromium.chrome.browser.ntp.snippets.SuggestionsSource;
import org.chromium.chrome.browser.offlinepages.OfflinePageItem;
+import org.chromium.chrome.browser.suggestions.SuggestionsMetricsReporter;
+import org.chromium.chrome.browser.suggestions.SuggestionsRanker;
import org.chromium.testing.local.LocalRobolectricTestRunner;
import java.util.Arrays;
@@ -462,7 +464,8 @@ private SuggestionsSection createSectionWithReloadAction(boolean hasReloadAction
}
private SuggestionsSection createSection(SuggestionsCategoryInfo info) {
- SuggestionsSection section = new SuggestionsSection(mDelegate, mManager, mBridge, info);
+ SuggestionsSection section = new SuggestionsSection(
+ mDelegate, mManager, mock(SuggestionsRanker.class), mBridge, info);
section.setParent(mParent);
return section;
}
@@ -475,6 +478,8 @@ private static void verifyAction(SuggestionsSection section, @ActionItem.Action
SuggestionsSource suggestionsSource = mock(SuggestionsSource.class);
NewTabPageManager manager = mock(NewTabPageManager.class);
when(manager.getSuggestionsSource()).thenReturn(suggestionsSource);
+ when(manager.getSuggestionsMetricsReporter())
+ .thenReturn(mock(SuggestionsMetricsReporter.class));
if (action != ActionItem.ACTION_NONE) {
section.getActionItem().performAction(manager);
« no previous file with comments | « chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SectionListTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698