]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/events/keyboard.cpp
using ordinary Show for popup windows as on MSW which activates it as well, I'll...
[wxWidgets.git] / tests / events / keyboard.cpp
index 86171ecf12d4875576f9307c258ce1912dc20e4d..10fb56e3fee3c3f26670b9b0d3e939d8409f4722 100644 (file)
@@ -17,7 +17,9 @@
     #pragma hdrstop
 #endif
 
     #pragma hdrstop
 #endif
 
-#if wxUSE_UIACTIONSIMULATOR
+// FIXME: As all the other tests involving wxUIActionSimulator, this one is
+//        broken under OS X, the test window siply never gets any events.
+#if wxUSE_UIACTIONSIMULATOR && !defined(__WXOSX__)
 
 #ifndef WX_PRECOMP
     #include "wx/app.h"
 
 #ifndef WX_PRECOMP
     #include "wx/app.h"
@@ -39,7 +41,7 @@ class KeyboardTestWindow : public wxWindow
 {
 public:
     KeyboardTestWindow(wxWindow *parent)
 {
 public:
     KeyboardTestWindow(wxWindow *parent)
-        : wxWindow(parent, wxID_ANY)
+        : wxWindow(parent, wxID_ANY, wxPoint(0, 0), parent->GetClientSize())
     {
         Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(KeyboardTestWindow::OnKeyDown));
         Connect(wxEVT_CHAR, wxKeyEventHandler(KeyboardTestWindow::OnChar));
     {
         Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(KeyboardTestWindow::OnKeyDown));
         Connect(wxEVT_CHAR, wxKeyEventHandler(KeyboardTestWindow::OnChar));
@@ -347,22 +349,22 @@ void KeyboardEventTestCase::ShiftLetter()
 void KeyboardEventTestCase::ShiftSpecial()
 {
     wxUIActionSimulator sim;
 void KeyboardEventTestCase::ShiftSpecial()
 {
     wxUIActionSimulator sim;
-    sim.Char(WXK_TAB, wxMOD_SHIFT);
+    sim.Char(WXK_F3, wxMOD_SHIFT);
     wxYield();
 
     CPPUNIT_ASSERT_EQUAL( 2, m_win->GetKeyDownCount() );
     ASSERT_KEY_EVENT_IS( m_win->GetKeyDownEvent(0),
                          ModKeyDown(WXK_SHIFT) );
     ASSERT_KEY_EVENT_IS( m_win->GetKeyDownEvent(1),
     wxYield();
 
     CPPUNIT_ASSERT_EQUAL( 2, m_win->GetKeyDownCount() );
     ASSERT_KEY_EVENT_IS( m_win->GetKeyDownEvent(0),
                          ModKeyDown(WXK_SHIFT) );
     ASSERT_KEY_EVENT_IS( m_win->GetKeyDownEvent(1),
-                         KeyDesc(WXK_TAB, wxMOD_SHIFT) );
+                         KeyDesc(WXK_F3, wxMOD_SHIFT) );
 
     CPPUNIT_ASSERT_EQUAL( 1, m_win->GetCharCount() );
     ASSERT_KEY_EVENT_IS( m_win->GetCharEvent(),
 
     CPPUNIT_ASSERT_EQUAL( 1, m_win->GetCharCount() );
     ASSERT_KEY_EVENT_IS( m_win->GetCharEvent(),
-                         KeyDesc(WXK_TAB, wxMOD_SHIFT) );
+                         KeyDesc(WXK_F3, wxMOD_SHIFT) );
 
     CPPUNIT_ASSERT_EQUAL( 2, m_win->GetKeyUpCount() );
     ASSERT_KEY_EVENT_IS( m_win->GetKeyUpEvent(0),
 
     CPPUNIT_ASSERT_EQUAL( 2, m_win->GetKeyUpCount() );
     ASSERT_KEY_EVENT_IS( m_win->GetKeyUpEvent(0),
-                         KeyDesc(WXK_TAB, wxMOD_SHIFT) );
+                         KeyDesc(WXK_F3, wxMOD_SHIFT) );
     ASSERT_KEY_EVENT_IS( m_win->GetKeyUpEvent(1),
                          ModKeyUp(WXK_SHIFT) );
 }
     ASSERT_KEY_EVENT_IS( m_win->GetKeyUpEvent(1),
                          ModKeyUp(WXK_SHIFT) );
 }