Commit b81e95b7 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Fix ReturnToChromeTest#testInitialScrollIndex

The test tests tab grid view containing screenshots of web pages.
Previously the web pages were scrollable and the sreenshorts might
contain scrollbars, but the existence and opacity of the scrollbars
depended on timing.

Let the test use a shorter web page which is not scrollable to avoid
the flakiness.

See
https://storage.cloud.google.com/chromium-result-details/7633a0d7f0a2344a68bfd8c195ffd34615863c8a
for the change of the golden file.

Bug: 1032754
Change-Id: If47d333560d2070574b25a05d0cc39e44d97508b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1961290
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarWei-Yin Chen (陳威尹) <wychen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#724491}
parent f3d73f2c
...@@ -21,6 +21,7 @@ import org.junit.runner.RunWith; ...@@ -21,6 +21,7 @@ import org.junit.runner.RunWith;
import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.metrics.RecordHistogram;
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;
...@@ -63,7 +64,7 @@ public class ReturnToChromeTest { ...@@ -63,7 +64,7 @@ public class ReturnToChromeTest {
EmbeddedTestServer testServer = EmbeddedTestServer testServer =
EmbeddedTestServer.createAndStartServer(InstrumentationRegistry.getContext()); EmbeddedTestServer.createAndStartServer(InstrumentationRegistry.getContext());
mUrl = testServer.getURL("/chrome/test/data/android/navigate/simple.html"); mUrl = testServer.getURL("/chrome/test/data/android/about.html");
mActivityTestRule.startMainActivityOnBlankPage(); mActivityTestRule.startMainActivityOnBlankPage();
} }
...@@ -260,8 +261,7 @@ public class ReturnToChromeTest { ...@@ -260,8 +261,7 @@ public class ReturnToChromeTest {
// clang-format off // clang-format off
@CommandLineFlags.Add({BASE_PARAMS + "/" + TAB_SWITCHER_ON_RETURN_MS + "/0"}) @CommandLineFlags.Add({BASE_PARAMS + "/" + TAB_SWITCHER_ON_RETURN_MS + "/0"})
@Restriction(UiRestriction.RESTRICTION_TYPE_PHONE) @Restriction(UiRestriction.RESTRICTION_TYPE_PHONE)
@DisabledTest(message = "https://crbug.com/1032754") // temporary @DisableIf.Build(hardware_is = "bullhead", message = "https://crbug.com/1025241")
// @DisableIf.Build(hardware_is = "bullhead", message = "https://crbug.com/1025241")
public void testInitialScrollIndex() throws Exception { public void testInitialScrollIndex() throws Exception {
// clang-format on // clang-format on
TabUiTestHelper.prepareTabsWithThumbnail(mActivityTestRule, 10, 0, mUrl); TabUiTestHelper.prepareTabsWithThumbnail(mActivityTestRule, 10, 0, mUrl);
......
0100e2b42e507091905f7d6bb03b74fa635002be 93a32a7c0dd79074f2d1d40038f0e46b122de0ba
\ No newline at end of file \ No newline at end of file
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