Modified: trunk/LayoutTests/ChangeLog (293003 => 293004)
--- trunk/LayoutTests/ChangeLog 2022-04-19 00:50:29 UTC (rev 293003)
+++ trunk/LayoutTests/ChangeLog 2022-04-19 00:54:23 UTC (rev 293004)
@@ -1,3 +1,14 @@
+2022-04-18 Wenson Hsieh <wenson_hs...@apple.com>
+
+ [iOS] fast/events/touch/force-press-event.html fails on iPhones with top safe area insets
+ https://bugs.webkit.org/show_bug.cgi?id=239475
+
+ Reviewed by Darin Adler.
+
+ Adjust this test so that it simulates a force press over the center of the target element.
+
+ * platform/iphone-7/fast/events/touch/force-press-event.html:
+
2022-04-18 Tim Nguyen <n...@apple.com>
[iOS] Skip CSS resize tests added by r292559
Modified: trunk/LayoutTests/platform/iphone-7/fast/events/touch/force-press-event.html (293003 => 293004)
--- trunk/LayoutTests/platform/iphone-7/fast/events/touch/force-press-event.html 2022-04-19 00:50:29 UTC (rev 293003)
+++ trunk/LayoutTests/platform/iphone-7/fast/events/touch/force-press-event.html 2022-04-19 00:54:23 UTC (rev 293004)
@@ -8,7 +8,7 @@
testRunner.waitUntilDone();
}
- function getUIScript()
+ function getUIScript(x, y)
{
return `
(function() {
@@ -25,8 +25,8 @@
inputType : "finger",
phase : "began",
id : 1,
- x : 20,
- y : 40,
+ x : ${x},
+ y : ${y},
pressure : 0
}
]
@@ -39,8 +39,8 @@
inputType : "finger",
phase : "stationary",
id : 1,
- x : 20,
- y : 40,
+ x : ${x},
+ y : ${y},
pressure : 500
}
]
@@ -73,7 +73,8 @@
});
if (testRunner.runUIScript) {
- testRunner.runUIScript(getUIScript(), function(result) {
+ const bounds = target.getBoundingClientRect();
+ testRunner.runUIScript(getUIScript(bounds.left + bounds.width / 2, bounds.top + bounds.height / 2), result => {
var middleIndex = Math.floor(forces.length/2);
if ((forces[0] < forces[middleIndex]) && (forces[middleIndex] < forces[forces.length - 1]))