Skip to content

[iOS] TestWebKitAPI.EditorStateTests.SelectedTextRange_CaretSelectionWithZoom is a flaky failure #47202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

pxlcoder
Copy link
Member

@pxlcoder pxlcoder commented Jun 25, 2025

f0ec0e0

[iOS] TestWebKitAPI.EditorStateTests.SelectedTextRange_CaretSelectionWithZoom is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=294922
rdar://154216068

Reviewed by Abrar Rahman Protyasha.

Wait for a visible content rect update before setting the zoom scale, so that
it does get overridden on next layer tree commit.

Additionally, treat the zoom scale change as a user triggered zoom by swizzling
the state on the gesture recognizer. Without this, the zoom scale may get when
the viewport configuration changes.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:
(TestWebKitAPI::TEST(EditorStateTests, SelectedTextRange_CaretSelectionWithZoom)):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm:
(TestWebKitAPI::UNIFIED_PDF_TEST):

Adopt the new helper in another test.

* Tools/TestWebKitAPI/cocoa/TestWKWebView.h:
* Tools/TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView setZoomScaleSimulatingUserTriggeredZoom:]):

Canonical link: https://commits.webkit.org/296645@main

4cc3509

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🛠 tv
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@pxlcoder pxlcoder self-assigned this Jun 25, 2025
@pxlcoder pxlcoder added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Jun 25, 2025
@pxlcoder pxlcoder added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 26, 2025
…WithZoom is a flaky failure

https://bugs.webkit.org/show_bug.cgi?id=294922
rdar://154216068

Reviewed by Abrar Rahman Protyasha.

Wait for a visible content rect update before setting the zoom scale, so that
it does get overridden on next layer tree commit.

Additionally, treat the zoom scale change as a user triggered zoom by swizzling
the state on the gesture recognizer. Without this, the zoom scale may get when
the viewport configuration changes.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:
(TestWebKitAPI::TEST(EditorStateTests, SelectedTextRange_CaretSelectionWithZoom)):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm:
(TestWebKitAPI::UNIFIED_PDF_TEST):

Adopt the new helper in another test.

* Tools/TestWebKitAPI/cocoa/TestWKWebView.h:
* Tools/TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView setZoomScaleSimulatingUserTriggeredZoom:]):

Canonical link: https://commits.webkit.org/296645@main
@webkit-commit-queue
Copy link
Collaborator

Committed 296645@main (f0ec0e0): https://commits.webkit.org/296645@main

Reviewed commits have been landed. Closing PR #47202 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit f0ec0e0 into WebKit:main Jun 26, 2025
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Bugs Unclassified bugs are placed in this component until the correct component can be determined.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants