diff options
author | lichen yu <lichen.yu@transsion.corp-partner.google.com> | 2024-04-18 09:12:31 +0000 |
---|---|---|
committer | Charles Chen <charlesccchen@google.com> | 2024-04-18 12:29:40 +0000 |
commit | ea2cf3d4ee4e76f1153f3e7aec9c56e612ea4f03 (patch) | |
tree | 5a4200de84eb8faac3257cef93e50858f3984333 | |
parent | e284f12e6240ac744f7abe88f2331f37851d1f8b (diff) | |
download | cts-ea2cf3d4ee4e76f1153f3e7aec9c56e612ea4f03.tar.gz |
[CTS] fix MultiDisplayImeTests
The test process hopes to gain focus by clicking on the virtual display center. But click events may accidentally open the other app, which may interfere with normal testing.
Use touchAndCancelOnDisplayCenterSync to replace TapOnDisplayCenter to avoid this unexpected occurrence.
Bug: 333967367
Change-Id: I0739e5d36a364091dd4f0e5d07027438e2450b5c
Merged-In: I0739e5d36a364091dd4f0e5d07027438e2450b5c
Test: atest CtsWindowManagerDeviceTestCases:MultiDisplaySystemDecorationTests
Test: atest CtsWindowManagerDeviceTestCases:MultiDisplayImeTests
-rw-r--r-- | tests/framework/base/windowmanager/src/android/server/wm/display/MultiDisplayImeTests.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/framework/base/windowmanager/src/android/server/wm/display/MultiDisplayImeTests.java b/tests/framework/base/windowmanager/src/android/server/wm/display/MultiDisplayImeTests.java index 40fac0a7779..9ed6c3e1efa 100644 --- a/tests/framework/base/windowmanager/src/android/server/wm/display/MultiDisplayImeTests.java +++ b/tests/framework/base/windowmanager/src/android/server/wm/display/MultiDisplayImeTests.java @@ -486,7 +486,7 @@ public class MultiDisplayImeTests extends MultiDisplayTestBase { ImeTestActivity2.class, secondDisplay.mId); // Make firstDisplay the top focus display. - tapOnDisplayCenter(firstDisplay.mId); + touchAndCancelOnDisplayCenterSync(firstDisplay.mId); mWmState.waitForWithAmState(state -> state.getFocusedDisplayId() == firstDisplay.mId, "First display must be top focused."); @@ -528,7 +528,7 @@ public class MultiDisplayImeTests extends MultiDisplayTestBase { configChangeVerifyStream = clearOnConfigurationChangedFromStream(stream); // Tap secondDisplay to change it to the top focused display. - tapOnDisplayCenter(secondDisplay.mId); + touchAndCancelOnDisplayCenterSync(secondDisplay.mId); // Move ImeTestActivity from firstDisplay to secondDisplay. getLaunchActivityBuilder() |