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

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

Issue 2623993007: 🏠 Extract the ContentSuggestionManager interface from NTP (Closed)
Patch Set: Fix tests 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..8b0cd2ef1f72fbb3d105427b1128c27a3d47bf7b 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
@@ -33,12 +33,12 @@
import org.chromium.base.test.util.Feature;
import org.chromium.chrome.browser.ChromeFeatureList;
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.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.ContentSuggestionsManager;
import org.chromium.testing.local.LocalRobolectricTestRunner;
import java.util.Arrays;
@@ -54,7 +54,8 @@
private SuggestionsSection.Delegate mDelegate;
@Mock
private NodeParent mParent;
- @Mock private NewTabPageManager mManager;
+ @Mock
+ private ContentSuggestionsManager mManager;
private FakeOfflinePageBridge mBridge;
@Before
@@ -387,7 +388,7 @@ private OfflinePageItem createOfflinePageItem(String url, long offlineId) {
private static void verifyAction(SuggestionsSection section, @ActionItem.Action int action) {
SuggestionsSource suggestionsSource = mock(SuggestionsSource.class);
- NewTabPageManager manager = mock(NewTabPageManager.class);
+ ContentSuggestionsManager manager = mock(ContentSuggestionsManager.class);
when(manager.getSuggestionsSource()).thenReturn(suggestionsSource);
if (action != ActionItem.ACTION_NONE) {

Powered by Google App Engine
This is Rietveld 408576698