+void WebTestCase::Zoom()
+{
+ // FIXME: This test fails on MSW buildbot slaves although works fine on
+ // development machine.
+ if ( wxGetUserId().Lower().Matches("buildslave*") )
+ return;
+
+ if(m_browser->CanSetZoomType(wxWEB_VIEW_ZOOM_TYPE_LAYOUT))
+ {
+ m_browser->SetZoomType(wxWEB_VIEW_ZOOM_TYPE_LAYOUT);
+ CPPUNIT_ASSERT_EQUAL(wxWEB_VIEW_ZOOM_TYPE_LAYOUT, m_browser->GetZoomType());
+
+ m_browser->SetZoom(wxWEB_VIEW_ZOOM_TINY);
+ CPPUNIT_ASSERT_EQUAL(wxWEB_VIEW_ZOOM_TINY, m_browser->GetZoom());
+ }
+
+ //Reset the zoom level
+ m_browser->SetZoom(wxWEB_VIEW_ZOOM_MEDIUM);
+
+ if(m_browser->CanSetZoomType(wxWEB_VIEW_ZOOM_TYPE_TEXT))
+ {
+ m_browser->SetZoomType(wxWEB_VIEW_ZOOM_TYPE_TEXT);
+ CPPUNIT_ASSERT_EQUAL(wxWEB_VIEW_ZOOM_TYPE_TEXT, m_browser->GetZoomType());
+
+ m_browser->SetZoom(wxWEB_VIEW_ZOOM_TINY);
+ CPPUNIT_ASSERT_EQUAL(wxWEB_VIEW_ZOOM_TINY, m_browser->GetZoom());
+ }
+}
+
+void WebTestCase::RunScript()
+{
+ m_browser->RunScript("document.write(\"Hello World!\");");
+ CPPUNIT_ASSERT_EQUAL("Hello World!", m_browser->GetPageText());
+}
+
+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());