X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c39058f631b3a53682f00807a60bfff6c5aa2b7c..17beda75ef9780ebef5044e41889a9b598dcf186:/tests/html/htmlwindow.cpp diff --git a/tests/html/htmlwindow.cpp b/tests/html/htmlwindow.cpp index 936954fe0c..ece296e8ae 100644 --- a/tests/html/htmlwindow.cpp +++ b/tests/html/htmlwindow.cpp @@ -13,6 +13,8 @@ #include "testprec.h" +#if wxUSE_HTML + #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -22,6 +24,8 @@ #endif // WX_PRECOMP #include "wx/html/htmlwin.h" +#include "wx/uiaction.h" +#include "testableframe.h" // ---------------------------------------------------------------------------- // test class @@ -38,9 +42,19 @@ public: private: CPPUNIT_TEST_SUITE( HtmlWindowTestCase ); CPPUNIT_TEST( SelectionToText ); + CPPUNIT_TEST( Title ); +#if wxUSE_UIACTIONSIMULATOR + WXUISIM_TEST( CellClick ); + WXUISIM_TEST( LinkClick ); +#endif // wxUSE_UIACTIONSIMULATOR + CPPUNIT_TEST( AppendToPage ); CPPUNIT_TEST_SUITE_END(); void SelectionToText(); + void Title(); + void CellClick(); + void LinkClick(); + void AppendToPage(); wxHtmlWindow *m_win; @@ -50,7 +64,7 @@ private: // register in the unnamed registry so that these tests are run by default CPPUNIT_TEST_SUITE_REGISTRATION( HtmlWindowTestCase ); -// also include in it's own registry so that these tests can be run alone +// also include in its own registry so that these tests can be run alone CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( HtmlWindowTestCase, "HtmlWindowTestCase" ); // ---------------------------------------------------------------------------- @@ -59,13 +73,13 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( HtmlWindowTestCase, "HtmlWindowTestCase" void HtmlWindowTestCase::setUp() { - m_win = new wxHtmlWindow(wxTheApp->GetTopWindow(), wxID_ANY); + m_win = new wxHtmlWindow(wxTheApp->GetTopWindow(), wxID_ANY, + wxDefaultPosition, wxSize(400, 200)); } void HtmlWindowTestCase::tearDown() { - m_win->Destroy(); - m_win = NULL; + wxDELETE(m_win); } // ---------------------------------------------------------------------------- @@ -74,11 +88,17 @@ void HtmlWindowTestCase::tearDown() static const char *TEST_MARKUP = "
" + ""
" A longer line
"
" and the last line."
"";
+static const char *TEST_MARKUP_LINK =
+ "