Skip to content

Commit

Permalink
REGRESSION (276307@main?): [ macOS ] TestWebKitAPI.WebKit.PDFLinkRefe…
Browse files Browse the repository at this point in the history
…rrer is flaky timeout

https://bugs.webkit.org/show_bug.cgi?id=271259
rdar://125027483

Reviewed by Abrar Rahman Protyasha.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm:
(TEST):
Make sure layout is up to date before tapping on the PDF, or the HUD might
be in the wrong place and eat the touch.

Canonical link: https://commits.webkit.org/276369@main
  • Loading branch information
hortont424 committed Mar 19, 2024
1 parent 80b0cc5 commit 0ebe5ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tools/TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ HTTPServer server([] (Connection connection) {
EXPECT_NULL([action.request valueForHTTPHeaderField:@"Referer"]);
decisionHandler(WKNavigationActionPolicyAllow);
};

// We need to make sure the WKWebView's layout is up to date
// or the clicks might get eaten by the PDF's HUD.
[webView layoutSubtreeIfNeeded];

[webView sendClicksAtPoint:NSMakePoint(75, 75) numberOfClicks:1];
[navigationDelegate waitForDidFinishNavigation];
Expand Down

0 comments on commit 0ebe5ab

Please sign in to comment.