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..7b3cb808392878d9ca67bd5487b7c47b1de6403d 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 |
@@ -35,10 +35,12 @@ |
import org.chromium.chrome.browser.EnableFeatures; |
import org.chromium.chrome.browser.ntp.NewTabPageView.NewTabPageManager; |
import org.chromium.chrome.browser.ntp.cards.ContentSuggestionsTestUtils.CategoryInfoBuilder; |
+import org.chromium.chrome.browser.ntp.cards.SectionList.SuggestionRanker; |
import org.chromium.chrome.browser.ntp.snippets.CategoryStatus; |
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; |
@@ -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(SuggestionRanker.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); |