Enable wxSlider "Thumb" unit test under GTK too
This was disabled, but only didn't work because wxSlider used tiny size
in wxGTK by default previously. After correcting this in aa2d159e8c
(Use
more reasonable length for wxSlider in wxGTK by default, 2020-08-04),
the unit test passes with wxGTK too and can be reenabled.
Closes https://github.com/wxWidgets/wxWidgets/pull/1992
This commit is contained in:
committed by
Vadim Zeitlin
parent
aa2d159e8c
commit
2256dac384
@@ -188,7 +188,7 @@ void SliderTestCase::Range()
|
||||
|
||||
void SliderTestCase::Thumb()
|
||||
{
|
||||
#if wxUSE_UIACTIONSIMULATOR && !defined(__WXGTK__)
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
EventCounter track(m_slider, wxEVT_SCROLL_THUMBTRACK);
|
||||
EventCounter release(m_slider, wxEVT_SCROLL_THUMBRELEASE);
|
||||
EventCounter changed(m_slider, wxEVT_SCROLL_CHANGED);
|
||||
@@ -197,12 +197,14 @@ void SliderTestCase::Thumb()
|
||||
|
||||
m_slider->SetValue(0);
|
||||
|
||||
sim.MouseDragDrop(m_slider->ClientToScreen(wxPoint(10, 10)),m_slider->ClientToScreen(wxPoint(50, 10)));
|
||||
// use the slider real position for dragging the mouse.
|
||||
const int ypos = m_slider->GetSize().y / 2;
|
||||
sim.MouseDragDrop(m_slider->ClientToScreen(wxPoint(10, ypos)),m_slider->ClientToScreen(wxPoint(50, ypos)));
|
||||
wxYield();
|
||||
|
||||
CPPUNIT_ASSERT(track.GetCount() != 0);
|
||||
CPPUNIT_ASSERT_EQUAL(1, release.GetCount());
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__) || defined(__WXGTK__)
|
||||
CPPUNIT_ASSERT_EQUAL(1, changed.GetCount());
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user