From 6c2e702357a72a2ae3115f42f672676a54464e46 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 26 Feb 2016 20:40:30 +0100 Subject: [PATCH] Add another sleep to make menu unit test pass under wxGTK At least when using GNOME, the frame containing the menu doesn't appear on screen in time for wxUIActionSimulator to use it without this. --- tests/menu/menu.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/menu/menu.cpp b/tests/menu/menu.cpp index 4d921cec3f..454baac66c 100644 --- a/tests/menu/menu.cpp +++ b/tests/menu/menu.cpp @@ -499,6 +499,12 @@ void MenuTestCase::Events() m_frame->SetFocus(); wxYield(); +#ifdef __WXGTK__ + // This is another test which fails with wxGTK without this delay because + // the frame doesn't appear on screen in time. + wxMilliSleep(50); +#endif // __WXGTK__ + wxUIActionSimulator sim; sim.KeyDown(WXK_F1); sim.KeyUp(WXK_F1);