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

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

Issue 1921553004: Add favicon and publisher name to snippet cards (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change unit test to use non-C++ 11 STL functions Created 4 years, 7 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 b1e03567dd9087b4edb149a0af67495f2895bdbf..38a9d0e32d2d93751e94a6ccd67c2e701f2e15f8 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
@@ -64,9 +64,12 @@ public class NewTabPageAdapterTest {
assertEquals(NewTabPageListItem.VIEW_TYPE_ABOVE_THE_FOLD, ntpa.getItemViewType(0));
List<SnippetArticle> snippets = Arrays.asList(new SnippetArticle[] {
- new SnippetArticle("title1", "pub1", "txt1", "https://site.com/url1", null, 0, 0),
- new SnippetArticle("title2", "pub2", "txt2", "https://site.com/url2", null, 0, 0),
- new SnippetArticle("title3", "pub3", "txt3", "https://site.com/url3", null, 0, 0)});
+ new SnippetArticle("title1", "pub1", "txt1", "https://site.com/url1",
+ "https://amp.site.com/url1", null, 0, 0),
+ new SnippetArticle("title2", "pub2", "txt2", "https://site.com/url2",
+ "https://amp.site.com/url1", null, 0, 0),
+ new SnippetArticle("title3", "pub3", "txt3", "https://site.com/url3",
+ "https://amp.site.com/url1", null, 0, 0)});
mSnippetsObserver.onSnippetsReceived(snippets);
List<NewTabPageListItem> loadedItems = ntpa.getItemsForTesting();
@@ -93,8 +96,10 @@ public class NewTabPageAdapterTest {
// We should load new snippets when we get notified about them.
List<SnippetArticle> snippets = Arrays.asList(new SnippetArticle[] {
- new SnippetArticle("title1", "pub1", "txt1", "https://site.com/url1", null, 0, 0),
- new SnippetArticle("title2", "pub2", "txt2", "https://site.com/url2", null, 0, 0)});
+ new SnippetArticle("title1", "pub1", "txt1", "https://site.com/url1",
+ "https://amp.site.com/url1", null, 0, 0),
+ new SnippetArticle("title2", "pub2", "txt2", "https://site.com/url2",
+ "https://amp.site.com/url1", null, 0, 0)});
mSnippetsObserver.onSnippetsReceived(snippets);
List<NewTabPageListItem> loadedItems = ntpa.getItemsForTesting();
assertEquals(NewTabPageListItem.VIEW_TYPE_ABOVE_THE_FOLD, ntpa.getItemViewType(0));

Powered by Google App Engine
This is Rietveld 408576698