commit ae5167bf7831216b5d185ac7c413c91a7bc85228
parent f2fa64e6c3b0fb39bd72d0f955bef2b2d61dcbd2
Author: lilyspiniolas <119537181+lilyspiniolas@users.noreply.github.com>
Date: Fri, 3 Oct 2025 09:00:15 +0000
Bug 1990936 [wpt PR 55074] - Update the subtest order of pointerevent_click_is_a_pointerevent.html, a=testonly
Automatic update from web-platform-tests
Update the subtest order of pointerevent_click_is_a_pointerevent.html as a workaround for (#55074)
a WebKit issue where webdriver fails to correctly direct focus after clicking outside of
the frame. This focus bug does not happen under normal browsing conditions, and only occurs
when running tests using webdriver.
--
wpt-commits: 90b40025c7123e536133e695df5601d43a279f29
wpt-pr: 55074
Diffstat:
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/testing/web-platform/tests/pointerevents/pointerevent_click_is_a_pointerevent.html b/testing/web-platform/tests/pointerevents/pointerevent_click_is_a_pointerevent.html
@@ -76,25 +76,6 @@ promise_test(async test => {
}, "click using " + pointer_type + " is a PointerEvent with correct properties"
+ " when no other PointerEvent listeners are present");
-promise_test(async test => {
- await subframe_loaded;
-
- const target = frames[0];
- let pointerdown_promise = getEvent("pointerdown", target, test);
- let pointerup_promise = getEvent("pointerup", target, test);
- let click_promise = getEvent("click", target, test);
-
- await clickInTarget(pointer_type, frames[0].document.body);
-
- let pointerdown_event = await pointerdown_promise;
- let pointerup_event = await pointerup_promise;
- let click_event = await click_promise;
-
- assertClickProperties(click_event, frames[0], pointerdown_event, pointerup_event);
-}, "click using " + pointer_type + " is a PointerEvent with correct properties"
- + " in a subframe");
-
-
// Run this part of the test only once, since it doesn't rely on the pointer_type.
if (pointer_type == "mouse") {
promise_test(async test => {
@@ -120,4 +101,25 @@ if (pointer_type == "mouse") {
}, "click using " + pointer_type + " is a PointerEvent with correct properties"
+ " using non-pointing device");
}
+
+promise_test(async test => {
+ // This subtest must be run last as workaround for a WebKit issue where webdriver
+ // fails to correctly direct focus after clicking outside of the frame. This bug
+ // does not occur during normal browsing. https://webkit.org/b/298676
+ await subframe_loaded;
+
+ const target = frames[0];
+ let pointerdown_promise = getEvent("pointerdown", target, test);
+ let pointerup_promise = getEvent("pointerup", target, test);
+ let click_promise = getEvent("click", target, test);
+
+ await clickInTarget(pointer_type, frames[0].document.body);
+
+ let pointerdown_event = await pointerdown_promise;
+ let pointerup_event = await pointerup_promise;
+ let click_event = await click_promise;
+
+ assertClickProperties(click_event, frames[0], pointerdown_event, pointerup_event);
+}, "click using " + pointer_type + " is a PointerEvent with correct properties"
+ + " in a subframe");
</script>