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

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

Issue 2667803005: 📰 Remove the NTP_SUGGESTIONS_SECTION_DISMISSAL feature flag (Closed)
Patch Set: only NTP_SUGGESTIONS_SECTION_DISMISSAL Created 3 years, 11 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/SuggestionsSectionTest.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
index 198e424eff679497d1bc0862fb25483b6dbcb1b8..3e105599f1aa22beb1a123ce1c3a55341807e16c 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
@@ -37,7 +37,6 @@
import org.chromium.base.Callback;
import org.chromium.base.test.util.Feature;
-import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.DisableHistogramsRule;
import org.chromium.chrome.browser.EnableFeatures;
import org.chromium.chrome.browser.ntp.cards.ContentSuggestionsTestUtils.CategoryInfoBuilder;
@@ -92,7 +91,6 @@ public void setUp() {
@Test
@Feature({"Ntp"})
- @EnableFeatures(ChromeFeatureList.NTP_SUGGESTIONS_SECTION_DISMISSAL)
public void testDismissSibling() {
List<SnippetArticle> snippets = createDummySuggestions(3, TEST_CATEGORY_ID);
SuggestionsSection section = createSectionWithReloadAction(true);
@@ -118,32 +116,6 @@ public void testDismissSibling() {
@Test
@Feature({"Ntp"})
- @EnableFeatures({})
- public void testDismissSiblingWithSectionDismissalDisabled() {
- List<SnippetArticle> snippets = createDummySuggestions(3, TEST_CATEGORY_ID);
- SuggestionsSection section = createSectionWithReloadAction(true);
-
- section.setStatus(CategoryStatus.AVAILABLE);
- assertNotNull(section.getActionItemForTesting());
-
- // Without snippets.
- assertEquals(ItemViewType.HEADER, section.getItemViewType(0));
- assertEquals(Collections.emptySet(), section.getItemDismissalGroup(0));
- assertEquals(ItemViewType.STATUS, section.getItemViewType(1));
- assertEquals(Collections.emptySet(), section.getItemDismissalGroup(1));
- assertEquals(ItemViewType.ACTION, section.getItemViewType(2));
- assertEquals(Collections.emptySet(), section.getItemDismissalGroup(2));
-
- // With snippets.
- section.setSuggestions(snippets, CategoryStatus.AVAILABLE, /* replaceExisting = */ true);
- assertEquals(ItemViewType.HEADER, section.getItemViewType(0));
- assertEquals(Collections.emptySet(), section.getItemDismissalGroup(0));
- assertEquals(ItemViewType.SNIPPET, section.getItemViewType(1));
- assertEquals(Collections.singleton(1), section.getItemDismissalGroup(1));
- }
-
- @Test
- @Feature({"Ntp"})
public void testAddSuggestionsNotification() {
final int suggestionCount = 5;
List<SnippetArticle> snippets = createDummySuggestions(suggestionCount,
@@ -259,7 +231,6 @@ public void testRemoveSuggestionNotificationWithButton() {
@Test
@Feature({"Ntp"})
- @EnableFeatures({ChromeFeatureList.NTP_SUGGESTIONS_SECTION_DISMISSAL})
public void testDismissSection() {
SuggestionsSection section = createSectionWithReloadAction(false);
section.setStatus(CategoryStatus.AVAILABLE);
@@ -724,7 +695,6 @@ public void testCardIsNotifiedWhenBecomingSoleCard() {
@Test
@Feature({"Ntp"})
- @EnableFeatures(ChromeFeatureList.NTP_SUGGESTIONS_SECTION_DISMISSAL)
public void testGetItemDismissalGroupWithSuggestions() {
List<SnippetArticle> suggestions = createDummySuggestions(5, TEST_CATEGORY_ID);
SuggestionsSection section = createSectionWithReloadAction(false);
@@ -736,7 +706,6 @@ public void testGetItemDismissalGroupWithSuggestions() {
@Test
@Feature({"Ntp"})
- @EnableFeatures(ChromeFeatureList.NTP_SUGGESTIONS_SECTION_DISMISSAL)
public void testGetItemDismissalGroupWithActionItem() {
SuggestionsSection section = createSectionWithReloadAction(true);
assertThat(section.getItemDismissalGroup(1).size(), is(2));
@@ -745,7 +714,6 @@ public void testGetItemDismissalGroupWithActionItem() {
@Test
@Feature({"Ntp"})
- @EnableFeatures(ChromeFeatureList.NTP_SUGGESTIONS_SECTION_DISMISSAL)
public void testGetItemDismissalGroupWithoutActionItem() {
SuggestionsSection section = createSectionWithReloadAction(false);
assertThat(section.getItemDismissalGroup(1).size(), is(1));

Powered by Google App Engine
This is Rietveld 408576698