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

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

Issue 2860463002: [Suggestions] Remove TreeNode.getSuggestionAt() in favor of a visitor. (Closed)
Patch Set: review Created 3 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/InnerNodeTest.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/InnerNodeTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/InnerNodeTest.java
index 9bbc0f3a255be61c2228ce1fa8e8c440213ccaa7..faa2b2c73caa3e22409c452c60d6c92b9dc32739 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/InnerNodeTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/InnerNodeTest.java
@@ -26,7 +26,6 @@ import org.mockito.MockitoAnnotations;
import org.robolectric.annotation.Config;
import org.chromium.chrome.browser.ntp.cards.NewTabPageViewHolder.PartialBindCallback;
-import org.chromium.chrome.browser.ntp.snippets.SnippetArticle;
import org.chromium.testing.local.LocalRobolectricTestRunner;
import java.util.ArrayList;
@@ -91,24 +90,6 @@ public class InnerNodeTest {
}
@Test
- public void testGetSuggestion() {
- SnippetArticle article1 = mock(SnippetArticle.class);
- SnippetArticle article2 = mock(SnippetArticle.class);
- SnippetArticle article3 = mock(SnippetArticle.class);
- SnippetArticle article4 = mock(SnippetArticle.class);
-
- when(mChildren.get(0).getSuggestionAt(0)).thenReturn(article1);
- when(mChildren.get(2).getSuggestionAt(2)).thenReturn(article2);
- when(mChildren.get(4).getSuggestionAt(0)).thenReturn(article3);
- when(mChildren.get(6).getSuggestionAt(0)).thenReturn(article4);
-
- assertThat(mInnerNode.getSuggestionAt(0), is(article1));
- assertThat(mInnerNode.getSuggestionAt(5), is(article2));
- assertThat(mInnerNode.getSuggestionAt(6), is(article3));
- assertThat(mInnerNode.getSuggestionAt(11), is(article4));
- }
-
- @Test
public void testAddChild() {
final int itemCountBefore = mInnerNode.getItemCount();

Powered by Google App Engine
This is Rietveld 408576698