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.
This commit is contained in:
Vadim Zeitlin
2026-09-10 18:34:24 +02:00
parent f6e6edcb5a
commit a87d72ef27
+11
View File
@@ -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());