#include "testprec.h"
-#if wxUSE_WEB
+#if wxUSE_WEBVIEW && (wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_IE)
#ifdef __BORLANDC__
#pragma hdrstop
CPPUNIT_TEST( Selection );
CPPUNIT_TEST( Zoom );
CPPUNIT_TEST( RunScript );
+ CPPUNIT_TEST( SetPage );
CPPUNIT_TEST_SUITE_END();
void Title();
void Selection();
void Zoom();
void RunScript();
+ void SetPage();
void LoadUrl(int times = 1);
wxWebView* m_browser;
for(int i = 0; i < times; i++)
{
if(i % 2 == 1)
- m_browser->LoadUrl("about:blank");
+ m_browser->LoadURL("about:blank");
else
- m_browser->LoadUrl("about:");
+ m_browser->LoadURL("about:");
wxYield();
}
}
CPPUNIT_ASSERT_EQUAL("Hello World!", m_browser->GetPageText());
}
-#endif //wxUSE_WEB
+void WebTestCase::SetPage()
+{
+ m_browser->SetPage("<html><body>text</body></html>", "");
+ CPPUNIT_ASSERT_EQUAL("text", m_browser->GetPageText());
+
+ m_browser->SetPage("<html><body>other text</body></html>", "");
+ CPPUNIT_ASSERT_EQUAL("other text", m_browser->GetPageText());
+}
+
+#endif //wxUSE_WEBVIEW && (wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_IE)