From 4776f0c8c5cab0816974874140a3b429ae126fe0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 25 Apr 2013 12:53:51 +0000 Subject: [PATCH] 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 --- tests/controls/webtest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/controls/webtest.cpp b/tests/controls/webtest.cpp index 61e33298c3..d12479621e 100644 --- a/tests/controls/webtest.cpp +++ b/tests/controls/webtest.cpp @@ -77,10 +77,10 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( WebTestCase, "WebTestCase" ); 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; } -- 2.45.2