Fix wxWebView test setup failure under OS X.
Call LoadUrl() after associating our custom event handler with the browser object as otherwise the wxEVT_WEBVIEW_LOADED event could be generated before we were set up to catch it, resulting in the assertion failure inside ENSURE_LOADED. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
3bc1418b81
commit
4776f0c8c5
@ -77,10 +77,10 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( WebTestCase, "WebTestCase" );
|
|||||||
|
|
||||||
void WebTestCase::setUp()
|
void WebTestCase::setUp()
|
||||||
{
|
{
|
||||||
m_loaded = new EventCounter(m_browser, wxEVT_WEBVIEW_LOADED);
|
|
||||||
|
|
||||||
m_browser = wxWebView::New(wxTheApp->GetTopWindow(), wxID_ANY);
|
m_browser = wxWebView::New(wxTheApp->GetTopWindow(), wxID_ANY);
|
||||||
|
|
||||||
|
m_loaded = new EventCounter(m_browser, wxEVT_WEBVIEW_LOADED);
|
||||||
|
m_browser->LoadUrl("about:");
|
||||||
ENSURE_LOADED;
|
ENSURE_LOADED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user