summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-07-07 09:39:43 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-07-07 09:54:03 (GMT)
commitf70f321c8b5769476796e2bae540a57b3b62c684 (patch)
treedd6b4cfe816bfcd0b8b881f3fcc72c98ac0ee331 /tests/auto
parent53b116be1bbadd416449d9a0104f514139f495c8 (diff)
downloadQt-f70f321c8b5769476796e2bae540a57b3b62c684.zip
Qt-f70f321c8b5769476796e2bae540a57b3b62c684.tar.gz
Qt-f70f321c8b5769476796e2bae540a57b3b62c684.tar.bz2
Make sure we send a ValueChanged event if the spinbox value has changed
Unfortunately the codepath for keyPressEvent does not call updateState, so we have to add the same line in two places. Note that updateState() is only called from mousePressEvent() and mouseMoveEvent(). Task-number: 254053
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index 8a88b59..b8aec50 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -2623,6 +2623,13 @@ void tst_QAccessibility::spinBoxTest()
QVERIFY(childRect.isNull() == false);
}
+ spinBox->setFocus();
+ QTestAccessibility::clearEvents();
+ QTest::keyPress(spinBox, Qt::Key_Up);
+ QTest::qWait(200);
+ EventList events = QTestAccessibility::events();
+ QTestAccessibilityEvent expectedEvent(spinBox, 0, (int)QAccessible::ValueChanged);
+ QVERIFY(events.contains(expectedEvent));
delete spinBox;
QTestAccessibility::clearEvents();
#else