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

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

Issue 2235463002: Change Snippet layout based on Category. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge in master. Created 4 years, 4 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/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 f05387bdde2db5f3884ffa2151982872dfcc7c16..e2a15cf370b439d3dad0524c8a310ac33cf58b5c 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
@@ -216,7 +216,8 @@ public class NewTabPageAdapterTest {
// The adapter should ignore any new incoming data.
mSnippetsSource.setSuggestionsForCategory(KnownCategories.ARTICLES,
Arrays.asList(new SnippetArticleListItem[] {new SnippetArticleListItem(
- "foo", "title1", "pub1", "txt1", "foo", "bar", 0, 0, 0)}));
+ "foo", "title1", "pub1", "txt1", "foo", "bar", 0, 0, 0,
+ ContentSuggestionsCardLayout.FULL_CARD)}));
assertEquals(loadedItems, mNtpAdapter.getItems());
}
@@ -253,7 +254,8 @@ public class NewTabPageAdapterTest {
// The adapter should ignore any new incoming data.
mSnippetsSource.setSuggestionsForCategory(KnownCategories.ARTICLES,
Arrays.asList(new SnippetArticleListItem[] {new SnippetArticleListItem(
- "foo", "title1", "pub1", "txt1", "foo", "bar", 0, 0, 0)}));
+ "foo", "title1", "pub1", "txt1", "foo", "bar", 0, 0, 0,
+ ContentSuggestionsCardLayout.FULL_CARD)}));
assertEquals(loadedItems, mNtpAdapter.getItems());
}
@@ -304,7 +306,8 @@ public class NewTabPageAdapterTest {
// If we have snippets, we should not load the new list (i.e. the extra item does *not*
// appear).
snippets.add(new SnippetArticleListItem("https://site.com/url1", "title1", "pub1", "txt1",
- "https://site.com/url1", "https://amp.site.com/url1", 0, 0, 0));
+ "https://site.com/url1", "https://amp.site.com/url1", 0, 0, 0,
+ ContentSuggestionsCardLayout.FULL_CARD));
mSnippetsSource.setSuggestionsForCategory(KnownCategories.ARTICLES, snippets);
assertItemsFor(section(3));
@@ -387,7 +390,8 @@ public class NewTabPageAdapterTest {
for (int index = 0; index < count; index++) {
snippets.add(new SnippetArticleListItem("https://site.com/url" + index, "title" + index,
"pub" + index, "txt" + index, "https://site.com/url" + index,
- "https://amp.site.com/url" + index, 0, 0, 0));
+ "https://amp.site.com/url" + index, 0, 0, 0,
+ ContentSuggestionsCardLayout.FULL_CARD));
}
return snippets;
}

Powered by Google App Engine
This is Rietveld 408576698