X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/232fdc630c42eb165f7659981043e794be03b3b7..9e1da4827a0ec18f9766d664b9af12c25e3f71fb:/tests/html/htmlwindow.cpp diff --git a/tests/html/htmlwindow.cpp b/tests/html/htmlwindow.cpp index f713676ef9..ece296e8ae 100644 --- a/tests/html/htmlwindow.cpp +++ b/tests/html/htmlwindow.cpp @@ -64,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" ); // ---------------------------------------------------------------------------- @@ -120,10 +120,7 @@ void HtmlWindowTestCase::Title() #if wxUSE_UIACTIONSIMULATOR void HtmlWindowTestCase::CellClick() { - wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(), - wxTestableFrame); - - EventCounter count1(m_win, wxEVT_COMMAND_HTML_CELL_CLICKED); + EventCounter clicked(m_win, wxEVT_COMMAND_HTML_CELL_CLICKED); wxUIActionSimulator sim; @@ -137,15 +134,12 @@ void HtmlWindowTestCase::CellClick() sim.MouseClick(); wxYield(); - CPPUNIT_ASSERT_EQUAL(1, frame->GetEventCount()); + CPPUNIT_ASSERT_EQUAL(1, clicked.GetCount()); } void HtmlWindowTestCase::LinkClick() { - wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(), - wxTestableFrame); - - EventCounter count1(m_win, wxEVT_COMMAND_HTML_LINK_CLICKED); + EventCounter clicked(m_win, wxEVT_COMMAND_HTML_LINK_CLICKED); wxUIActionSimulator sim; @@ -159,7 +153,7 @@ void HtmlWindowTestCase::LinkClick() sim.MouseClick(); wxYield(); - CPPUNIT_ASSERT_EQUAL(1, frame->GetEventCount()); + CPPUNIT_ASSERT_EQUAL(1, clicked.GetCount()); } #endif // wxUSE_UIACTIONSIMULATOR