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

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

Issue 2593573003: Ntp: use AMP urls for content suggestions when available. (Closed)
Patch Set: Address review comments by vitalii. Created 4 years 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 60530784490d83cc78bb9a4fc35d7db8d79d725f..69e93304db439ab18e3d64f07c220ed17d49e933 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
@@ -211,8 +211,8 @@ public class NewTabPageAdapterTest {
// The adapter should ignore any new incoming data.
mSource.setSuggestionsForCategory(KnownCategories.ARTICLES,
- Arrays.asList(new SnippetArticle[] {new SnippetArticle(0, "foo", "title1", "pub1",
- "txt1", "foo", "bar", 0, 0, 0)}));
+ Arrays.asList(new SnippetArticle[] {
+ new SnippetArticle(0, "foo", "title1", "pub1", "txt1", "url", 0, 0, 0)}));
assertItemsFor(section(numSuggestions));
}
@@ -239,8 +239,8 @@ public class NewTabPageAdapterTest {
// The adapter should ignore any new incoming data.
mSource.setSuggestionsForCategory(KnownCategories.ARTICLES,
- Arrays.asList(new SnippetArticle[] {new SnippetArticle(0, "foo", "title1", "pub1",
- "txt1", "foo", "bar", 0, 0, 0)}));
+ Arrays.asList(new SnippetArticle[] {
+ new SnippetArticle(0, "foo", "title1", "pub1", "txt1", "url", 0, 0, 0)}));
assertItemsFor(section(numSuggestions));
}
@@ -288,7 +288,7 @@ public class NewTabPageAdapterTest {
// 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", "https://amp.site.com/url1", 0, 0, 0));
+ "https://site.com/url1", 0, 0, 0));
mSource.setSuggestionsForCategory(KnownCategories.ARTICLES, suggestions);
assertItemsFor(section(3));

Powered by Google App Engine
This is Rietveld 408576698