Commit 3bfd3565 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

weblayer: reenable TopControlsTest#testBasic

Now that launching waits for a first paint, this no longer
seems flaky. At least I couldn't repro locally after ~10ish
tries.

BUG=1020065
TEST=test only change

Change-Id: I1530fcb3f9811b0251a20bd151be5d55322283f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899336Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712698}
parent ff383bfd
......@@ -16,7 +16,6 @@ import org.junit.runner.RunWith;
import org.chromium.base.test.BaseJUnit4ClassRunner;
import org.chromium.base.test.util.CallbackHelper;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.UrlUtils;
import org.chromium.content_public.browser.test.util.Criteria;
import org.chromium.content_public.browser.test.util.CriteriaHelper;
......@@ -76,22 +75,12 @@ public class TopControlsTest {
helper.waitForCallback(0);
}
// TODO(https://crbug.com/1020065): fix this test, it's flaky.
@Test
@SmallTest
@DisabledTest
public void testBasic() throws Exception {
final String url = UrlUtils.encodeHtmlDataUri("<body><p style='height:5000px'>");
InstrumentationActivity activity = mActivityTestRule.launchShellWithUrl(url);
// Wait for layout to make sure the top contents container is shown.
CallbackHelper helper = new CallbackHelper();
TestThreadUtils.runOnUiThreadBlocking(() -> {
activity.getTopContentsContainer().getViewTreeObserver().addOnGlobalLayoutListener(
helper::notifyCalled);
});
helper.waitForCallback(0);
TestThreadUtils.runOnUiThreadBlocking(() -> {
mTopControlsHeight = activity.getTopContentsContainer().getHeight();
Assert.assertTrue(mTopControlsHeight > 0);
......
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