Test that we get key events from wxDataViewCtrl
This test passes in wxGTK after the previous commit changes.
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/dataview.h"
|
#include "wx/dataview.h"
|
||||||
|
#include "wx/uiaction.h"
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
#include "wx/stopwatch.h"
|
#include "wx/stopwatch.h"
|
||||||
#endif // __WXGTK__
|
#endif // __WXGTK__
|
||||||
@@ -412,4 +414,26 @@ TEST_CASE_METHOD(MultiColumnsDataViewCtrlTestCase,
|
|||||||
CHECK( m_lastColumn->GetWidth() >= lastColumnMinWidth );
|
CHECK( m_lastColumn->GetWidth() >= lastColumnMinWidth );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_UIACTIONSIMULATOR
|
||||||
|
|
||||||
|
TEST_CASE_METHOD(SingleSelectDataViewCtrlTestCase,
|
||||||
|
"wxDVC::KeyEvents",
|
||||||
|
"[wxDataViewCtrl][event]")
|
||||||
|
{
|
||||||
|
if ( !EnableUITests() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
EventCounter keyEvents(m_dvc->GetMainWindow(), wxEVT_KEY_DOWN);
|
||||||
|
|
||||||
|
m_dvc->SetFocus();
|
||||||
|
|
||||||
|
wxUIActionSimulator sim;
|
||||||
|
sim.Char(WXK_DOWN);
|
||||||
|
wxYield();
|
||||||
|
|
||||||
|
CHECK( keyEvents.GetCount() == 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_UIACTIONSIMULATOR
|
||||||
|
|
||||||
#endif //wxUSE_DATAVIEWCTRL
|
#endif //wxUSE_DATAVIEWCTRL
|
||||||
|
Reference in New Issue
Block a user