summaryrefslogtreecommitdiffstats
path: root/tests/auto/qaccessibility/tst_qaccessibility.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qaccessibility/tst_qaccessibility.cpp')
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index 297e853..c42269b 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -3150,6 +3150,16 @@ void tst_QAccessibility::lineEditTest()
QCOMPARE(textIface->textAtOffset(5, QAccessible2::LineBoundary,&start,&end), cite);
QCOMPARE(textIface->textAtOffset(5, QAccessible2::NoBoundary,&start,&end), cite);
+
+ // characterRect()
+ le3->show();
+ QTest::qWaitForWindowShown(le3);
+ const QRect lineEditRect = iface->rect(0);
+ // Only first 10 characters, check if they are within the bounds of line edit
+ for (int i = 0; i < 10; ++i) {
+ QVERIFY(lineEditRect.contains(textIface->characterRect(i, QAccessible2::RelativeToScreen)));
+ }
+
delete iface;
delete toplevel;
QTestAccessibility::clearEvents();