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

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 and fix findbugs warning 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/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 7802f8ab7994ddfa60b0ef4c561b919eb47422f0..b32e0c79606c9278c3bb8f378be012c99402b3d7 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,7 @@
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.testing.local.LocalRobolectricTestRunner;
import java.util.Arrays;
@@ -389,6 +390,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);

Powered by Google App Engine
This is Rietveld 408576698