Re-enable some tests in StartSurfaceTest.
Bug: 1139515 Change-Id: I8efb2168d15a78c48eb9bcd28fd579004ad0fbbb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2560542 Reviewed-by: Xi Han <hanxi@chromium.org> Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org> Commit-Queue: Hao Dong <spdonghao@chromium.org> Cr-Commit-Position: refs/heads/master@{#831158}
This commit is contained in:
@@ -84,7 +84,6 @@ import org.chromium.base.test.util.CriteriaHelper;
|
|||||||
import org.chromium.base.test.util.DisableIf;
|
import org.chromium.base.test.util.DisableIf;
|
||||||
import org.chromium.base.test.util.DisabledTest;
|
import org.chromium.base.test.util.DisabledTest;
|
||||||
import org.chromium.base.test.util.Feature;
|
import org.chromium.base.test.util.Feature;
|
||||||
import org.chromium.base.test.util.FlakyTest;
|
|
||||||
import org.chromium.base.test.util.Restriction;
|
import org.chromium.base.test.util.Restriction;
|
||||||
import org.chromium.base.test.util.ScalableTimeout;
|
import org.chromium.base.test.util.ScalableTimeout;
|
||||||
import org.chromium.chrome.browser.ChromeTabbedActivity;
|
import org.chromium.chrome.browser.ChromeTabbedActivity;
|
||||||
@@ -399,7 +398,6 @@ public class StartSurfaceTest {
|
|||||||
@MediumTest
|
@MediumTest
|
||||||
@Feature({"StartSurface"})
|
@Feature({"StartSurface"})
|
||||||
@CommandLineFlags.Add({BASE_PARAMS + "/single"})
|
@CommandLineFlags.Add({BASE_PARAMS + "/single"})
|
||||||
@FlakyTest(message = "https://crbug.com/1139515")
|
|
||||||
public void testShow_SingleAsHomepage() {
|
public void testShow_SingleAsHomepage() {
|
||||||
if (!mImmediateReturn) {
|
if (!mImmediateReturn) {
|
||||||
onView(withId(org.chromium.chrome.tab_ui.R.id.home_button)).perform(click());
|
onView(withId(org.chromium.chrome.tab_ui.R.id.home_button)).perform(click());
|
||||||
@@ -461,7 +459,6 @@ public class StartSurfaceTest {
|
|||||||
@MediumTest
|
@MediumTest
|
||||||
@Feature({"StartSurface"})
|
@Feature({"StartSurface"})
|
||||||
@CommandLineFlags.Add({BASE_PARAMS + "/single/hide_incognito_switch/true"})
|
@CommandLineFlags.Add({BASE_PARAMS + "/single/hide_incognito_switch/true"})
|
||||||
@FlakyTest(message = "https://crbug.com/1139515")
|
|
||||||
public void testShow_SingleAsHomepage_NoIncognitoSwitch() {
|
public void testShow_SingleAsHomepage_NoIncognitoSwitch() {
|
||||||
if (!mImmediateReturn) {
|
if (!mImmediateReturn) {
|
||||||
onView(withId(org.chromium.chrome.tab_ui.R.id.home_button)).perform(click());
|
onView(withId(org.chromium.chrome.tab_ui.R.id.home_button)).perform(click());
|
||||||
@@ -509,17 +506,19 @@ public class StartSurfaceTest {
|
|||||||
|
|
||||||
pressBack();
|
pressBack();
|
||||||
onViewWaiting(withId(R.id.primary_tasks_surface_view));
|
onViewWaiting(withId(R.id.primary_tasks_surface_view));
|
||||||
onView(withId(org.chromium.chrome.tab_ui.R.id.incognito_switch))
|
|
||||||
.check(matches(withEffectiveVisibility(GONE)));
|
|
||||||
|
|
||||||
if (isInstantReturn()
|
if (isInstantReturn()
|
||||||
&& (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
|
&& (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
|
||||||
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.O)) {
|
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.O)) {
|
||||||
|
// TODO(crbug.com/1139515): Fix incognito_switch visibility AssertionFailedError issue.
|
||||||
// TODO(crbug.com/1092642): Fix androidx.test.espresso.PerformException issue when
|
// TODO(crbug.com/1092642): Fix androidx.test.espresso.PerformException issue when
|
||||||
// performing a single click on position: 0. See code below.
|
// performing a single click on position: 0. See code below.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onView(withId(org.chromium.chrome.tab_ui.R.id.incognito_switch))
|
||||||
|
.check(matches(withEffectiveVisibility(GONE)));
|
||||||
|
|
||||||
OverviewModeBehaviorWatcher hideWatcher =
|
OverviewModeBehaviorWatcher hideWatcher =
|
||||||
TabUiTestHelper.createOverviewHideWatcher(mActivityTestRule.getActivity());
|
TabUiTestHelper.createOverviewHideWatcher(mActivityTestRule.getActivity());
|
||||||
onView(allOf(withParent(withId(
|
onView(allOf(withParent(withId(
|
||||||
|
Reference in New Issue
Block a user