Commit 4717f2a2 authored by Wei-Yin Chen (陳威尹)'s avatar Wei-Yin Chen (陳威尹) Committed by Commit Bot

Enable StartSurfaceLayoutTest render tests on non-render test bots

Regain some coverage before we can fully deflake pixel differences.

Bug: 1023299, 983170
Change-Id: Ia3d42a732e213377d97a4aefe2cc7eb8c63a1062
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1916300
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: default avatarMei Liang <meiliang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715428}
parent be712e64
...@@ -143,13 +143,13 @@ public class StartSurfaceLayoutTest { ...@@ -143,13 +143,13 @@ public class StartSurfaceLayoutTest {
@Test @Test
@MediumTest @MediumTest
@Feature({"RenderTest"}) @Feature({"RenderTest"})
// clang-format off
@CommandLineFlags.Add({BASE_PARAMS}) @CommandLineFlags.Add({BASE_PARAMS})
@DisabledTest(message = "crbug.com/1024608 This test is flaky") @DisableIf.Build(message = "crbug.com/1024608", sdk_is_less_than = Build.VERSION_CODES.N)
public void testRenderGrid_3WebTabs() throws InterruptedException, IOException { public void testRenderGrid_3WebTabs() throws InterruptedException, IOException {
// clang-format on
prepareTabs(3, 0, mUrl); prepareTabs(3, 0, mUrl);
TabUiTestHelper.enterTabSwitcher(mActivityTestRule.getActivity()); ChromeTabUtils.switchTabInCurrentTabModel(mActivityTestRule.getActivity(), 0);
TabUiTestHelper.clickFirstCardFromTabSwitcher(mActivityTestRule.getActivity());
enterGTSWithThumbnailChecking(); enterGTSWithThumbnailChecking();
mRenderTestRule.render(mActivityTestRule.getActivity().findViewById( mRenderTestRule.render(mActivityTestRule.getActivity().findViewById(
org.chromium.chrome.tab_ui.R.id.tab_list_view), org.chromium.chrome.tab_ui.R.id.tab_list_view),
...@@ -159,13 +159,13 @@ public class StartSurfaceLayoutTest { ...@@ -159,13 +159,13 @@ public class StartSurfaceLayoutTest {
@Test @Test
@MediumTest @MediumTest
@Feature({"RenderTest"}) @Feature({"RenderTest"})
// clang-format off
@CommandLineFlags.Add({BASE_PARAMS}) @CommandLineFlags.Add({BASE_PARAMS})
@DisabledTest(message = "crbug.com/1024608 This test is flaky") @DisableIf.Build(message = "crbug.com/1024608", sdk_is_less_than = Build.VERSION_CODES.N)
public void testRenderGrid_10WebTabs() throws InterruptedException, IOException { public void testRenderGrid_10WebTabs() throws InterruptedException, IOException {
// clang-format on
prepareTabs(10, 0, mUrl); prepareTabs(10, 0, mUrl);
TabUiTestHelper.enterTabSwitcher(mActivityTestRule.getActivity()); ChromeTabUtils.switchTabInCurrentTabModel(mActivityTestRule.getActivity(), 0);
TabUiTestHelper.clickFirstCardFromTabSwitcher(mActivityTestRule.getActivity());
enterGTSWithThumbnailChecking(); enterGTSWithThumbnailChecking();
mRenderTestRule.render(mActivityTestRule.getActivity().findViewById( mRenderTestRule.render(mActivityTestRule.getActivity().findViewById(
org.chromium.chrome.tab_ui.R.id.tab_list_view), org.chromium.chrome.tab_ui.R.id.tab_list_view),
...@@ -175,15 +175,13 @@ public class StartSurfaceLayoutTest { ...@@ -175,15 +175,13 @@ public class StartSurfaceLayoutTest {
@Test @Test
@MediumTest @MediumTest
@Feature({"RenderTest"}) @Feature({"RenderTest"})
// clang-format off
@CommandLineFlags.Add({BASE_PARAMS}) @CommandLineFlags.Add({BASE_PARAMS})
@DisabledTest(message = "crbug.com/1024608 This test is flaky") @DisableIf.Build(message = "crbug.com/1024608", sdk_is_less_than = Build.VERSION_CODES.N)
public void testRenderGrid_10WebTabs_InitialScroll() throws InterruptedException, IOException { public void testRenderGrid_10WebTabs_InitialScroll() throws InterruptedException, IOException {
// clang-format on
prepareTabs(10, 0, mUrl); prepareTabs(10, 0, mUrl);
TabUiTestHelper.enterTabSwitcher(mActivityTestRule.getActivity()); ChromeTabUtils.switchTabInCurrentTabModel(mActivityTestRule.getActivity(), 9);
TabUiTestHelper.clickNthCardFromTabSwitcher(mActivityTestRule.getActivity(),
mActivityTestRule.getActivity().getTabModelSelector().getCurrentModel().getCount()
- 1);
enterGTSWithThumbnailChecking(); enterGTSWithThumbnailChecking();
// Make sure the grid tab switcher is scrolled down to show the selected tab. // Make sure the grid tab switcher is scrolled down to show the selected tab.
mRenderTestRule.render(mActivityTestRule.getActivity().findViewById( mRenderTestRule.render(mActivityTestRule.getActivity().findViewById(
...@@ -194,15 +192,15 @@ public class StartSurfaceLayoutTest { ...@@ -194,15 +192,15 @@ public class StartSurfaceLayoutTest {
@Test @Test
@MediumTest @MediumTest
@Feature({"RenderTest"}) @Feature({"RenderTest"})
// clang-format off
@CommandLineFlags.Add({BASE_PARAMS}) @CommandLineFlags.Add({BASE_PARAMS})
@DisabledTest(message = "crbug.com/1024608 This test is flaky") @DisableIf.Build(message = "crbug.com/1024608", sdk_is_less_than = Build.VERSION_CODES.N)
public void testRenderGrid_Incognito() throws InterruptedException, IOException { public void testRenderGrid_Incognito() throws InterruptedException, IOException {
// clang-format on
// Prepare some incognito tabs and enter tab switcher. // Prepare some incognito tabs and enter tab switcher.
prepareTabs(1, 3, mUrl); prepareTabs(1, 3, mUrl);
assertTrue(mActivityTestRule.getActivity().getCurrentTabModel().isIncognito()); assertTrue(mActivityTestRule.getActivity().getCurrentTabModel().isIncognito());
TabUiTestHelper.enterTabSwitcher(mActivityTestRule.getActivity()); ChromeTabUtils.switchTabInCurrentTabModel(mActivityTestRule.getActivity(), 0);
TabUiTestHelper.clickFirstCardFromTabSwitcher(mActivityTestRule.getActivity());
enterGTSWithThumbnailChecking(); enterGTSWithThumbnailChecking();
mRenderTestRule.render(mActivityTestRule.getActivity().findViewById( mRenderTestRule.render(mActivityTestRule.getActivity().findViewById(
org.chromium.chrome.tab_ui.R.id.tab_list_view), org.chromium.chrome.tab_ui.R.id.tab_list_view),
......
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