Unit test for characterRect in Accessible TextInterface.
(cherry picked from commit 8888cef411ce1d1fc898970429e951f9ef623b0e)
This commit is contained in:
parent
ed8f1a09f8
commit
74060f05d1
@ -2679,6 +2679,11 @@ void tst_QAccessibility::textEditTest()
|
||||
QCOMPARE(iface->text(QAccessible::Value, 4), QString("hello world"));
|
||||
QCOMPARE(iface->text(QAccessible::Value, 5), QString("how are you today?"));
|
||||
QCOMPARE(iface->text(QAccessible::Value, 6), QString());
|
||||
QCOMPARE(iface->textInterface()->characterCount(), 31);
|
||||
QFontMetrics fm(edit.font());
|
||||
QCOMPARE(iface->textInterface()->characterRect(0, QAccessible2::RelativeToParent).size(), QSize(fm.width("h"), fm.height()));
|
||||
QCOMPARE(iface->textInterface()->characterRect(5, QAccessible2::RelativeToParent).size(), QSize(fm.width(" "), fm.height()));
|
||||
QCOMPARE(iface->textInterface()->characterRect(6, QAccessible2::RelativeToParent).size(), QSize(fm.width("w"), fm.height()));
|
||||
}
|
||||
QTestAccessibility::clearEvents();
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user