Skip to content

Commit

Permalink
NEW-TEST(290390@main): [ iOS ] TestWebKitAPI.UnifiedPDF.SelectionClea…
Browse files Browse the repository at this point in the history
…rsOnAnchorLinkTap(api-test) is a constant crash

https://bugs.webkit.org/show_bug.cgi?id=288400
rdar://145503896

Reviewed by Wenson Hsieh.

This test is crashing like this:

```
CRASH:
 TestWebKitAPI.UnifiedPDF.SelectionClearsOnAnchorLinkTap
        SHOULD NEVER BE REACHED
        /Volumes/Data/worker/Apple-iOS-18-Simulator-Debug-Build/build/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.mm(137) : WebCore::MouseEventPolicy WebKit::coreMouseEventPolicy(_WKWebsiteMouseEventPolicy)
        1   0x14c30e084 WebKit::coreMouseEventPolicy(unsigned long)
        2   0x14c30dff4 -[WKWebpagePreferences _setMouseEventPolicy:]
        3   0x101d13628 TestWebKitAPI::UnifiedPDF_SelectionClearsOnAnchorLinkTap_Test::TestBody()
```

The crash happens in open source iOS configurations because we are not
able to handle _WKWebsiteMouseEventPolicySynthesizeTouchEvents, since
ENABLE_IOS_TOUCH_EVENTS==0 in these configurations.

As such, let us gate this test behind ENABLE(IOS_TOUCH_EVENTS).

* Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm:

Canonical link: https://commits.webkit.org/290983@main
  • Loading branch information
aprotyas committed Feb 24, 2025
1 parent 5d4feea commit 2f9c119
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ void pressKey(auto key, unsigned short code, Seconds duration = 200_ms)
TestWebKitAPI::Util::run(&done);
}

#if ENABLE(IOS_TOUCH_EVENTS)
UNIFIED_PDF_TEST(SelectionClearsOnAnchorLinkTap)
{
RetainPtr webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configurationForWebViewTestingUnifiedPDF().get()]);
Expand All @@ -542,6 +543,7 @@ void pressKey(auto key, unsigned short code, Seconds duration = 200_ms)
[webView waitForNextPresentationUpdate];
EXPECT_WK_STREQ("", [contentView selectedText]);
}
#endif

#endif

Expand Down

0 comments on commit 2f9c119

Please sign in to comment.