summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/qaccessibility
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-06-27 13:23:01 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-19 14:23:13 +0200
commit41f496cb7f63da012f73bfe7904c225e91d300da (patch)
tree1d2d6514ee86e2fd6a4d596450478f679178eeaf /tests/auto/other/qaccessibility
parentcf621f1b9e472d394bcab922d0a1a205bc539b02 (diff)
Accessibility: QSpinBox should not have any children
On both iOS and Android it is very confusing to be able to move the focus to both, the line edit and the outer frame that is the spin box. For Linux this fixes an issue that orca would not read the value correctly after pressing the up/down buttons. Task-number: QTBUG-39861 Task-number: QTBUG-39442 Change-Id: I73c50c91e9021324c52d168d537afd0ea719a48f Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'tests/auto/other/qaccessibility')
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 88f2120e62..2353d5b5b5 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -1676,13 +1676,10 @@ void tst_QAccessibility::spinBoxTest()
QCOMPARE(accessibleRect, widgetRect);
QCOMPARE(interface->text(QAccessible::Value), QLatin1String("3"));
- // one child, the line edit
+ // make sure that the line edit is not there
const int numChildren = interface->childCount();
- QCOMPARE(numChildren, 1);
- QAccessibleInterface *lineEdit = interface->child(0);
-
- QCOMPARE(lineEdit->role(), QAccessible::EditableText);
- QCOMPARE(lineEdit->text(QAccessible::Value), QLatin1String("3"));
+ QCOMPARE(numChildren, 0);
+ QVERIFY(interface->child(0) == Q_NULLPTR);
QVERIFY(interface->valueInterface());
QCOMPARE(interface->valueInterface()->currentValue().toInt(), 3);
@@ -1696,6 +1693,10 @@ void tst_QAccessibility::spinBoxTest()
QTest::qWait(200);
QAccessibleValueChangeEvent expectedEvent(spinBox, spinBox->value());
QVERIFY(QTestAccessibility::containsEvent(&expectedEvent));
+
+ QAccessibleTextInterface *textIface = interface->textInterface();
+ QVERIFY(textIface);
+
delete spinBox;
QTestAccessibility::clearEvents();
}