Add RunScript and implement on all backends. Document and add a very simple unit test.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-07-15 12:38:47 +00:00
parent 41933aa5a0
commit c9ccc09c64
9 changed files with 45 additions and 34 deletions

View File

@@ -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