Title: [295548] trunk/LayoutTests
- Revision
- 295548
- Author
- wenson_hs...@apple.com
- Date
- 2022-06-14 18:49:53 -0700 (Tue, 14 Jun 2022)
Log Message
[iOS 15+] editing/selection/ios/hide-selection-in-tiny-contenteditable.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=241611
rdar://82183980
Reviewed by Aditya Keerthi.
This test is intended to check whether the text editing caret is visible or hidden on iOS when focusing a 1px by 1px
editable container; in particular, we expect to see the caret show up after making the tiny contenteditable area much
larger. However, the horizontal offset of the caret is sometimes shifted by a small amount to the left during the final
step of the test, likely due to the fact that the web view might still be in an unstable state after the animated zoom
in and out. Unfortunately, I haven't been able to reproduce this locally, so I can't confirm that this theory.
To try and mitigate this with a speculative fix, we:
1. Update the test so that it just checks whether or not the caret rect is empty during each step.
2. Use `immediateZoomToScale` instead of `zoomToScale`, so that we don't end up in an unstable state after finishing
the second part of the test (which zooms in and out).
* LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable-expected.txt:
* LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable.html:
* LayoutTests/platform/ios-wk2/TestExpectations:
Mark the test as passing.
Canonical link: https://commits.webkit.org/251553@main
Modified Paths
Diff
Modified: trunk/LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable-expected.txt (295547 => 295548)
--- trunk/LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable-expected.txt 2022-06-15 01:13:06 UTC (rev 295547)
+++ trunk/LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable-expected.txt 2022-06-15 01:49:53 UTC (rev 295548)
@@ -7,11 +7,11 @@
After focus, the caret rect is empty
After zooming in, the caret rect is empty
After making editor large, the caret rect is empty
-After making editor opaque, the caret rect is (left=21, top=100, width=2, height=19)
+After making editor opaque, the caret rect is not empty
After making editor tiny again, the caret rect is empty
After making editor transparent again, the caret rect is empty
After making editor large again, the caret rect is empty
-After making editor opaque again, the caret rect is (left=50, top=100, width=2, height=19)
+After making editor opaque again, the caret rect is not empty
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable.html (295547 => 295548)
--- trunk/LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable.html 2022-06-15 01:13:06 UTC (rev 295547)
+++ trunk/LayoutTests/editing/selection/ios/hide-selection-in-tiny-contenteditable.html 2022-06-15 01:49:53 UTC (rev 295548)
@@ -33,17 +33,11 @@
<script>
jsTestIsAsync = true;
-function caretRectToString(rect) {
- if (!rect.width && !rect.height)
- return "empty";
- return `(left=${rect.left}, top=${rect.top}, width=${rect.width}, height=${rect.height})`;
-}
-
async function checkCaretRect(description)
{
await UIHelper.ensurePresentationUpdate();
const rect = await UIHelper.getUICaretViewRect();
- debug(`${description}, the caret rect is ${caretRectToString(rect)}`);
+ debug(`${description}, the caret rect is ${!rect.width && !rect.height ? "" : "not "}empty`);
}
(async () => {
@@ -54,10 +48,10 @@
await UIHelper.activateAndWaitForInputSessionAt(160, 50);
await checkCaretRect("After focus");
- await UIHelper.zoomToScale(3);
+ await UIHelper.immediateZoomToScale(3);
await UIHelper.typeCharacter("a");
await checkCaretRect("After zooming in");
- await UIHelper.zoomToScale(1);
+ await UIHelper.immediateZoomToScale(1);
editor.style.width = "100px";
editor.style.height = "100px";
Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (295547 => 295548)
--- trunk/LayoutTests/platform/ios-wk2/TestExpectations 2022-06-15 01:13:06 UTC (rev 295547)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations 2022-06-15 01:49:53 UTC (rev 295548)
@@ -2083,9 +2083,6 @@
webkit.org/b/229585 imported/w3c/web-platform-tests/navigation-timing/test_performance_attributes.sub.html [ Pass Failure ]
-#rdar://82183980 ([ iOS 15 ]editing/selection/ios/hide-selection-in-tiny-contenteditable.html is a flaky failure)
-editing/selection/ios/hide-selection-in-tiny-contenteditable.html [ Pass Failure ]
-
# On iOS15+, CFNetwork does full NSURLSession partitioning based on first-party domains and ITP session partitioning is thus disabled.
http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.py [ Skip ]
http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py [ Skip ]
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes