Commit fa695cfe authored by Haiyang Pan's avatar Haiyang Pan Committed by Commit Bot

Revert "[Instant Start] Make more StartSurface tests work in Instant Start."

This reverts commit 8e827fbf.

Reason for revert: org.chromium.chrome.features.start_surface.StartSurfaceTest#testShow_SingleAsTabSwitcher__Instant_Return is flaky in android-marshmallow-arm64-rel CQ builders: https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVylAELEgVGbGFrZSKIAWNocm9taXVtQGNocm9tZV9wdWJsaWNfdGVzdF9hcGtAb3JnLmNocm9taXVtLmNocm9tZS5mZWF0dXJlcy5zdGFydF9zdXJmYWNlLlN0YXJ0U3VyZmFjZVRlc3QjdGVzdFNob3dfU2luZ2xlQXNUYWJTd2l0Y2hlcl9fSW5zdGFudF9SZXR1cm4M

And in the following CI builders since this CL, starting at
https://ci.chromium.org/p/chromium/builders/ci/android-pie-x86-rel/1539
https://ci.chromium.org/p/chromium/builders/ci/android-marshmallow-x86-fyi-rel/1299

Original change's description:
> [Instant Start] Make more StartSurface tests work in Instant Start.
> 
> Bug: 1103838, 1092642, 1076274
> Change-Id: I6bf58ef38c834ce15fae04f0743f646fcb98970f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2290755
> Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
> Commit-Queue: Xi Han <hanxi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#790119}

TBR=hanxi@chromium.org,wychen@chromium.org

Change-Id: I6770e34e23c6b5c3d3d2b94642113677b38b8b8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1103838
Bug: 1092642
Bug: 1076274
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2309752Reviewed-by: default avatarHaiyang Pan <hypan@google.com>
Commit-Queue: Haiyang Pan <hypan@google.com>
Cr-Commit-Position: refs/heads/master@{#790419}
parent d0e47450
...@@ -250,6 +250,11 @@ public class StartSurfaceTest { ...@@ -250,6 +250,11 @@ public class StartSurfaceTest {
TabUiTestHelper.createTabs(cta, true, 1); TabUiTestHelper.createTabs(cta, true, 1);
TabUiTestHelper.verifyTabModelTabCount(cta, 1, 1); TabUiTestHelper.verifyTabModelTabCount(cta, 1, 1);
if (isInstantReturn()) {
// TODO(crbug.com/1076274): fix toolbar to avoid wrongly focusing on the toolbar
// omnibox.
return;
}
TabUiTestHelper.enterTabSwitcher(cta); TabUiTestHelper.enterTabSwitcher(cta);
if (!isInstantReturn()) { if (!isInstantReturn()) {
// TODO(crbug.com/1076274): fix toolbar to make incognito switch part of the view. // TODO(crbug.com/1076274): fix toolbar to make incognito switch part of the view.
...@@ -305,7 +310,11 @@ public class StartSurfaceTest { ...@@ -305,7 +310,11 @@ public class StartSurfaceTest {
TabUiTestHelper.createTabs(cta, true, 1); TabUiTestHelper.createTabs(cta, true, 1);
TabUiTestHelper.verifyTabModelTabCount(cta, 1, 1); TabUiTestHelper.verifyTabModelTabCount(cta, 1, 1);
if (isInstantReturn()) {
// TODO(crbug.com/1076274): fix toolbar to avoid wrongly focusing on the toolbar
// omnibox.
return;
}
TabUiTestHelper.enterTabSwitcher(cta); TabUiTestHelper.enterTabSwitcher(cta);
if (!isInstantReturn()) { if (!isInstantReturn()) {
// TODO(crbug.com/1076274): fix toolbar to make incognito switch part of the view. // TODO(crbug.com/1076274): fix toolbar to make incognito switch part of the view.
...@@ -397,16 +406,15 @@ public class StartSurfaceTest { ...@@ -397,16 +406,15 @@ public class StartSurfaceTest {
fail("Failed to tap 'more tabs' " + e.toString()); fail("Failed to tap 'more tabs' " + e.toString());
} }
onViewWaiting(withId(R.id.secondary_tasks_surface_view)); onViewWaiting(withId(R.id.secondary_tasks_surface_view));
pressBack();
onViewWaiting(withId(R.id.primary_tasks_surface_view));
if (isInstantReturn()) { if (isInstantReturn()) {
// TODO(crbug.com/1092642): Fix androidx.test.espresso.PerformException issue when // TODO(crbug.com/1076274): fix toolbar to avoid wrongly focusing on the toolbar
// performing a single click on position: 0. See code below. // omnibox.
return; return;
} }
pressBack();
onViewWaiting(withId(R.id.primary_tasks_surface_view));
OverviewModeBehaviorWatcher hideWatcher = OverviewModeBehaviorWatcher hideWatcher =
TabUiTestHelper.createOverviewHideWatcher(mActivityTestRule.getActivity()); TabUiTestHelper.createOverviewHideWatcher(mActivityTestRule.getActivity());
onView(allOf(withParent(withId( onView(allOf(withParent(withId(
...@@ -465,16 +473,15 @@ public class StartSurfaceTest { ...@@ -465,16 +473,15 @@ public class StartSurfaceTest {
fail("Failed to tap 'more tabs' " + e.toString()); fail("Failed to tap 'more tabs' " + e.toString());
} }
onViewWaiting(withId(R.id.secondary_tasks_surface_view)); onViewWaiting(withId(R.id.secondary_tasks_surface_view));
pressBack();
onViewWaiting(withId(R.id.primary_tasks_surface_view));
if (isInstantReturn()) { if (isInstantReturn()) {
// TODO(crbug.com/1092642): Fix androidx.test.espresso.PerformException issue when // TODO(crbug.com/1076274): fix toolbar to avoid wrongly focusing on the toolbar
// performing a single click on position: 0. See code below. // omnibox.
return; return;
} }
pressBack();
onViewWaiting(withId(R.id.primary_tasks_surface_view));
OverviewModeBehaviorWatcher hideWatcher = OverviewModeBehaviorWatcher hideWatcher =
TabUiTestHelper.createOverviewHideWatcher(mActivityTestRule.getActivity()); TabUiTestHelper.createOverviewHideWatcher(mActivityTestRule.getActivity());
onView(allOf(withParent(withId( onView(allOf(withParent(withId(
...@@ -538,6 +545,11 @@ public class StartSurfaceTest { ...@@ -538,6 +545,11 @@ public class StartSurfaceTest {
} }
onViewWaiting(withId(R.id.secondary_tasks_surface_view)); onViewWaiting(withId(R.id.secondary_tasks_surface_view));
if (isInstantReturn()) {
// TODO(crbug.com/1076274): fix toolbar to avoid wrongly focusing on the toolbar
// omnibox.
return;
}
pressBack(); pressBack();
onViewWaiting(withId(R.id.primary_tasks_surface_view)); onViewWaiting(withId(R.id.primary_tasks_surface_view));
...@@ -623,15 +635,13 @@ public class StartSurfaceTest { ...@@ -623,15 +635,13 @@ public class StartSurfaceTest {
// Single surface is shown as homepage. Exit in order to get into tab switcher later. // Single surface is shown as homepage. Exit in order to get into tab switcher later.
pressBack(); pressBack();
} }
TabUiTestHelper.enterTabSwitcher(mActivityTestRule.getActivity());
onViewWaiting(allOf(withId(R.id.secondary_tasks_surface_view), isDisplayed()));
if (isInstantReturn()) { if (isInstantReturn()) {
// TODO(crbug.com/1092642): Fix androidx.test.espresso.PerformException issue when // TODO(crbug.com/1076274): fix toolbar to avoid wrongly focusing on the toolbar
// performing a single click on position: 0. See code below. // omnibox.
return; return;
} }
TabUiTestHelper.enterTabSwitcher(mActivityTestRule.getActivity());
onViewWaiting(allOf(withId(R.id.secondary_tasks_surface_view), isDisplayed()));
OverviewModeBehaviorWatcher hideWatcher = OverviewModeBehaviorWatcher hideWatcher =
TabUiTestHelper.createOverviewHideWatcher(mActivityTestRule.getActivity()); TabUiTestHelper.createOverviewHideWatcher(mActivityTestRule.getActivity());
......
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