Commit 9c40ce7d authored by gogerald's avatar gogerald Committed by Commit Bot

[StartSurface] Restrict tests on non low end devices

The start surface is only enabled on non low end devices,
https://source.chromium.org/chromium/chromium/src/+/master:chrome/android/features/start_surface/public/java/src/org/chromium/chrome/features/start_surface/StartSurfaceConfiguration.java;drc=11a5a7b7a096dda46401b0fea3f8cddbf574bb94;l=56?originalUrl=https:%2F%2Fcs.chromium.org%2F

Bug: 1094417
Change-Id: I2ef8da8bc692f7fe6ec7018320d614db6ca68657
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2283286Reviewed-by: default avatarYusuf Ozuysal <yusufo@chromium.org>
Commit-Queue: Ganggui Tang <gogerald@chromium.org>
Auto-Submit: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786391}
parent b52c2cfd
...@@ -39,7 +39,8 @@ import org.chromium.ui.test.util.UiRestriction; ...@@ -39,7 +39,8 @@ import org.chromium.ui.test.util.UiRestriction;
* TODO(crbug.com/1031958): Add more required tests. * TODO(crbug.com/1031958): Add more required tests.
*/ */
@RunWith(ChromeJUnit4ClassRunner.class) @RunWith(ChromeJUnit4ClassRunner.class)
@Restriction(UiRestriction.RESTRICTION_TYPE_PHONE) @Restriction(
{UiRestriction.RESTRICTION_TYPE_PHONE, Restriction.RESTRICTION_TYPE_NON_LOW_END_DEVICE})
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE})
public class OverviewAppMenuTest { public class OverviewAppMenuTest {
@Rule @Rule
......
...@@ -119,8 +119,10 @@ public final class ShareButtonControllerTest { ...@@ -119,8 +119,10 @@ public final class ShareButtonControllerTest {
@MediumTest @MediumTest
@Feature({"StartSurface"}) @Feature({"StartSurface"})
@CommandLineFlags.Add({"force-fieldtrial-params=Study.Group:start_surface_variation/single"}) @CommandLineFlags.Add({"force-fieldtrial-params=Study.Group:start_surface_variation/single"})
@Restriction(UiRestriction.RESTRICTION_TYPE_PHONE) @Restriction(
public void testShareButtonInToolbarNotAffectedByOverview() { {UiRestriction.RESTRICTION_TYPE_PHONE, Restriction.RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void
testShareButtonInToolbarNotAffectedByOverview() {
// Sign in. // Sign in.
mAccountManagerTestRule.addAndSignInTestAccount(); mAccountManagerTestRule.addAndSignInTestAccount();
...@@ -153,8 +155,10 @@ public final class ShareButtonControllerTest { ...@@ -153,8 +155,10 @@ public final class ShareButtonControllerTest {
@MediumTest @MediumTest
@Feature({"StartSurface"}) @Feature({"StartSurface"})
@CommandLineFlags.Add({"force-fieldtrial-params=Study.Group:start_surface_variation/single"}) @CommandLineFlags.Add({"force-fieldtrial-params=Study.Group:start_surface_variation/single"})
@Restriction(UiRestriction.RESTRICTION_TYPE_PHONE) @Restriction(
public void testShareButtonDisabledOnDataUrl() { {UiRestriction.RESTRICTION_TYPE_PHONE, Restriction.RESTRICTION_TYPE_NON_LOW_END_DEVICE})
public void
testShareButtonDisabledOnDataUrl() {
mActivityTestRule.loadUrl("data:,Hello%2C%20World!"); mActivityTestRule.loadUrl("data:,Hello%2C%20World!");
ViewUtils.waitForView(allOf(withId(R.id.optional_toolbar_button), ViewUtils.waitForView(allOf(withId(R.id.optional_toolbar_button),
......
...@@ -163,10 +163,13 @@ public class StatusIndicatorTest { ...@@ -163,10 +163,13 @@ public class StatusIndicatorTest {
@Test @Test
@MediumTest @MediumTest
// clang-format off
@Restriction(Restriction.RESTRICTION_TYPE_NON_LOW_END_DEVICE)
@CommandLineFlags.Add({"enable-features=" + ChromeFeatureList.START_SURFACE_ANDROID + "<Study", @CommandLineFlags.Add({"enable-features=" + ChromeFeatureList.START_SURFACE_ANDROID + "<Study",
"force-fieldtrials=Study/Group", "force-fieldtrials=Study/Group",
"force-fieldtrial-params=Study.Group:start_surface_variation/single"}) "force-fieldtrial-params=Study.Group:start_surface_variation/single"})
public void testShowAndHideOnStartSurface() { public void testShowAndHideOnStartSurface() {
// clang-format on
TabUiTestHelper.enterTabSwitcher(mActivityTestRule.getActivity()); TabUiTestHelper.enterTabSwitcher(mActivityTestRule.getActivity());
onView(withId(org.chromium.chrome.start_surface.R.id.secondary_tasks_surface_view)) onView(withId(org.chromium.chrome.start_surface.R.id.secondary_tasks_surface_view))
......
...@@ -31,7 +31,8 @@ import org.chromium.ui.test.util.UiRestriction; ...@@ -31,7 +31,8 @@ import org.chromium.ui.test.util.UiRestriction;
*/ */
@RunWith(ChromeJUnit4ClassRunner.class) @RunWith(ChromeJUnit4ClassRunner.class)
// clang-format off // clang-format off
@Restriction(UiRestriction.RESTRICTION_TYPE_PHONE) @Restriction(
{UiRestriction.RESTRICTION_TYPE_PHONE, Restriction.RESTRICTION_TYPE_NON_LOW_END_DEVICE})
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
"enable-features=" + ChromeFeatureList.START_SURFACE_ANDROID + "<Study", "enable-features=" + ChromeFeatureList.START_SURFACE_ANDROID + "<Study",
"force-fieldtrials=Study/Group", "force-fieldtrials=Study/Group",
......
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