| Index: chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java
|
| diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java
|
| index 36f0bf7f1c99a68eedb9fcd50b7fa06d392dc531..45f5c4a419b900dfcf181b7cabe6d4efb3f75fb4 100644
|
| --- a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java
|
| +++ b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java
|
| @@ -67,6 +67,7 @@
|
| import org.chromium.chrome.browser.signin.SigninManager;
|
| import org.chromium.chrome.browser.signin.SigninManager.SignInAllowedObserver;
|
| import org.chromium.chrome.browser.signin.SigninManager.SignInStateObserver;
|
| +import org.chromium.chrome.browser.suggestions.SuggestionsMetricsReporter;
|
| import org.chromium.testing.local.LocalRobolectricTestRunner;
|
|
|
| import java.util.ArrayList;
|
| @@ -192,6 +193,8 @@ public void setUp() {
|
| new CategoryInfoBuilder(category).showIfEmpty().build());
|
|
|
| when(mNewTabPageManager.getSuggestionsSource()).thenReturn(mSource);
|
| + when(mNewTabPageManager.getSuggestionsMetricsReporter())
|
| + .thenReturn(mock(SuggestionsMetricsReporter.class));
|
| when(mNewTabPageManager.isCurrentPage()).thenReturn(true);
|
|
|
| reloadNtp();
|
| @@ -223,7 +226,7 @@ public void testSuggestionLoading() {
|
| // The adapter should ignore any new incoming data.
|
| mSource.setSuggestionsForCategory(KnownCategories.ARTICLES,
|
| Arrays.asList(new SnippetArticle[] {
|
| - new SnippetArticle(0, "foo", "title1", "pub1", "txt1", "url", 0, 0, 0)}));
|
| + new SnippetArticle(0, "foo", "title1", "pub1", "txt1", "url", 0, 0)}));
|
|
|
| assertItemsFor(section(numSuggestions));
|
| }
|
| @@ -251,7 +254,7 @@ public void testSuggestionLoadingInitiallyEmpty() {
|
| // The adapter should ignore any new incoming data.
|
| mSource.setSuggestionsForCategory(KnownCategories.ARTICLES,
|
| Arrays.asList(new SnippetArticle[] {
|
| - new SnippetArticle(0, "foo", "title1", "pub1", "txt1", "url", 0, 0, 0)}));
|
| + new SnippetArticle(0, "foo", "title1", "pub1", "txt1", "url", 0, 0)}));
|
| assertItemsFor(section(numSuggestions));
|
| }
|
|
|
| @@ -299,7 +302,7 @@ public void testSuggestionLoadingBlock() {
|
| // If we have snippets, we should not load the new list (i.e. the extra item does *not*
|
| // appear).
|
| suggestions.add(new SnippetArticle(0, "https://site.com/url1", "title1", "pub1", "txt1",
|
| - "https://site.com/url1", 0, 0, 0));
|
| + "https://site.com/url1", 0, 0));
|
| mSource.setSuggestionsForCategory(KnownCategories.ARTICLES, suggestions);
|
| assertItemsFor(section(3));
|
|
|
|
|