diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2012-03-07 19:38:39 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-13 10:11:22 +0100 |
commit | 6d85d77a5def22ef8a50505f3c7634146db73421 (patch) | |
tree | 4cca3983012a56033aee856996f56ff6e0721a56 | |
parent | 76ddc9bc0c14b01e2e3c760cade5265da4f4a5c1 (diff) |
Clean up test, check radio button and checkbox.
Change-Id: I4dcfa2014256aee10feb08146ae6fc3f402ac8fb
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
-rw-r--r-- | tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index 24469c74d0..3cd7d7c211 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -981,9 +981,12 @@ void tst_QAccessibility::buttonTest() QAccessible::State st; st.checked = true; QVERIFY_EVENT(QAccessibleStateChangeEvent(st, &checkBox)); + checkBox.setChecked(false); + QVERIFY_EVENT(QAccessibleStateChangeEvent(st, &checkBox)); delete interface; } + { // test radiobutton interface = QAccessible::queryAccessibleInterface(&radio); actionInterface = interface->actionInterface(); @@ -994,8 +997,12 @@ void tst_QAccessibility::buttonTest() QTest::qWait(500); QCOMPARE(actionInterface->actionNames(), QStringList() << QAccessibleActionInterface::checkAction() << QAccessibleActionInterface::setFocusAction()); QVERIFY(interface->state().checked); - QVERIFY(checkBox.isChecked()); + QVERIFY(radio.isChecked()); + QAccessible::State st; + st.checked = true; + QVERIFY_EVENT(QAccessibleStateChangeEvent(st, &radio)); delete interface; + } // // test standard toolbutton // QVERIFY(QAccessible::queryAccessibleInterface(&toolbutton, &test)); @@ -1045,8 +1052,6 @@ void tst_QAccessibility::buttonTest() // QCOMPARE(test->actionText(test->defaultAction(2), QAccessible::Name, 2), QString("Open")); // QCOMPARE(test->state(2), (int)QAccessible::HasPopup); // test->release(); - - QTestAccessibility::clearEvents(); } void tst_QAccessibility::scrollBarTest() |