X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6edb39127bd8694809ee5348592c0ab5e1f6b70a..7f98bdd6a50b7d328a6fb3bd59a95e36f34aa68c:/tests/controls/webtest.cpp?ds=inline diff --git a/tests/controls/webtest.cpp b/tests/controls/webtest.cpp index 7083d063bb..41e7adfdfe 100644 --- a/tests/controls/webtest.cpp +++ b/tests/controls/webtest.cpp @@ -9,7 +9,7 @@ #include "testprec.h" -#if wxUSE_WEBVIEW +#if wxUSE_WEBVIEW && (wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_IE) #ifdef __BORLANDC__ #pragma hdrstop @@ -44,6 +44,7 @@ private: CPPUNIT_TEST( Selection ); CPPUNIT_TEST( Zoom ); CPPUNIT_TEST( RunScript ); + CPPUNIT_TEST( SetPage ); CPPUNIT_TEST_SUITE_END(); void Title(); @@ -56,6 +57,7 @@ private: void Selection(); void Zoom(); void RunScript(); + void SetPage(); void LoadUrl(int times = 1); wxWebView* m_browser; @@ -244,4 +246,13 @@ void WebTestCase::RunScript() CPPUNIT_ASSERT_EQUAL("Hello World!", m_browser->GetPageText()); } -#endif //wxUSE_WEBVIEW +void WebTestCase::SetPage() +{ + m_browser->SetPage("text", ""); + CPPUNIT_ASSERT_EQUAL("text", m_browser->GetPageText()); + + m_browser->SetPage("other text", ""); + CPPUNIT_ASSERT_EQUAL("other text", m_browser->GetPageText()); +} + +#endif //wxUSE_WEBVIEW && (wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_IE)