Commit 9cb4ec54 authored by Mei Liang's avatar Mei Liang Committed by Commit Bot

Enable testStartSurfaceLayout_Disabled_HighEndPhone on K

Change-Id: I45a9c08d8846f5e9c4dca549a23cddb85b4bc3b1
Bug: 1059299
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2092120Reviewed-by: default avatarWei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Mei Liang <meiliang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747973}
parent 4c9c41df
...@@ -9,7 +9,6 @@ import static org.chromium.base.test.util.Restriction.RESTRICTION_TYPE_NON_LOW_E ...@@ -9,7 +9,6 @@ import static org.chromium.base.test.util.Restriction.RESTRICTION_TYPE_NON_LOW_E
import android.content.Context; import android.content.Context;
import android.graphics.PointF; import android.graphics.PointF;
import android.os.Build;
import android.support.test.InstrumentationRegistry; import android.support.test.InstrumentationRegistry;
import android.support.test.annotation.UiThreadTest; import android.support.test.annotation.UiThreadTest;
import android.support.test.filters.MediumTest; import android.support.test.filters.MediumTest;
...@@ -30,7 +29,6 @@ import org.junit.runner.RunWith; ...@@ -30,7 +29,6 @@ import org.junit.runner.RunWith;
import org.chromium.base.MathUtils; import org.chromium.base.MathUtils;
import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.CommandLineFlags;
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.Restriction; import org.chromium.base.test.util.Restriction;
...@@ -556,8 +554,6 @@ public class LayoutManagerTest implements MockTabModelDelegate { ...@@ -556,8 +554,6 @@ public class LayoutManagerTest implements MockTabModelDelegate {
@Features.EnableFeatures({ChromeFeatureList.TAB_GROUPS_CONTINUATION_ANDROID}) @Features.EnableFeatures({ChromeFeatureList.TAB_GROUPS_CONTINUATION_ANDROID})
@Features.DisableFeatures({ChromeFeatureList.TAB_GROUPS_ANDROID, @Features.DisableFeatures({ChromeFeatureList.TAB_GROUPS_ANDROID,
ChromeFeatureList.TAB_GRID_LAYOUT_ANDROID}) ChromeFeatureList.TAB_GRID_LAYOUT_ANDROID})
@DisableIf.Build(sdk_is_less_than = Build.VERSION_CODES.LOLLIPOP,
message = "https://crbug.com/1059299")
public void testStartSurfaceLayout_Disabled_HighEndPhone() throws Exception { public void testStartSurfaceLayout_Disabled_HighEndPhone() throws Exception {
// clang-format on // clang-format on
CachedFeatureFlags.setForTesting(ChromeFeatureList.TAB_GRID_LAYOUT_ANDROID, false); CachedFeatureFlags.setForTesting(ChromeFeatureList.TAB_GRID_LAYOUT_ANDROID, false);
...@@ -566,7 +562,7 @@ public class LayoutManagerTest implements MockTabModelDelegate { ...@@ -566,7 +562,7 @@ public class LayoutManagerTest implements MockTabModelDelegate {
// Verify accessibility // Verify accessibility
ApplicationTestUtils.finishActivity(mActivityTestRule.getActivity()); ApplicationTestUtils.finishActivity(mActivityTestRule.getActivity());
AccessibilityUtil.setAccessibilityEnabledForTesting(true); enableAccessibility(true);
verifyOverviewListLayoutEnabled(); verifyOverviewListLayoutEnabled();
} }
...@@ -685,6 +681,15 @@ public class LayoutManagerTest implements MockTabModelDelegate { ...@@ -685,6 +681,15 @@ public class LayoutManagerTest implements MockTabModelDelegate {
}); });
} }
private void enableAccessibility(boolean isEnabled) {
TestThreadUtils.runOnUiThreadBlocking(() -> {
AccessibilityUtil.setAccessibilityEnabledForTesting(isEnabled);
CriteriaHelper.pollInstrumentationThread(
() -> AccessibilityUtil.isAccessibilityEnabled() == isEnabled);
});
}
private void launchedChromeAndEnterTabSwitcher() { private void launchedChromeAndEnterTabSwitcher() {
mActivityTestRule.startMainActivityOnBlankPage(); mActivityTestRule.startMainActivityOnBlankPage();
CriteriaHelper.pollUiThread(Criteria.equals(true, CriteriaHelper.pollUiThread(Criteria.equals(true,
......
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