]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/html/htmlwindow.cpp
using button impl
[wxWidgets.git] / tests / html / htmlwindow.cpp
index bfeadc5a473454fb8ab1edb4041d707b24c50b70..ece296e8aeaf81f2c8a110faeb37f0f532894855 100644 (file)
@@ -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