From: Steve Lamerton Date: Thu, 14 Jul 2011 13:33:20 +0000 (+0000) Subject: Yield after control creation to allow it to load the initial page. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d563e28f820f695f5148cf7e6c44993fac3bc1a7?ds=inline Yield after control creation to allow it to load the initial page. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/tests/controls/webtest.cpp b/tests/controls/webtest.cpp index e20d0bb857..5e5dfbd5a2 100644 --- a/tests/controls/webtest.cpp +++ b/tests/controls/webtest.cpp @@ -68,6 +68,8 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( WebTestCase, "WebTestCase" ); void WebTestCase::setUp() { m_browser = wxWebView::New(wxTheApp->GetTopWindow(), wxID_ANY); + //We yield to let the initial page load + wxYield(); } void WebTestCase::tearDown() @@ -99,7 +101,7 @@ void WebTestCase::Title() void WebTestCase::Url() { - CPPUNIT_ASSERT_EQUAL("", m_browser->GetCurrentURL()); + CPPUNIT_ASSERT_EQUAL("about:blank", m_browser->GetCurrentURL()); LoadUrl("about:blank"); CPPUNIT_ASSERT_EQUAL("about:blank", m_browser->GetCurrentURL());