Commit 0787cae4 authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Chromium LUCI CQ

GestureNavigation: Re-enable flaky test #testSwipeAfterDestroy

The purpose of the test was to ensure gesture events triggered
after the navigation handler destruction can still be handled gracefully
without causing crash. Destroying the entire gesture navigation
MVC component in the test to simulate the situation became tricky,
which marked the test disabled.

This CL destroys the NavigationHandler (a mediator) only, which still
serves the purpose of the test, to check the case.

Bug: 1147553
Change-Id: I1cca3c895404a883c441a314b4b55f0bfd3a20cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2642644Reviewed-by: default avatarDonn Denman <donnd@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845982}
parent f37257b8
......@@ -24,7 +24,6 @@ import org.chromium.base.ApplicationStatus;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.Criteria;
import org.chromium.base.test.util.CriteriaHelper;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Restriction;
import org.chromium.chrome.browser.compositor.layouts.OverviewModeController;
import org.chromium.chrome.browser.flags.ChromeSwitches;
......@@ -241,15 +240,14 @@ public class NavigationHandlerTest {
@Test
@SmallTest
@DisabledTest(message = "https://crbug.com/1147553")
public void testSwipeAfterDestroy() {
mTestServer = EmbeddedTestServer.createAndStartServer(
InstrumentationRegistry.getInstrumentation().getContext());
mActivityTestRule.loadUrl(mTestServer.getURL(RENDERED_PAGE));
getNavigationCoordinator().destroy();
mNavigationHandler.destroy();
// |triggerUi| can be invoked by SwipeRefreshHandler on the rendered
// page. Make sure this won't crash after the coordinator (and also
// page. Make sure this won't crash after the handler(and also
// handler action delegate) is destroyed.
Assert.assertFalse(mNavigationHandler.triggerUi(LEFT_EDGE, 0, 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