summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-07-10 14:30:17 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-07-11 15:58:22 +0200
commit31f41cf9b98b1ff3dde61e667693b2106b906e2c (patch)
tree1dcfc5d534c2bc178b4d0d3630bc60b44ede72fb /tests
parentd77c9860c688de974c4fb57f40622ef344a56bb1 (diff)
Fix the indexOfChild function for the web document
Change-Id: I37a32bd5dd8760bc91173968a620a1932ae67b4e Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp b/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
index 76b668b2..9fd008ab 100644
--- a/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
+++ b/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
@@ -98,15 +98,18 @@ void tst_QWebEngineView::hierarchy()
QAccessibleInterface *document = view->child(0);
QCOMPARE(document->role(), QAccessible::Document);
QCOMPARE(document->parent(), view);
+ QCOMPARE(view->indexOfChild(document), 0);
QCOMPARE(document->childCount(), 1);
QAccessibleInterface *grouping = document->child(0);
QVERIFY(grouping);
QCOMPARE(grouping->parent(), document);
+ QCOMPARE(document->indexOfChild(grouping), 0);
QCOMPARE(grouping->childCount(), 2);
QAccessibleInterface *text = grouping->child(0);
QCOMPARE(text->role(), QAccessible::StaticText);
QCOMPARE(text->parent(), grouping);
+ QCOMPARE(grouping->indexOfChild(text), 0);
QEXPECT_FAIL("", "FIXME: static text should probably not have a child element", Continue);
QCOMPARE(text->childCount(), 0);
QCOMPARE(text->text(QAccessible::Name), QString());
@@ -116,6 +119,7 @@ void tst_QWebEngineView::hierarchy()
QAccessibleInterface *input = grouping->child(1);
QCOMPARE(input->role(), QAccessible::EditableText);
QCOMPARE(input->parent(), grouping);
+ QCOMPARE(grouping->indexOfChild(input), 1);
QCOMPARE(input->childCount(), 0);
QCOMPARE(input->text(QAccessible::Name), QString());
QCOMPARE(input->text(QAccessible::Description), QString());