X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41933aa5a0de47e845a833127a99f7ae9f3df2ea..e1efca652844273c3e8d32c7e5f442b87e455ca7:/tests/controls/webtest.cpp?ds=sidebyside diff --git a/tests/controls/webtest.cpp b/tests/controls/webtest.cpp index 8154a9032b..ae4cfe2245 100644 --- a/tests/controls/webtest.cpp +++ b/tests/controls/webtest.cpp @@ -43,6 +43,7 @@ private: CPPUNIT_TEST( Editable ); CPPUNIT_TEST( Selection ); CPPUNIT_TEST( Zoom ); + CPPUNIT_TEST( RunScript ); CPPUNIT_TEST_SUITE_END(); void Title(); @@ -54,6 +55,7 @@ private: void Editable(); void Selection(); void Zoom(); + void RunScript(); void LoadUrl(int times = 1); wxWebView* m_browser; @@ -236,4 +238,10 @@ void WebTestCase::Zoom() } } +void WebTestCase::RunScript() +{ + m_browser->RunScript("document.write(\"Hello World!\");"); + CPPUNIT_ASSERT_EQUAL("Hello World!", m_browser->GetPageText()); +} + #endif //wxUSE_WEB