summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/other/qaccessibility/CMakeLists.txt6
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp7
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/auto/other/qaccessibility/CMakeLists.txt b/tests/auto/other/qaccessibility/CMakeLists.txt
index c516188396..1d7b1c3901 100644
--- a/tests/auto/other/qaccessibility/CMakeLists.txt
+++ b/tests/auto/other/qaccessibility/CMakeLists.txt
@@ -4,12 +4,6 @@ if(NOT QT_FEATURE_accessibility)
return()
endif()
-# special case begin
-if (WIN32 AND NOT TARGET Qt::WindowsUIAutomationSupport)
- return()
-endif()
-# special case end
-
#####################################################################
## tst_qaccessibility Test:
#####################################################################
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index a593a91525..95223057a0 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -3867,7 +3867,12 @@ void tst_QAccessibility::bridgeTest()
RECT rect;
hr = buttonElement->get_CurrentBoundingRectangle(&rect);
QVERIFY(SUCCEEDED(hr));
- QCOMPARE(buttonRect, QRect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top));
+ const QRect boundingRect(rect.left, rect.top, rect.right - rect.left + 1, rect.bottom - rect.top + 1);
+ const QRectF nativeRect = QHighDpi::toNativePixels(QRectF(buttonRect), window.windowHandle());
+ const QRect truncRect(int(nativeRect.left()), int(nativeRect.top()),
+ int(nativeRect.right()) - int(nativeRect.left()) + 1,
+ int(nativeRect.bottom()) - int(nativeRect.top()) + 1);
+ QCOMPARE(truncRect, boundingRect);
buttonElement->Release();