summaryrefslogtreecommitdiffstats
path: root/tests/auto/qaccessibility
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>2011-09-23 12:23:52 (GMT)
committerFrederik Gladhorn <frederik.gladhorn@nokia.com>2011-09-23 16:56:44 (GMT)
commit3df9ac2f0719718ceb7385e46445447d95fd7857 (patch)
tree3c48ec43095916885590cf9c2faa6bc182eac298 /tests/auto/qaccessibility
parent244ccf1cd7434b4f9ef4dbcdb39ae5c70610952c (diff)
downloadQt-3df9ac2f0719718ceb7385e46445447d95fd7857.zip
Qt-3df9ac2f0719718ceb7385e46445447d95fd7857.tar.gz
Qt-3df9ac2f0719718ceb7385e46445447d95fd7857.tar.bz2
Fix accessible menu not returning child name.
When accessible name is set, QAccessibleMenu would always return the menu's name, not that of the child action. Task-Number: QTBUG-21578 Reviewed-by: Jan-Arve
Diffstat (limited to 'tests/auto/qaccessibility')
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index d452820..d24f52f 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -2531,6 +2531,12 @@ void tst_QAccessibility::menuTest()
QCOMPARE(interface->actionText(QAccessible::DefaultAction, QAccessible::Name, 4), QString());
QCOMPARE(interface->actionText(QAccessible::DefaultAction, QAccessible::Name, 5), QString("Execute"));
+ // QTBUG-21578 - after setting accessible name on a menu it would no longer
+ // return the right names for it's children.
+ QCOMPARE(interface->text(QAccessible::Name, 1), QString("New..."));
+ file->setAccessibleName("File");
+ QCOMPARE(interface->text(QAccessible::Name, 1), QString("New..."));
+
QAccessibleInterface *iface = 0;
QAccessibleInterface *iface2 = 0;