Remove All dismissed dialog and image

Bug: 915305, 950166
Change-Id: I1cdf7762b954db4e93be6e94aeb8d87b07c0c614
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1562075
Commit-Queue: Sinan Sahin <sinansahin@google.com>
Reviewed-by: Theresa <twellington@chromium.org>
Reviewed-by: Becky Zhou <huayinz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652412}
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
index ffb9903..dfc9c50 100644
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -1018,7 +1018,6 @@
   "java/src/org/chromium/chrome/browser/ntp/TitleUtil.java",
   "java/src/org/chromium/chrome/browser/ntp/cards/AboveTheFoldItem.java",
   "java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java",
-  "java/src/org/chromium/chrome/browser/ntp/cards/AllDismissedItem.java",
   "java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java",
   "java/src/org/chromium/chrome/browser/ntp/cards/CardsVariationParameters.java",
   "java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java",
diff --git a/chrome/android/chrome_test_java_sources.gni b/chrome/android/chrome_test_java_sources.gni
index 917a97b..81da070e 100644
--- a/chrome/android/chrome_test_java_sources.gni
+++ b/chrome/android/chrome_test_java_sources.gni
@@ -254,7 +254,6 @@
   "javatests/src/org/chromium/chrome/browser/ntp/NewTabPageUiCaptureTest.java",
   "javatests/src/org/chromium/chrome/browser/ntp/NtpUiCaptureTestData.java",
   "javatests/src/org/chromium/chrome/browser/ntp/RecentTabsPageTest.java",
-  "javatests/src/org/chromium/chrome/browser/ntp/cards/AllDismissedItemTest.java",
   "javatests/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerViewTest.java",
   "javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java",
   "javatests/src/org/chromium/chrome/browser/offlinepages/MHTMLPageTest.java",
diff --git a/chrome/android/java/res/drawable-hdpi/ntp_all_dismissed_white.webp b/chrome/android/java/res/drawable-hdpi/ntp_all_dismissed_white.webp
deleted file mode 100644
index c6440f9..0000000
--- a/chrome/android/java/res/drawable-hdpi/ntp_all_dismissed_white.webp
+++ /dev/null
Binary files differ
diff --git a/chrome/android/java/res/drawable-mdpi/ntp_all_dismissed_white.webp b/chrome/android/java/res/drawable-mdpi/ntp_all_dismissed_white.webp
deleted file mode 100644
index 609246b..0000000
--- a/chrome/android/java/res/drawable-mdpi/ntp_all_dismissed_white.webp
+++ /dev/null
Binary files differ
diff --git a/chrome/android/java/res/drawable-xhdpi/ntp_all_dismissed_white.webp b/chrome/android/java/res/drawable-xhdpi/ntp_all_dismissed_white.webp
deleted file mode 100644
index c8e987c..0000000
--- a/chrome/android/java/res/drawable-xhdpi/ntp_all_dismissed_white.webp
+++ /dev/null
Binary files differ
diff --git a/chrome/android/java/res/drawable-xxhdpi/ntp_all_dismissed_white.webp b/chrome/android/java/res/drawable-xxhdpi/ntp_all_dismissed_white.webp
deleted file mode 100644
index fdc3b9d..0000000
--- a/chrome/android/java/res/drawable-xxhdpi/ntp_all_dismissed_white.webp
+++ /dev/null
Binary files differ
diff --git a/chrome/android/java/res/drawable-xxxhdpi/ntp_all_dismissed_white.webp b/chrome/android/java/res/drawable-xxxhdpi/ntp_all_dismissed_white.webp
deleted file mode 100644
index 2022017..0000000
--- a/chrome/android/java/res/drawable-xxxhdpi/ntp_all_dismissed_white.webp
+++ /dev/null
Binary files differ
diff --git a/chrome/android/java/res/layout/content_suggestions_all_dismissed_card_modern.xml b/chrome/android/java/res/layout/content_suggestions_all_dismissed_card_modern.xml
deleted file mode 100644
index 9cde1ac..0000000
--- a/chrome/android/java/res/layout/content_suggestions_all_dismissed_card_modern.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright 2017 The Chromium Authors. All rights reserved.
-     Use of this source code is governed by a BSD-style license that can be
-     found in the LICENSE file. -->
-
-<RelativeLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:padding="@dimen/snippets_padding"
-    android:paddingTop="0dp"
-    android:paddingBottom="4dp">
-
-    <ImageView
-        android:id="@+id/image"
-        android:layout_width="112dp"
-        android:layout_height="112dp"
-        android:layout_alignParentTop="true"
-        android:layout_centerHorizontal="true"
-        android:layout_marginBottom="18dp"
-        android:layout_marginStart="8dp"
-        android:layout_marginEnd="8dp"
-        tools:ignore="ContentDescription"
-        android:importantForAccessibility="no"
-        android:src="@drawable/ntp_all_dismissed_white" />
-
-    <org.chromium.ui.widget.TextViewWithLeading
-        android:id="@+id/title_text"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/image"
-        android:layout_alignParentStart="true"
-        android:layout_marginBottom="8dp"
-        android:gravity="center_horizontal"
-        android:text="@string/ntp_title_no_suggestions"
-        android:textAppearance="@style/TextAppearance.BlackTitle1"
-        app:leading="24dp" />
-
-    <org.chromium.ui.widget.TextViewWithLeading
-        android:id="@+id/body_text"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/title_text"
-        android:layout_alignParentStart="true"
-        android:gravity="center_horizontal"
-        android:text="@string/ntp_all_dismissed_body_text_morning"
-        android:textAppearance="@style/TextAppearance.BlackBody"
-        app:leading="20dp" />
-
-    <org.chromium.ui.widget.ButtonCompat
-        android:id="@+id/action_button"
-        style="@style/SuggestionCardAction"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/body_text"
-        android:layout_centerHorizontal="true"
-        android:layout_marginTop="12dp"
-        android:text="@string/ntp_all_dismissed_refresh" />
-</RelativeLayout>
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/AllDismissedItem.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/AllDismissedItem.java
deleted file mode 100644
index 962d78b..0000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/AllDismissedItem.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.ntp.cards;
-
-import android.support.annotation.LayoutRes;
-import android.support.annotation.StringRes;
-import android.view.LayoutInflater;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-import org.chromium.chrome.R;
-import org.chromium.chrome.browser.ntp.NewTabPageUma;
-
-import java.util.Calendar;
-
-/**
- * Displayed when all suggested content and their sections have been dismissed. Provides a button
- * to restore the dismissed sections and load new suggestions from the server.
- */
-public class AllDismissedItem extends OptionalLeaf {
-    @Override
-    @ItemViewType
-    public int getItemViewType() {
-        return ItemViewType.ALL_DISMISSED;
-    }
-
-    @Override
-    public void onBindViewHolder(NewTabPageViewHolder holder) {
-        ((ViewHolder) holder).onBindViewHolder(Calendar.getInstance().get(Calendar.HOUR_OF_DAY));
-    }
-
-    @Override
-    public String describeForTesting() {
-        return "ALL_DISMISSED";
-    }
-
-    public void setVisible(boolean visible) {
-        setVisibilityInternal(visible);
-    }
-
-    /**
-     * ViewHolder for an item of type {@link ItemViewType#ALL_DISMISSED}.
-     */
-    public static class ViewHolder extends NewTabPageViewHolder {
-        private final TextView mBodyTextView;
-
-        public ViewHolder(ViewGroup root, final SectionList sections) {
-            super(LayoutInflater.from(root.getContext()).inflate(getLayout(), root, false));
-            mBodyTextView = itemView.findViewById(R.id.body_text);
-
-            itemView.findViewById(R.id.action_button).setOnClickListener(v -> {
-                NewTabPageUma.recordAction(NewTabPageUma.ACTION_CLICKED_ALL_DISMISSED_REFRESH);
-                sections.restoreDismissedSections();
-            });
-        }
-
-        public void onBindViewHolder(int hourOfDay) {
-            @StringRes
-            final int messageId;
-            if (hourOfDay >= 0 && hourOfDay < 12) {
-                messageId = R.string.ntp_all_dismissed_body_text_morning;
-            } else if (hourOfDay >= 12 && hourOfDay < 17) {
-                messageId = R.string.ntp_all_dismissed_body_text_afternoon;
-            } else {
-                messageId = R.string.ntp_all_dismissed_body_text_evening;
-            }
-            mBodyTextView.setText(messageId);
-        }
-
-        @LayoutRes
-        private static int getLayout() {
-            return R.layout.content_suggestions_all_dismissed_card_modern;
-        }
-    }
-}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java
index 5e59a72..60aedfa 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java
@@ -142,7 +142,6 @@
             case ItemViewType.HEADER:
             case ItemViewType.PROGRESS:
             case ItemViewType.FOOTER:
-            case ItemViewType.ALL_DISMISSED:
                 return false;
         }
         assert false;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ItemViewType.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ItemViewType.java
index 17ef146..ab2f206 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ItemViewType.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ItemViewType.java
@@ -17,7 +17,7 @@
  */
 @IntDef({ItemViewType.ABOVE_THE_FOLD, ItemViewType.HEADER, ItemViewType.SNIPPET,
         ItemViewType.STATUS, ItemViewType.PROGRESS, ItemViewType.ACTION, ItemViewType.FOOTER,
-        ItemViewType.PROMO, ItemViewType.ALL_DISMISSED})
+        ItemViewType.PROMO})
 @Retention(RetentionPolicy.SOURCE)
 public @interface ItemViewType {
     /**
@@ -68,10 +68,4 @@
      * @see Adapter#getItemViewType(int)
      */
     int PROMO = 8;
-    /**
-     * View type for a {@link AllDismissedItem}.
-     *
-     * @see Adapter#getItemViewType(int)
-     */
-    int ALL_DISMISSED = 9;
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java
index fda5792..f67524f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java
@@ -51,7 +51,6 @@
     private final InnerNode<NewTabPageViewHolder, PartialBindCallback> mRoot;
 
     private final SectionList mSections;
-    private final AllDismissedItem mAllDismissed;
     private final Footer mFooter;
 
     private final RemoteSuggestionsStatusObserver mRemoteSuggestionsStatusObserver;
@@ -76,10 +75,9 @@
         mUiConfig = uiConfig;
         mRoot = new InnerNode<>();
         mSections = new SectionList(mUiDelegate, offlinePageBridge);
-        mAllDismissed = new AllDismissedItem();
 
         if (mAboveTheFoldView != null) mRoot.addChildren(new AboveTheFoldItem());
-        mRoot.addChildren(mAllDismissed, mSections);
+        mRoot.addChildren(mSections);
 
         mFooter = new Footer();
         mRoot.addChildren(mFooter);
@@ -89,7 +87,7 @@
         mRemoteSuggestionsStatusObserver = new RemoteSuggestionsStatusObserver();
         mUiDelegate.addDestructionObserver(mRemoteSuggestionsStatusObserver);
 
-        updateAllDismissedVisibility();
+        updateFooterVisibility();
         mRoot.addObserver(this);
     }
 
@@ -130,9 +128,6 @@
 
             case ItemViewType.FOOTER:
                 return new Footer.ViewHolder(mRecyclerView, mUiDelegate.getNavigationDelegate());
-
-            case ItemViewType.ALL_DISMISSED:
-                return new AllDismissedItem.ViewHolder(mRecyclerView, mSections);
         }
 
         assert false : viewType;
@@ -177,16 +172,14 @@
         return RecyclerView.NO_POSITION;
     }
 
-    private void updateAllDismissedVisibility() {
+    private void updateFooterVisibility() {
         boolean areRemoteSuggestionsEnabled =
                 mUiDelegate.getSuggestionsSource().areRemoteSuggestionsEnabled();
-        boolean allDismissed = hasAllBeenDismissed() && !areArticlesLoading();
         boolean isArticleSectionVisible = mSections.getSection(KnownCategories.ARTICLES) != null;
 
-        mAllDismissed.setVisible(areRemoteSuggestionsEnabled && allDismissed);
         // Always hide footer when in touchless mode since the learn more link will be shown in the
         // context menu.
-        mFooter.setVisible(!SuggestionsConfig.scrollToLoad() && !allDismissed
+        mFooter.setVisible(!SuggestionsConfig.scrollToLoad()
                 && (areRemoteSuggestionsEnabled || isArticleSectionVisible)
                 && SuggestionsConfig.isTouchless());
     }
@@ -213,7 +206,7 @@
         assert child == mRoot;
         notifyItemRangeInserted(itemPosition, itemCount);
 
-        updateAllDismissedVisibility();
+        updateFooterVisibility();
     }
 
     @Override
@@ -221,7 +214,7 @@
         assert child == mRoot;
         notifyItemRangeRemoved(itemPosition, itemCount);
 
-        updateAllDismissedVisibility();
+        updateFooterVisibility();
     }
 
     @Override
@@ -314,7 +307,7 @@
                 @CategoryInt int category, @CategoryStatus int newStatus) {
             if (!SnippetsBridge.isCategoryRemote(category)) return;
 
-            updateAllDismissedVisibility();
+            updateFooterVisibility();
         }
 
         @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusCardViewHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusCardViewHolder.java
index 94deba8..5933b9e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusCardViewHolder.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusCardViewHolder.java
@@ -28,6 +28,15 @@
     public StatusCardViewHolder(SuggestionsRecyclerView parent,
             ContextMenuManager contextMenuManager, UiConfig config) {
         super(getLayout(), parent, config, contextMenuManager);
+
+        // The parent class sets an OnClickListener and an OnCreateContextMenuListener
+        // for itemView. So, we need to set these explicitly since the Status Card shouldn't be
+        // clickable or long clickable.
+        itemView.setOnClickListener(null);
+        itemView.setClickable(false);
+        itemView.setOnLongClickListener(null);
+        itemView.setLongClickable(false);
+
         mTitleView = itemView.findViewById(R.id.status_title);
         mBodyView = itemView.findViewById(R.id.status_body);
         mActionView = itemView.findViewById(R.id.status_action_button);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
index ed8f8fe..c31f7967 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
@@ -33,9 +33,7 @@
 import org.chromium.ui.modelutil.PropertyListModel;
 import org.chromium.ui.modelutil.SimpleRecyclerViewMcpBase;
 
-import java.util.Arrays;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Set;
@@ -220,16 +218,6 @@
     }
 
     @Override
-    public void dismissItem(int position, Callback<String> itemRemovedCallback) {
-        if (getSectionDismissalRange().contains(position)) {
-            mDelegate.dismissSection(this);
-            itemRemovedCallback.onResult(mCategoryInfo.getTitle());
-            return;
-        }
-        super.dismissItem(position, itemRemovedCallback);
-    }
-
-    @Override
     public void onItemRangeRemoved(ListObservable child, int index, int count) {
         super.onItemRangeRemoved(child, index, count);
         if (child == mSuggestionsList) onSuggestionsListCountChanged(getSuggestionsCount() + count);
@@ -522,16 +510,6 @@
         return mCategoryInfo.getCategory();
     }
 
-    @Override
-    public Set<Integer> getItemDismissalGroup(int position) {
-        // The section itself can be dismissed via any of the items in the dismissal group,
-        // otherwise we fall back to the default implementation, which dispatches to our children.
-        Set<Integer> sectionDismissalRange = getSectionDismissalRange();
-        if (sectionDismissalRange.contains(position)) return sectionDismissalRange;
-
-        return super.getItemDismissalGroup(position);
-    }
-
     /**
      * Sets the visibility of this section's header. Note this will not work when header is not
      * added to view hierarchy as a result of {@link SuggestionsConfig#isTouchless(boolean)}.
@@ -558,20 +536,6 @@
     }
 
     /**
-     * @return The set of indices corresponding to items that can dismiss this entire section
-     * (as opposed to individual items in it).
-     */
-    private Set<Integer> getSectionDismissalRange() {
-        if (hasSuggestions()) return Collections.emptySet();
-
-        int statusCardIndex = getStartingOffsetForChild(mStatus);
-        if (!mMoreButton.isVisible()) return Collections.singleton(statusCardIndex);
-
-        assert statusCardIndex + 1 == getStartingOffsetForChild(mMoreButton);
-        return new HashSet<>(Arrays.asList(statusCardIndex, statusCardIndex + 1));
-    }
-
-    /**
      * Update the expandable header state to match the preference value if necessary. This can
      * happen when the preference is updated by a user click on another new tab page.
      */
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
index 3bb5e30..3825bcf 100644
--- a/chrome/android/java/strings/android_chrome_strings.grd
+++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -2960,24 +2960,12 @@
       <message name="IDS_NTP_LEARN_MORE_ABOUT_SUGGESTED_CONTENT" desc="Text in the footer of the New Tab Page. Part of the text is a link to a help center page where the user can learn more about suggested content.">
         <ph name="BEGIN_LINK">&lt;link&gt;</ph>Learn more<ph name="END_LINK">&lt;/link&gt;</ph> about suggested content
       </message>
-      <message name="IDS_NTP_ALL_DISMISSED_BODY_TEXT_MORNING" desc="Body text shown in the morning on the New Tab Page when all suggested content has been dismissed.">
-        More articles will appear soon. Enjoy your morning!
-      </message>
-      <message name="IDS_NTP_ALL_DISMISSED_BODY_TEXT_AFTERNOON" desc="Body text shown in the afternoon on the New Tab Page when all suggested content has been dismissed.">
-        More articles will appear soon. Enjoy your afternoon!
-      </message>
-      <message name="IDS_NTP_ALL_DISMISSED_BODY_TEXT_EVENING" desc="Body text shown in the evening on the New Tab Page when all suggested content has been dismissed.">
-        More articles will appear soon. Enjoy your evening!
-      </message>
       <message name="IDS_NTP_SUGGESTIONS_FETCH_FAILED" desc="Snackbar text shown when the user presses the More button to get more suggestions, but this fails (eg, no internet connectivity).">
         Can’t get suggestions
       </message>
       <message name="IDS_NTP_SUGGESTIONS_FETCH_NO_NEW_SUGGESTIONS" desc="Snackbar text shown when the user presses the More button to get more suggestions, the fetch succeeds but provides no new suggestions.">
         No new suggestions
       </message>
-      <message name="IDS_NTP_ALL_DISMISSED_REFRESH" desc="Text label for button to refresh the New Tab Page when all suggested content has been dismissed. [CHAR-LIMIT=20]">
-        Refresh
-      </message>
 
       <!-- Explore sites strings -->
       <message name="IDS_EXPLORE_SITES_TITLE" desc="Title of a section showing different categories, each with a number of popular websites">
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/cards/AllDismissedItemTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/cards/AllDismissedItemTest.java
deleted file mode 100644
index 7df3619..0000000
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/cards/AllDismissedItemTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.ntp.cards;
-
-import android.support.test.filters.MediumTest;
-import android.widget.FrameLayout;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import org.chromium.base.test.util.CommandLineFlags;
-import org.chromium.base.test.util.DisabledTest;
-import org.chromium.base.test.util.Feature;
-import org.chromium.chrome.browser.ChromeActivity;
-import org.chromium.chrome.browser.ChromeSwitches;
-import org.chromium.chrome.browser.ntp.cards.AllDismissedItem.ViewHolder;
-import org.chromium.chrome.test.ChromeActivityTestRule;
-import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
-import org.chromium.chrome.test.util.RenderTestRule;
-import org.chromium.content_public.browser.test.util.TestThreadUtils;
-
-import java.io.IOException;
-
-/**
- * Tests for the appearance and behaviour of AllDismissedItem.
- */
-@RunWith(ChromeJUnit4ClassRunner.class)
-@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE})
-public class AllDismissedItemTest {
-    @Rule
-    public ChromeActivityTestRule<ChromeActivity> mActivityTestRule =
-            new ChromeActivityTestRule<>(ChromeActivity.class);
-
-    @Rule
-    public RenderTestRule mRenderTestRule = new RenderTestRule();
-
-    private FrameLayout mContentView;
-
-    @Before
-    public void setUp() throws Exception {
-        mActivityTestRule.startMainActivityOnBlankPage();
-
-        TestThreadUtils.runOnUiThreadBlocking(() -> {
-            mContentView = new FrameLayout(mActivityTestRule.getActivity());
-            mActivityTestRule.getActivity().setContentView(mContentView);
-        });
-    }
-
-    @Test
-    @MediumTest
-    @Feature({"Cards", "RenderTest"})
-    public void testNewTabPageAppearance() throws IOException {
-        SectionList sectionList = null; // The SectionList is only used if the item is clicked on.
-        ViewHolder viewHolder = new ViewHolder(mContentView, sectionList);
-
-        renderAtHour(viewHolder, 9, "morning");
-        renderAtHour(viewHolder, 14, "afternoon");
-        renderAtHour(viewHolder, 20, "evening");
-    }
-
-    @Test
-    //@MediumTest
-    //@Feature({"Cards", "RenderTest"})
-    // https://crbug.com/780555, re-enable with https://crbug.com/816922
-    @DisabledTest
-    public void testChromeHomeAppearance() throws IOException {
-        renderAtHour(new ViewHolder(mContentView, null), 0, "modern");
-    }
-
-    private void renderAtHour(ViewHolder viewHolder, int hour, String renderId) throws IOException {
-        // TODO(peconn): Extract common code between this and ArticleSnippetsTest for rendering
-        // views in isolation.
-        TestThreadUtils.runOnUiThreadBlocking(() -> {
-            viewHolder.onBindViewHolder(hour);
-            mContentView.addView(viewHolder.itemView);
-        });
-        mRenderTestRule.render(viewHolder.itemView, renderId);
-        TestThreadUtils.runOnUiThreadBlocking(() -> {
-            mContentView.removeView(viewHolder.itemView);
-            viewHolder.recycle();
-        });
-    }
-}
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerViewTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerViewTest.java
index 2bd4e73..ad112ba 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerViewTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerViewTest.java
@@ -5,6 +5,7 @@
 package org.chromium.chrome.browser.ntp.cards;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import android.content.res.Resources;
@@ -21,7 +22,6 @@
 import org.junit.runner.RunWith;
 
 import org.chromium.base.test.util.CommandLineFlags;
-import org.chromium.base.test.util.DisabledTest;
 import org.chromium.base.test.util.Feature;
 import org.chromium.base.test.util.Restriction;
 import org.chromium.base.test.util.RetryOnFailure;
@@ -50,7 +50,6 @@
 import org.chromium.chrome.test.util.browser.suggestions.SuggestionsDependenciesRule;
 import org.chromium.content_public.browser.test.util.TestThreadUtils;
 import org.chromium.content_public.browser.test.util.TestTouchUtils;
-import org.chromium.content_public.browser.test.util.TouchCommon;
 import org.chromium.net.test.EmbeddedTestServer;
 import org.chromium.ui.test.util.UiRestriction;
 
@@ -160,14 +159,11 @@
     }
 
     @Test
-    //@MediumTest
-    //@Feature({"NewTabPage"})
-    @DisabledTest(message = "crbug.com/793054")
+    @MediumTest
+    @Feature({"NewTabPage"})
     public void testAllDismissed() throws InterruptedException, TimeoutException {
         setSuggestionsAndWaitForUpdate(3);
         assertEquals(3, mSource.getSuggestionsForCategory(TEST_CATEGORY).size());
-        assertEquals(RecyclerView.NO_POSITION,
-                getAdapter().getFirstPositionForType(ItemViewType.ALL_DISMISSED));
         assertEquals(1, mSource.getCategories().length);
         assertEquals(TEST_CATEGORY, mSource.getCategories()[0]);
 
@@ -175,22 +171,18 @@
         int signinPromoPosition = getAdapter().getFirstPositionForType(ItemViewType.PROMO);
         dismissItemAtPosition(signinPromoPosition);
 
-        // Dismiss all the cards, including status cards, which dismisses the associated category.
+        // Dismiss all the cards. Then, we are left with the status card,
+        // which shouldn't be dismissible.
         while (true) {
             int cardPosition = getAdapter().getFirstCardPosition();
             if (cardPosition == RecyclerView.NO_POSITION) break;
+            final ViewHolder viewHolder = getViewHolderAtPosition(cardPosition);
+            if (viewHolder.getItemViewType() == ItemViewType.STATUS) {
+                assertFalse(((NewTabPageViewHolder) viewHolder).isDismissable());
+                break;
+            }
             dismissItemAtPosition(cardPosition);
         }
-        assertEquals(0, mSource.getCategories().length);
-
-        // Click the refresh button on the all dismissed item.
-        int allDismissedPosition = getAdapter().getFirstPositionForType(ItemViewType.ALL_DISMISSED);
-        assertTrue(allDismissedPosition != RecyclerView.NO_POSITION);
-        View allDismissedView = getViewHolderAtPosition(allDismissedPosition).itemView;
-        TouchCommon.singleClickView(allDismissedView.findViewById(R.id.action_button));
-        RecyclerViewTestUtils.waitForViewToDetach(getRecyclerView(), allDismissedView);
-        assertEquals(1, mSource.getCategories().length);
-        assertEquals(TEST_CATEGORY, mSource.getCategories()[0]);
     }
 
     @Test
@@ -216,45 +208,6 @@
     @Test
     @MediumTest
     @Feature({"NewTabPage"})
-    public void testDismissStatusCardWithContextMenu() throws Exception {
-        setSuggestionsAndWaitForUpdate(0);
-        assertArrayEquals(new int[] {TEST_CATEGORY}, mSource.getCategories());
-
-        // Scroll the status card into view.
-        int cardPosition = getAdapter().getFirstPositionForType(ItemViewType.STATUS);
-        assertEquals(ItemViewType.STATUS, getAdapter().getItemViewType(cardPosition));
-
-        View statusCardView = getViewHolderAtPosition(cardPosition).itemView;
-
-        // Dismiss the status card using the context menu.
-        invokeContextMenu(statusCardView, ContextMenuManager.ContextMenuItemId.REMOVE);
-        RecyclerViewTestUtils.waitForViewToDetach(getRecyclerView(), statusCardView);
-
-        assertArrayEquals(new int[0], mSource.getCategories());
-    }
-
-    @Test
-    @MediumTest
-    @Feature({"NewTabPage"})
-    public void testDismissActionItemWithContextMenu() throws Exception {
-        setSuggestionsAndWaitForUpdate(0);
-        assertArrayEquals(new int[] {TEST_CATEGORY}, mSource.getCategories());
-
-        // Scroll the action item into view.
-        int actionItemPosition = getAdapter().getFirstPositionForType(ItemViewType.ACTION);
-        assertEquals(ItemViewType.ACTION, getAdapter().getItemViewType(actionItemPosition));
-        View actionItemView = getViewHolderAtPosition(actionItemPosition).itemView;
-
-        // Dismiss the action item using the context menu.
-        invokeContextMenu(actionItemView, ContextMenuManager.ContextMenuItemId.REMOVE);
-        RecyclerViewTestUtils.waitForViewToDetach(getRecyclerView(), actionItemView);
-
-        assertArrayEquals(new int[0], mSource.getCategories());
-    }
-
-    @Test
-    @MediumTest
-    @Feature({"NewTabPage"})
     @Restriction({UiRestriction.RESTRICTION_TYPE_PHONE})
     public void testSnapScroll() {
         setSuggestionsAndWaitForUpdate(0);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/suggestions/HomeSheetUiCaptureTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/suggestions/HomeSheetUiCaptureTest.java
index 186c071..f861a2c 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/suggestions/HomeSheetUiCaptureTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/suggestions/HomeSheetUiCaptureTest.java
@@ -4,13 +4,10 @@
 
 package org.chromium.chrome.browser.suggestions;
 
-import static org.junit.Assert.assertNotEquals;
-
 import static org.chromium.chrome.test.BottomSheetTestRule.waitForWindowUpdates;
 
 import android.support.test.InstrumentationRegistry;
 import android.support.test.filters.MediumTest;
-import android.support.v7.widget.RecyclerView;
 
 import org.junit.Before;
 import org.junit.Rule;
@@ -22,13 +19,11 @@
 import org.chromium.base.test.util.Restriction;
 import org.chromium.chrome.browser.ntp.NtpUiCaptureTestData;
 import org.chromium.chrome.browser.ntp.cards.ItemViewType;
-import org.chromium.chrome.browser.ntp.cards.NewTabPageAdapter;
 import org.chromium.chrome.browser.test.ScreenShooter;
 import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet;
 import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
 import org.chromium.chrome.test.util.MenuUtils;
 import org.chromium.chrome.test.util.browser.suggestions.SuggestionsDependenciesRule;
-import org.chromium.content_public.browser.test.util.TestThreadUtils;
 import org.chromium.ui.test.util.UiRestriction;
 
 /**
@@ -69,29 +64,6 @@
     @Test
     @MediumTest
     @Feature({"UiCatalogue"})
-    public void testAllDismissed() {
-        NewTabPageAdapter adapter = mActivityRule.getAdapter();
-        TestThreadUtils.runOnUiThreadBlocking(() -> {
-            int signInPromoPosition = adapter.getFirstPositionForType(ItemViewType.PROMO);
-            assertNotEquals(signInPromoPosition, RecyclerView.NO_POSITION);
-            adapter.dismissItem(signInPromoPosition, ignored -> { });
-
-            // Dismiss all articles.
-            while (true) {
-                int articlePosition = adapter.getFirstPositionForType(ItemViewType.SNIPPET);
-                if (articlePosition == RecyclerView.NO_POSITION) break;
-                adapter.dismissItem(articlePosition, ignored -> { });
-            }
-        });
-
-        mActivityRule.scrollToFirstItemOfType(ItemViewType.ALL_DISMISSED);
-
-        mScreenShooter.shoot("All_dismissed");
-    }
-
-    @Test
-    @MediumTest
-    @Feature({"UiCatalogue"})
     public void testNewTab() {
         // Select "New tab" from the menu.
         MenuUtils.invokeCustomMenuActionSync(InstrumentationRegistry.getInstrumentation(),
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 69728c08b..e00a5e8 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
@@ -225,10 +225,6 @@
             expectDescription("ABOVE_THE_FOLD");
         }
 
-        public void expectAllDismissedItem() {
-            expectDescription("ALL_DISMISSED");
-        }
-
         public void expectFooter() {
             expectDescription("FOOTER");
         }
@@ -1023,81 +1019,25 @@
         // 5   | Footer
         assertItemsFor(sectionWithStatusCard().withSignInPromo().withProgress());
 
-        // When we remove the section, the All Dismissed item should be there.
-        int statusCardPosition = mAdapter.getFirstPositionForType(ItemViewType.STATUS);
-        mAdapter.dismissItem(statusCardPosition, itemDismissedCallback);
-
+        // When we remove the promo, we should be left with the status card
+        // And it shouldn't be dismissible
+        int promoCardPosition = mAdapter.getFirstPositionForType(ItemViewType.PROMO);
+        mAdapter.dismissItem(promoCardPosition, itemDismissedCallback);
         verify(itemDismissedCallback).onResult(anyString());
 
-        // Adapter content:
-        // Idx | Item
-        // ----|--------------------
-        // 0   | Above-the-fold
-        // 1   | All Dismissed
-        assertItemsFor();
-
-        // Disabling remote suggestions should remove both the promo and the AllDismissed item
-        mSource.setRemoteSuggestionsEnabled(false);
-        mAdapter.getSuggestionsSourceObserverForTesting().onCategoryStatusChanged(
-                ARTICLE_CATEGORY, CategoryStatus.CATEGORY_EXPLICITLY_DISABLED);
-
-        // Adapter content:
-        // Idx | Item
-        // ----|--------------------
-        // 0   | Above-the-fold
-        ItemsMatcher matcher = new ItemsMatcher(mAdapter.getRootForTesting());
-        matcher.expectAboveTheFoldItem();
-        matcher.finish();
-
-        // Prepare some suggestions. They should not load because the category is dismissed on
-        // the current NTP.
-        mSource.setRemoteSuggestionsEnabled(true);
-        mAdapter.getSuggestionsSourceObserverForTesting().onCategoryStatusChanged(
-                ARTICLE_CATEGORY, CategoryStatus.AVAILABLE);
-        mSource.setStatusForCategory(ARTICLE_CATEGORY, CategoryStatus.AVAILABLE);
-        List<SnippetArticle> suggestions = createDummySuggestions(1, ARTICLE_CATEGORY);
-        mSource.setSuggestionsForCategory(ARTICLE_CATEGORY, suggestions);
-        mSource.setInfoForCategory(
-                ARTICLE_CATEGORY, new CategoryInfoBuilder(ARTICLE_CATEGORY).build());
-
-        // Adapter content:
-        // Idx | Item
-        // ----|--------------------
-        // 0   | Above-the-fold
-        // 1   | All Dismissed
-        assertItemsFor();
-
-        // Refresh suggestions
-        mAdapter.getSectionListForTesting().refreshSuggestions();
+        assertEquals(Collections.emptySet(),
+                mAdapter.getItemDismissalGroup(
+                        mAdapter.getFirstPositionForType(ItemViewType.STATUS)));
 
         // Adapter content:
         // Idx | Item
         // ----|--------------------
         // 0   | Above-the-fold
         // 1   | Header
-        // 2   | Sign-in Promo
-        // 3   | Snippet
+        // 2   | Status
+        // 3   | Progress Indicator
         // 4   | Footer
-        assertItemsFor(section(suggestions).withSignInPromo());
-
-        // On Sign in, we should reset the sections, bring back suggestions instead of the All
-        // Dismissed item.
-        signInPromo = getSignInPromo();
-        assertNotNull(signInPromo);
-        signinObserver = signInPromo.getSigninObserverForTesting();
-        assertNotNull(signinObserver);
-        when(mMockSigninManager.isSignInAllowed()).thenReturn(true);
-        signinObserver.onSignInAllowedChanged();
-        signinObserver.onSignedIn();
-
-        // Adapter content:
-        // Idx | Item
-        // ----|--------------------
-        // 0   | Above-the-fold
-        // 1   | Header
-        // 2   | Suggestion
-        // 4   | Footer
-        assertItemsFor(section(suggestions));
+        assertItemsFor(sectionWithStatusCard().withProgress());
     }
 
     /**
@@ -1136,11 +1076,7 @@
         ItemsMatcher matcher = new ItemsMatcher(mAdapter.getRootForTesting());
         matcher.expectAboveTheFoldItem();
         for (SectionDescriptor descriptor : descriptors) matcher.expectSection(descriptor);
-        if (descriptors.length == 0) {
-            matcher.expectAllDismissedItem();
-        } else {
-            matcher.expectFooter();
-        }
+        matcher.expectFooter();
         matcher.finish();
     }
 
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 5e1d2b2..c028abf 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
@@ -159,9 +159,9 @@
         assertEquals(ItemViewType.HEADER, section.getItemViewType(0));
         assertEquals(Collections.emptySet(), section.getItemDismissalGroup(0));
         assertEquals(ItemViewType.STATUS, section.getItemViewType(1));
-        assertEquals(setOf(1, 2), section.getItemDismissalGroup(1));
+        assertEquals(Collections.emptySet(), section.getItemDismissalGroup(1));
         assertEquals(ItemViewType.ACTION, section.getItemViewType(2));
-        assertEquals(setOf(1, 2), section.getItemDismissalGroup(2));
+        assertEquals(Collections.emptySet(), section.getItemDismissalGroup(2));
 
         // With snippets.
         section.appendSuggestions(snippets, /* keepSectionSize = */ true,
@@ -179,10 +179,10 @@
         section.setHeaderVisibility(false);
 
         assertEquals(ItemViewType.STATUS, section.getItemViewType(0));
-        assertEquals(setOf(0, 1), section.getItemDismissalGroup(0));
+        assertEquals(Collections.emptySet(), section.getItemDismissalGroup(0));
 
         assertEquals(ItemViewType.ACTION, section.getItemViewType(1));
-        assertEquals(setOf(0, 1), section.getItemDismissalGroup(1));
+        assertEquals(Collections.emptySet(), section.getItemDismissalGroup(1));
     }
 
     @Test
@@ -191,7 +191,7 @@
         SuggestionsSection section = createSectionWithFetchAction(false);
 
         assertEquals(ItemViewType.STATUS, section.getItemViewType(1));
-        assertEquals(Collections.singleton(1), section.getItemDismissalGroup(1));
+        assertEquals(Collections.emptySet(), section.getItemDismissalGroup(1));
     }
 
     @Test
@@ -201,7 +201,7 @@
         section.setHeaderVisibility(false);
 
         assertEquals(ItemViewType.STATUS, section.getItemViewType(0));
-        assertEquals(Collections.singleton(0), section.getItemDismissalGroup(0));
+        assertEquals(Collections.emptySet(), section.getItemDismissalGroup(0));
     }
 
     @Test
@@ -324,21 +324,6 @@
 
     @Test
     @Feature({"Ntp"})
-    public void testDismissSection() {
-        SuggestionsSection section = createSectionWithFetchAction(false);
-        section.setStatus(CategoryStatus.AVAILABLE);
-        Mockito.<ListObserver>reset(mObserver);
-        assertEquals(2, section.getItemCount());
-
-        @SuppressWarnings("unchecked")
-        Callback<String> callback = mock(Callback.class);
-        section.dismissItem(1, callback);
-        verify(mDelegate).dismissSection(section);
-        verify(callback).onResult(section.getCategoryInfo().getTitle());
-    }
-
-    @Test
-    @Feature({"Ntp"})
     public void testExpandableHeaderNoSuggestions() {
         // Set to the collapsed state initially.
         when(mPrefServiceBridge.getBoolean(eq(EXPANDABLE_HEADER_PREF))).thenReturn(false);
@@ -1002,16 +987,14 @@
     @Feature({"Ntp"})
     public void testGetItemDismissalGroupWithActionItem() {
         SuggestionsSection section = createSectionWithFetchAction(true);
-        assertThat(section.getItemDismissalGroup(1).size(), is(2));
-        assertThat(section.getItemDismissalGroup(1), contains(1, 2));
+        assertThat(section.getItemDismissalGroup(1).size(), is(0));
     }
 
     @Test
     @Feature({"Ntp"})
     public void testGetItemDismissalGroupWithoutActionItem() {
         SuggestionsSection section = createSectionWithFetchAction(false);
-        assertThat(section.getItemDismissalGroup(1).size(), is(1));
-        assertThat(section.getItemDismissalGroup(1), contains(1));
+        assertThat(section.getItemDismissalGroup(1).size(), is(0));
     }
 
     @Test