Commit dc72ec91 authored by Becky Zhou's avatar Becky Zhou Committed by Commit Bot

Re-enable Feed tests on tablet

Bug: 944061
Change-Id: If83cb176e3623784af1477731fa586295cd9459f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610471
Commit-Queue: Becky Zhou <huayinz@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659184}
parent 3f4fcf06
......@@ -32,7 +32,6 @@ import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.task.PostTask;
import org.chromium.base.test.util.CallbackHelper;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.DisableIf;
import org.chromium.base.test.util.Feature;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.ChromeSwitches;
......@@ -51,7 +50,6 @@ import org.chromium.chrome.test.util.browser.Features.EnableFeatures;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.UiThreadTaskTraits;
import org.chromium.content_public.browser.test.util.TestThreadUtils;
import org.chromium.ui.test.util.UiDisableIf;
import java.util.Map;
import java.util.concurrent.TimeoutException;
......@@ -131,7 +129,6 @@ public class FeedAppLifecycleTest {
@Test
@SmallTest
@Feature({"InterestFeedContentSuggestions"})
@DisableIf.Device(type = {UiDisableIf.TABLET}) // https://crbug.com/944061.
public void testNtpOpeningTriggersInitializeOnlyOnce() throws InterruptedException {
// We open to about:blank initially so we shouldn't have called initialize() yet.
verify(mAppLifecycleListener, times(0)).initialize();
......@@ -262,7 +259,6 @@ public class FeedAppLifecycleTest {
@Test
@SmallTest
@Feature({"InterestFeedContentSuggestions"})
@DisableIf.Device(type = {UiDisableIf.TABLET}) // https://crbug.com/944061.
public void testMultiWindowDoesNotCauseMultipleInitialize() throws InterruptedException {
mActivityTestRule.loadUrl(UrlConstants.NTP_URL);
verify(mAppLifecycleListener, times(1)).initialize();
......
......@@ -309,9 +309,6 @@ public class NewTabPageTest {
@Feature({"NewTabPage", "FeedNewTabPage"})
@ParameterAnnotations.UseMethodParameter(InterestFeedParams.class)
public void testFocusFakebox(boolean interestFeedEnabled) {
// TODO(https://crbug.com/944061): Re-enable tablet test on interest feed enabled.
if (interestFeedEnabled && mActivityTestRule.getActivity().isTablet()) return;
int initialFakeboxTop = getFakeboxTop(mNtp);
TouchCommon.singleClickView(mFakebox);
......@@ -336,9 +333,6 @@ public class NewTabPageTest {
@DisableIf.Build(sdk_is_greater_than = 22, message = "crbug.com/593007")
@ParameterAnnotations.UseMethodParameter(InterestFeedParams.class)
public void testSearchFromFakebox(boolean interestFeedEnabled) throws InterruptedException {
// TODO(https://crbug.com/944061): Re-enable tablet test on interest feed enabled.
if (interestFeedEnabled && mActivityTestRule.getActivity().isTablet()) return;
TouchCommon.singleClickView(mFakebox);
waitForFakeboxFocusAnimationComplete(mNtp);
final UrlBar urlBar = (UrlBar) mActivityTestRule.getActivity().findViewById(R.id.url_bar);
......@@ -400,9 +394,6 @@ public class NewTabPageTest {
@ParameterAnnotations.UseMethodParameter(InterestFeedParams.class)
public void testOpenMostVisitedItemInIncognitoTab(boolean interestFeedEnabled)
throws InterruptedException, ExecutionException {
// TODO(https://crbug.com/944061): Re-enable tablet test on interest feed enabled.
if (interestFeedEnabled && mActivityTestRule.getActivity().isTablet()) return;
ChromeTabUtils.invokeContextMenuAndOpenInANewTab(mActivityTestRule,
mTileGridLayout.getChildAt(0),
ContextMenuManager.ContextMenuItemId.OPEN_IN_INCOGNITO_TAB, true,
......@@ -417,9 +408,6 @@ public class NewTabPageTest {
@Feature({"NewTabPage", "FeedNewTabPage"})
@ParameterAnnotations.UseMethodParameter(InterestFeedParams.class)
public void testRemoveMostVisitedItem(boolean interestFeedEnabled) throws ExecutionException {
// TODO(https://crbug.com/944061): Re-enable tablet test on interest feed enabled.
if (interestFeedEnabled && mActivityTestRule.getActivity().isTablet()) return;
SiteSuggestion testSite = mSiteSuggestions.get(0);
View mostVisitedItem = mTileGridLayout.getChildAt(0);
ArrayList<View> views = new ArrayList<>();
......@@ -440,9 +428,6 @@ public class NewTabPageTest {
@ParameterAnnotations.UseMethodParameter(InterestFeedParams.class)
public void testUrlFocusAnimationsDisabledOnLoad(boolean interestFeedEnabled)
throws InterruptedException {
// TODO(https://crbug.com/944061): Re-enable tablet test on interest feed enabled.
if (interestFeedEnabled && mActivityTestRule.getActivity().isTablet()) return;
Assert.assertFalse(getUrlFocusAnimationsDisabled());
ChromeTabUtils.waitForTabPageLoaded(mTab, mTestServer.getURL(TEST_PAGE), new Runnable() {
@Override
......@@ -465,9 +450,6 @@ public class NewTabPageTest {
@ParameterAnnotations.UseMethodParameter(InterestFeedParams.class)
public void testUrlFocusAnimationsEnabledOnFailedLoad(boolean interestFeedEnabled)
throws Exception {
// TODO(https://crbug.com/944061): Re-enable tablet test on interest feed enabled.
if (interestFeedEnabled && mActivityTestRule.getActivity().isTablet()) return;
// TODO(jbudorick): switch this to EmbeddedTestServer.
TestWebServer webServer = TestWebServer.start();
try {
......@@ -531,9 +513,6 @@ public class NewTabPageTest {
@Feature({"NewTabPage", "FeedNewTabPage"})
@ParameterAnnotations.UseMethodParameter(InterestFeedParams.class)
public void testSetSearchProviderInfo(boolean interestFeedEnabled) throws Throwable {
// TODO(https://crbug.com/944061): Re-enable tablet test on interest feed enabled.
if (interestFeedEnabled && mActivityTestRule.getActivity().isTablet()) return;
mActivityTestRule.runOnUiThread(new Runnable() {
@Override
public void run() {
......@@ -679,9 +658,6 @@ public class NewTabPageTest {
@Feature({"NewTabPage", "FeedNewTabPage"})
@ParameterAnnotations.UseMethodParameter(InterestFeedParams.class)
public void testMemoryPressure(boolean interestFeedEnabled) throws Exception {
// TODO(https://crbug.com/944061): Re-enable tablet test on interest feed enabled.
if (interestFeedEnabled && mActivityTestRule.getActivity().isTablet()) return;
// TODO(twellington): This test currently just checks that sending a memory pressure
// signal doesn't crash. Enhance the test to also check whether certain behaviors are
// performed.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment