Piotr Caban : oleacc/tests: Fix intermittent AccessibleObjectFromPoint tests failures.

Alexandre Julliard julliard at winehq.org
Wed Jan 5 15:58:34 CST 2022


Module: wine
Branch: master
Commit: 74ee5a215699af22c18c2d44ccd000b0ec650d9a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=74ee5a215699af22c18c2d44ccd000b0ec650d9a

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Wed Jan  5 15:19:45 2022 +0100

oleacc/tests: Fix intermittent AccessibleObjectFromPoint tests failures.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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);




More information about the wine-cvs mailing list