Merge wxWebView JavaScript improvements branch

This is a squashed commit of the SOC2017_WEBVIEW_JS branch from
https://github.com/joseeloren/wxWidgets.git

Closes https://github.com/wxWidgets/wxWidgets/pull/538
This commit is contained in:
Jose Lorenzo
2017-09-02 23:24:06 +01:00
committed by Vadim Zeitlin
parent 9f4f075034
commit af8f7f33c3
14 changed files with 757 additions and 49 deletions

View File

@@ -100,13 +100,13 @@ public:
#define WX_ASSERT_FAILS_WITH_ASSERT(cond)
#endif
#define WX_ASSERT_EVENT_OCCURS(eventcounter, count) \
#define WX_ASSERT_EVENT_OCCURS_IN(eventcounter, count, ms) \
{\
wxStopWatch sw; \
wxEventLoopBase* loop = wxEventLoopBase::GetActive(); \
while(eventcounter.GetCount() < count) \
{ \
if(sw.Time() < 100) \
if(sw.Time() < ms) \
loop->Dispatch(); \
else \
{ \
@@ -119,6 +119,8 @@ public:
eventcounter.Clear(); \
}
#define WX_ASSERT_EVENT_OCCURS(eventcounter,count) WX_ASSERT_EVENT_OCCURS_IN(eventcounter, count, 100)
// these functions can be used to hook into wxApp event processing and are
// currently used by the events propagation test
class WXDLLIMPEXP_FWD_BASE wxEvent;