From a87d72ef273e1d2eb226088b8528704dbb85176c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 10 Sep 2026 18:34:24 +0200 Subject: [PATCH] Wait for selection in wxWebView longer when running under Wayland Since running tests under Wayland was enabled this test has started failing there, so try waiting for longer to see if it helps. See #23403. --- tests/controls/webtest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/controls/webtest.cpp b/tests/controls/webtest.cpp index e30a51c14d..9f7080718f 100644 --- a/tests/controls/webtest.cpp +++ b/tests/controls/webtest.cpp @@ -237,6 +237,17 @@ TEST_CASE_METHOD(WebViewTestCase, "WebView", "[wxWebView]") // without wxYielding a bit because this seems to cause the extension // to hang with webkit 2.40.0+. YieldForAWhile(); + + if ( IsRunningUnderWayland() ) + { + // Waiting 50ms doesn't seem to be enough under Wayland, so wait + // for the selection to become available for longer time. + if ( !WaitFor("selection", + [this]() { return m_browser->HasSelection(); }) ) + { + return; + } + } #endif // wxUSE_WEBVIEW_WEBKIT2 CHECK(m_browser->HasSelection());