X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30e2c04682172cb020da6a9063dd35ec84cacdb8..7f98bdd6a50b7d328a6fb3bd59a95e36f34aa68c:/tests/controls/webtest.cpp?ds=inline diff --git a/tests/controls/webtest.cpp b/tests/controls/webtest.cpp index 7ab8a7570e..41e7adfdfe 100644 --- a/tests/controls/webtest.cpp +++ b/tests/controls/webtest.cpp @@ -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()); } +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)