commit | 5c635894f2023c0e2012ef69982752c1bfbbc25f | [log] [tgz] |
---|---|---|
author | TYM Tsai <tymtsai@google.com> | Fri Dec 18 05:24:52 2020 +0800 |
committer | TYM Tsai <tymtsai@google.com> | Mon Dec 21 17:40:53 2020 +0000 |
tree | ec71a2bfba56bd23c8b4f7a1f73902e582d1c310 | |
parent | cc548966e845d8414c681732c7e2c4fdfa581dcc [diff] |
Disables testTapLink_changeOrientationThenTapBack if the screen is too small This test case should be disabled if the screen is too small. The logic existed in android O: https://android-review.googlesource.com/c/platform/cts/+/649904 Also submitted in master: https://android-review.googlesource.com/c/platform/cts/+/649903 https://android-review.googlesource.com/c/platform/cts/+/1211565 Bug: 173765614 Test: run cts -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.SimpleSaveActivityTest#testTapLink_changeOrientationThenTapBack Merged-In: I8787d67744d58cd93777f98c7445dec43b9da371 Merged-In: Ia0ad96fe63e8a2916377d21aa64771340e4c5cb1 Merged-In: Ie1ec18c235e23106b472c6e77721af22b9f184ab Merged-In: I34a2ba94cc9c1469ef0f8517b6e8ad064152d531 Change-Id: I051b8ed1a89b056a6c7a66ed0cc943f75f2f44e6
diff --git a/tests/autofillservice/src/android/autofillservice/cts/CustomDescriptionWithLinkTestCase.java b/tests/autofillservice/src/android/autofillservice/cts/CustomDescriptionWithLinkTestCase.java index 02b2e13..b0135e4 100644 --- a/tests/autofillservice/src/android/autofillservice/cts/CustomDescriptionWithLinkTestCase.java +++ b/tests/autofillservice/src/android/autofillservice/cts/CustomDescriptionWithLinkTestCase.java
@@ -71,6 +71,12 @@ public final void testTapLink_changeOrientationThenTapBack() throws Exception { assumeTrue("Rotation is supported", Helper.isRotationSupported(mContext)); + final int width = mUiBot.getDevice().getDisplayWidth(); + final int height = mUiBot.getDevice().getDisplayHeight(); + final int min = Math.min(width, height); + + assumeTrue("Screen size is too small (" + width + "x" + height + ")", min >= 500); + mUiBot.setScreenOrientation(UiBot.PORTRAIT); try { saveUiRestoredAfterTappingLinkTest(