]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/html/htmlwindow.cpp
proper default for iphone
[wxWidgets.git] / tests / html / htmlwindow.cpp
index f713676ef96b44a5aec7bc01445f9d1eecfca78e..77344661494401446055bfe7fdd8912106bc885e 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wxHtmlWindow tests
 // Author:      Vaclav Slavik
 // Created:     2008-10-15
-// RCS-ID:      $Id$
 // Copyright:   (c) 2008 Vaclav Slavik <vslavik@fastmail.fm>
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -64,7 +63,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 +119,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_HTML_CELL_CLICKED);
 
     wxUIActionSimulator sim;
 
@@ -137,15 +133,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_HTML_LINK_CLICKED);
 
     wxUIActionSimulator sim;
 
@@ -159,7 +152,7 @@ void HtmlWindowTestCase::LinkClick()
     sim.MouseClick();
     wxYield();
 
-    CPPUNIT_ASSERT_EQUAL(1, frame->GetEventCount());
+    CPPUNIT_ASSERT_EQUAL(1, clicked.GetCount());
 }
 #endif // wxUSE_UIACTIONSIMULATOR