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

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

Issue 2196273002: Zine: support multiple sections in the ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 4bea2a1d365fb8678d47cfbc72509b1bcee025f7..7a46989cf05c4dc29728f2648f1986acaf195bf9 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
@@ -75,7 +75,7 @@ public class NewTabPageAdapterTest {
List<SnippetArticleListItem> snippets = createDummySnippets();
mSnippetsObserver.onSnippetsReceived(snippets);
- List<NewTabPageListItem> loadedItems = new ArrayList<>(ntpa.getItemsForTesting());
+ List<NewTabPageListItem> loadedItems = new ArrayList<>(ntpa.getItems());
assertEquals(NewTabPageListItem.VIEW_TYPE_ABOVE_THE_FOLD, ntpa.getItemViewType(0));
assertEquals(NewTabPageListItem.VIEW_TYPE_HEADER, ntpa.getItemViewType(1));
assertEquals(snippets, loadedItems.subList(2, loadedItems.size() - 1));
@@ -86,7 +86,7 @@ public class NewTabPageAdapterTest {
mSnippetsObserver.onSnippetsReceived(
Arrays.asList(new SnippetArticleListItem[] {new SnippetArticleListItem(
"foo", "title1", "pub1", "txt1", "foo", "bar", 0, 0, 0)}));
- assertEquals(loadedItems, ntpa.getItemsForTesting());
+ assertEquals(loadedItems, ntpa.getItems());
}
/**
@@ -110,7 +110,7 @@ public class NewTabPageAdapterTest {
// We should load new snippets when we get notified about them.
List<SnippetArticleListItem> snippets = createDummySnippets();
mSnippetsObserver.onSnippetsReceived(snippets);
- List<NewTabPageListItem> loadedItems = new ArrayList<>(ntpa.getItemsForTesting());
+ List<NewTabPageListItem> loadedItems = new ArrayList<>(ntpa.getItems());
assertEquals(NewTabPageListItem.VIEW_TYPE_ABOVE_THE_FOLD, ntpa.getItemViewType(0));
assertEquals(NewTabPageListItem.VIEW_TYPE_HEADER, ntpa.getItemViewType(1));
assertEquals(snippets, loadedItems.subList(2, loadedItems.size() - 1));
@@ -121,7 +121,7 @@ public class NewTabPageAdapterTest {
mSnippetsObserver.onSnippetsReceived(
Arrays.asList(new SnippetArticleListItem[] {new SnippetArticleListItem(
"foo", "title1", "pub1", "txt1", "foo", "bar", 0, 0, 0)}));
- assertEquals(loadedItems, ntpa.getItemsForTesting());
+ assertEquals(loadedItems, ntpa.getItems());
}
/**

Powered by Google App Engine
This is Rietveld 408576698