summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2013-02-05 16:43:07 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-06 12:00:07 +0100
commit20204fe58b77d7f62d3dac4e574bdef528199518 (patch)
tree2e7f5913670109c47585110486b957e15edf9dc9 /tests
parentaf84313c622af880e95d461ea8b7dbca58d2dffa (diff)
Do not crash if the child index is out of range.
Task-number: QTBUG-29077 Change-Id: I934101cdc121e9ef99de2e9eeaef154dd4cae0d8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 68fde2fd2e..b0d0459326 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -3113,6 +3113,11 @@ void tst_QAccessibility::bridgeTest()
// **** Test accLocation ****
long x, y, w, h;
+ // Do not crash on insane arguments.
+ varChild.lVal = 999;
+ hr = iaccButton->accLocation(&x, &y, &w, &h, varChild);
+ QCOMPARE(SUCCEEDED(hr), false);
+
hr = iaccButton->accLocation(&x, &y, &w, &h, varSELF);
QCOMPARE(buttonRect, QRect(x, y, w, h));