Commit 5d3ed01a authored by Boris Sazonov's avatar Boris Sazonov Committed by Commit Bot

[Sheriff][Android] Conditionally disable some tests in BottomSheetObserverTest

Reason: flaky on android-arm64-proguard-rel
https://ci.chromium.org/p/chromium/builders/ci/android-arm64-proguard-rel/1491.

TBR=mdjones@chromium.org

Bug: 1072455
Change-Id: Ic4254f73673041cccd94fbe493d4c6fb8c31a9bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2156988Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760589}
parent aeef6888
......@@ -8,6 +8,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import android.os.Build;
import android.support.test.filters.MediumTest;
import android.view.View;
import android.view.ViewGroup;
......@@ -21,6 +22,7 @@ import org.junit.runner.RunWith;
import org.chromium.base.MathUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.CallbackHelper;
import org.chromium.base.test.util.DisableIf;
import org.chromium.base.test.util.Restriction;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.ui.test.util.UiRestriction;
......@@ -69,7 +71,10 @@ public class BottomSheetObserverTest {
/** Test that the onSheetClosed event is triggered if the sheet is closed with animation. */
@Test
@MediumTest
public void testCloseEventCalled_withAnimation() throws TimeoutException {
@DisableIf.Build(sdk_is_greater_than = Build.VERSION_CODES.LOLLIPOP,
sdk_is_less_than = Build.VERSION_CODES.N, message = "https://crbug.com/1072455")
public void
testCloseEventCalled_withAnimation() throws TimeoutException {
runCloseEventTest(true, true);
}
......@@ -132,14 +137,20 @@ public class BottomSheetObserverTest {
*/
@Test
@MediumTest
public void testOpenedEventCalled_noAnimationNoPeekState() throws TimeoutException {
@DisableIf.Build(sdk_is_greater_than = Build.VERSION_CODES.LOLLIPOP,
sdk_is_less_than = Build.VERSION_CODES.N, message = "https://crbug.com/1072455")
public void
testOpenedEventCalled_noAnimationNoPeekState() throws TimeoutException {
runOpenEventTest(false, false);
}
/** Test that the onSheetOpened event is triggered if the sheet is opened with animation. */
@Test
@MediumTest
public void testOpenedEventCalled_withAnimation() throws TimeoutException {
@DisableIf.Build(sdk_is_greater_than = Build.VERSION_CODES.LOLLIPOP,
sdk_is_less_than = Build.VERSION_CODES.N, message = "https://crbug.com/1072455")
public void
testOpenedEventCalled_withAnimation() throws TimeoutException {
runOpenEventTest(true, true);
}
......@@ -198,7 +209,10 @@ public class BottomSheetObserverTest {
*/
@Test
@MediumTest
public void testOffsetChangedEvent() throws TimeoutException {
@DisableIf.Build(sdk_is_greater_than = Build.VERSION_CODES.LOLLIPOP,
sdk_is_less_than = Build.VERSION_CODES.N, message = "https://crbug.com/1072455")
public void
testOffsetChangedEvent() throws TimeoutException {
mBottomSheetTestRule.setSheetState(BottomSheetController.SheetState.FULL, false);
CallbackHelper callbackHelper = mObserver.mOffsetChangedCallbackHelper;
......
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