Fix wxComboBox unit test under wxGTK after recent changes
wxEVT_COMBOBOX_CLOSEUP is sent during idle time after the changes of
a216806c99
, so add wxYield() to make sure that
the unit test gets it.
See #17223.
This commit is contained in:
@@ -145,10 +145,16 @@ void ComboBoxTestCase::PopDismiss()
|
|||||||
EventCounter close(m_combo, wxEVT_COMBOBOX_CLOSEUP);
|
EventCounter close(m_combo, wxEVT_COMBOBOX_CLOSEUP);
|
||||||
|
|
||||||
m_combo->Popup();
|
m_combo->Popup();
|
||||||
|
CPPUNIT_ASSERT_EQUAL(1, drop.GetCount());
|
||||||
|
|
||||||
m_combo->Dismiss();
|
m_combo->Dismiss();
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(1, drop.GetCount());
|
#if defined(__WXGTK__) && !defined(__WXGTK3__)
|
||||||
|
// Under wxGTK2, the event is sent only during idle time and not
|
||||||
|
// immediately, so we need this yield to get it.
|
||||||
|
wxYield();
|
||||||
CPPUNIT_ASSERT_EQUAL(1, close.GetCount());
|
CPPUNIT_ASSERT_EQUAL(1, close.GetCount());
|
||||||
|
#endif // wxGTK2
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user