summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2009-11-06 15:15:05 +0100
committerHarald Fernengel <harald.fernengel@nokia.com>2009-11-06 15:16:11 +0100
commit4ad6343be52b757fd354cd92874bca944d2ede49 (patch)
tree68d9fa38a04de8959310b977f295184e2b4a8bdd /tests/auto
parentf8883337699d59e3b5eb9393067a24fb43fb2604 (diff)
Add preliminary QAccessibleImage interface
As requested by the Maemo team.
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index 9f2e4e7afb..25c2649e43 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -4034,6 +4034,27 @@ void tst_QAccessibility::labelTest()
delete acc_label;
delete label;
QTestAccessibility::clearEvents();
+
+ QPixmap testPixmap(50, 50);
+ testPixmap.fill();
+
+ QLabel imageLabel;
+ imageLabel.setPixmap(testPixmap);
+ imageLabel.setToolTip("Test Description");
+
+ acc_label = QAccessible::queryAccessibleInterface(&imageLabel);
+ QVERIFY(acc_label);
+
+ QAccessibleImageInterface *imageInterface = acc_label->imageInterface();
+ QVERIFY(imageInterface);
+
+ QCOMPARE(imageInterface->imageSize(), testPixmap.size());
+ QCOMPARE(imageInterface->imageDescription(), QString::fromLatin1("Test Description"));
+ QCOMPARE(imageInterface->imagePosition(QAccessible2::RelativeToParent), imageLabel.geometry());
+
+ delete acc_label;
+
+ QTestAccessibility::clearEvents();
#else
QSKIP("Test needs accessibility support.", SkipAll);
#endif