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
void WebTestCase::setUp()
{
- m_loaded = new EventCounter(m_browser, wxEVT_WEBVIEW_LOADED);
-
m_browser = wxWebView::New(wxTheApp->GetTopWindow(), wxID_ANY);
+ m_loaded = new EventCounter(m_browser, wxEVT_WEBVIEW_LOADED);
+ m_browser->LoadUrl("about:");
ENSURE_LOADED;
}