]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix wxWebView test setup failure under OS X.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 25 Apr 2013 12:53:51 +0000 (12:53 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 25 Apr 2013 12:53:51 +0000 (12:53 +0000)
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

index 61e33298c39bced52f58f1c5269b5309b1ab1969..d12479621e4e43232a3d484ffb8f9841e2763074 100644 (file)
@@ -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;
 }