summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebengineaccessibility
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-07-10 14:22:00 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-07-11 15:58:15 +0200
commitd77c9860c688de974c4fb57f40622ef344a56bb1 (patch)
treece6c417bac00c25ba8a81140f93530c8941c8d06 /tests/auto/widgets/qwebengineaccessibility
parentf444cd50a754d077cec0d423ef4cb9aa2d9fdf5c (diff)
Improve text for accessibles
Change-Id: I0301ed0403b56169e610cf1c38a1e5da39ee164f Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'tests/auto/widgets/qwebengineaccessibility')
-rw-r--r--tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp b/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
index 2d217e36..76b668b2 100644
--- a/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
+++ b/tests/auto/widgets/qwebengineaccessibility/tst_qwebengineaccessibility.cpp
@@ -84,7 +84,7 @@ void tst_QWebEngineView::hierarchy()
QWebEngineView webView;
webView.setHtml("<html><body>" \
"Hello world" \
- "<input type='text'/><br>" \
+ "<input type='text' value='some text'></input>" \
"</body></html>");
webView.show();
::waitForSignal(&webView, SIGNAL(loadFinished(bool)));
@@ -103,15 +103,23 @@ void tst_QWebEngineView::hierarchy()
QVERIFY(grouping);
QCOMPARE(grouping->parent(), document);
QCOMPARE(grouping->childCount(), 2);
+
QAccessibleInterface *text = grouping->child(0);
QCOMPARE(text->role(), QAccessible::StaticText);
QCOMPARE(text->parent(), grouping);
QEXPECT_FAIL("", "FIXME: static text should probably not have a child element", Continue);
QCOMPARE(text->childCount(), 0);
+ QCOMPARE(text->text(QAccessible::Name), QString());
+ QCOMPARE(text->text(QAccessible::Description), QString());
+ QCOMPARE(text->text(QAccessible::Value), QStringLiteral("Hello world"));
+
QAccessibleInterface *input = grouping->child(1);
QCOMPARE(input->role(), QAccessible::EditableText);
QCOMPARE(input->parent(), grouping);
QCOMPARE(input->childCount(), 0);
+ QCOMPARE(input->text(QAccessible::Name), QString());
+ QCOMPARE(input->text(QAccessible::Description), QString());
+ QCOMPARE(input->text(QAccessible::Value), QStringLiteral("some text"));
}
QTEST_MAIN(tst_QWebEngineView)