Connor McAdams : uiautomationcore/tests: Fix test failure on Win10v1709.
Module: wine Branch: master Commit: 362ea302b9243587323469acbd02e994ef162664 URL: https://gitlab.winehq.org/wine/wine/-/commit/362ea302b9243587323469acbd02e99... Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Thu Oct 19 07:49:56 2023 -0400 uiautomationcore/tests: Fix test failure on Win10v1709. Win10v1709 doesn't respond to EVENT_OBJECT_DESTROY for COM focus event handlers. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55807 --- dlls/uiautomationcore/tests/uiautomation.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index b527e5bf98d..9210583062f 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -15713,13 +15713,18 @@ static void test_uia_com_event_handler_event_advisement(IUIAutomation *uia_iface set_uia_hwnd_expects(0, 1, 1, 2, 0); /* Only Win11 sends WM_GETOBJECT 2 times. */ NotifyWinEvent(EVENT_OBJECT_FOCUS, test_child_hwnd, OBJID_CLIENT, CHILDID_SELF); - ok(msg_wait_for_all_events(method_event, 1, 2000) != WAIT_TIMEOUT, "Wait for method_event(s) timed out.\n"); + wait_res = msg_wait_for_all_events(method_event, 1, 2000); + ok(wait_res != WAIT_TIMEOUT || broken(wait_res == WAIT_TIMEOUT), /* Win10v1709 */ + "Wait for method_event(s) timed out.\n"); if (wait_for_clientside_callbacks(2000)) trace("Kept getting callbacks up until timeout\n"); set_provider_method_event_data(&Provider2, NULL, -1); check_uia_hwnd_expects_at_most(0, 1, 1, 2, 0); CHECK_CALLED_AT_MOST(child_winproc_GETOBJECT_UiaRoot, 3); - test_provider_event_advise_added(&Provider2, UIA_AutomationFocusChangedEventId, FALSE); + if (!winetest_platform_is_wine && (wait_res == WAIT_TIMEOUT)) /* Win10v1709 */ + test_provider_event_advise_added(&Provider2, 0, FALSE); + else + test_provider_event_advise_added(&Provider2, UIA_AutomationFocusChangedEventId, FALSE); test_provider_event_advise_added(&Provider_hwnd3, 0, FALSE); test_provider_event_advise_added(&Provider_nc3, 0, FALSE);
participants (1)
-
Alexandre Julliard