From 74ee5a215699af22c18c2d44ccd000b0ec650d9a Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Wed, 5 Jan 2022 15:19:45 +0100 Subject: [PATCH] oleacc/tests: Fix intermittent AccessibleObjectFromPoint tests failures. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/oleacc/tests/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/oleacc/tests/main.c b/dlls/oleacc/tests/main.c index 1f09581f64f..3b3f18a5a80 100644 --- a/dlls/oleacc/tests/main.c +++ b/dlls/oleacc/tests/main.c @@ -1318,7 +1318,7 @@ static void test_AccessibleObjectFromPoint(void) ok(SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG_PTR)&DefWindowProcA), "SetWindowLongPtr failed\n"); - point.x = point.y = 0; + point.x = point.y = 10; ok(ClientToScreen(hwnd, &point), "ClientToScreen failed\n"); if (WindowFromPoint(point) != hwnd) @@ -1355,6 +1355,12 @@ static void test_AccessibleObjectFromPoint(void) 0, 0, 100, 100, hwnd, NULL, NULL, NULL); ok(child != NULL, "CreateWindow failed\n"); + if (WindowFromPoint(point) != child) + { + win_skip("test window not returned from WindowFromPoint\n"); + return; + } + hr = AccessibleObjectFromPoint(point, &acc, &cid); ok(hr == S_OK, "got %x\n", hr); ok(V_VT(&cid) == VT_I4, "got %#x, expected %#x\n", V_VT(&cid), VT_I4);