Make wxUIActionSimulator works more reliably on GTK/X11
Add wxXSync class which adds delays between the synthesized events sufficient for them to be processed by the higher layers (X, GTK). This makes it possible to run the UI tests by default with wxGTK. Closes https://github.com/wxWidgets/wxWidgets/pull/1845
This commit is contained in:
committed by
Vadim Zeitlin
parent
fb5c13ed00
commit
59ad9f46e6
@@ -27,6 +27,7 @@
|
||||
#include "wx/caret.h"
|
||||
#include "wx/cshelp.h"
|
||||
#include "wx/scopedptr.h"
|
||||
#include "wx/stopwatch.h"
|
||||
#include "wx/tooltip.h"
|
||||
|
||||
class WindowTestCase
|
||||
@@ -35,6 +36,13 @@ public:
|
||||
WindowTestCase()
|
||||
: m_window(new wxWindow(wxTheApp->GetTopWindow(), wxID_ANY))
|
||||
{
|
||||
#ifdef __WXGTK3__
|
||||
// Without this, when running this test suite solo it succeeds,
|
||||
// but not when running it together with the other tests !!
|
||||
// Not needed when run under Xvfb display.
|
||||
for ( wxStopWatch sw; sw.Time() < 50; )
|
||||
wxYield();
|
||||
#endif
|
||||
}
|
||||
|
||||
~WindowTestCase()
|
||||
|
Reference in New Issue
Block a user