summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Chen <chesterchen@google.com>2024-03-22 15:22:34 +0000
committerRui Chen <chesterchen@google.com>2024-03-26 17:07:48 +0000
commit50c62dbf5e7c3ece66b2c66a1d1812f422c8072c (patch)
tree7eebd469d31a24697dfdb133785a0379c3046b45
parent08848f8da6f0f7acc9c05994345642cb9f0146d1 (diff)
downloadcts-50c62dbf5e7c3ece66b2c66a1d1812f422c8072c.tar.gz
webkit: Fix testRequestImageRef dangling input event
This was resulting in the SDK Runtime tests being stuck as focused because we were not releasing the input event for the surface view. That resulted in the webkit CTS tests not being able to send instrumented events. Bug: 329219563 (cherry picked from https://android-review.googlesource.com/q/commit:77a031a7aaf9c3526ec740ac366529a99f2121b9) Change-Id: I7ee67651b3e6a5a88c227ba4c45e8e0247175817 Merged-In: I6ff847cce723f26d5e8e2af828b1aee3f9576878
-rwxr-xr-xtests/tests/webkit/src/android/webkit/cts/WebViewTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java b/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
index 87e476d81d5..4649f63dee2 100755
--- a/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
@@ -1833,6 +1833,12 @@ public class WebViewTest extends ActivityInstrumentationTestCase2<WebViewCtsActi
getInstrumentation().sendPointerSync(
MotionEvent.obtain(time, time, MotionEvent.ACTION_DOWN,
middleX, middleY, 0));
+
+ time = SystemClock.uptimeMillis();
+ getInstrumentation().sendPointerSync(
+ MotionEvent.obtain(time, time, MotionEvent.ACTION_UP,
+ middleX, middleY, 0));
+
getInstrumentation().waitForIdleSync();
mOnUiThread.requestImageRef(msg);
new PollingCheck() {