Module: wine Branch: master Commit: 45aca56e0879e089e063a9e643b497f3f915cdad URL: https://gitlab.winehq.org/wine/wine/-/commit/45aca56e0879e089e063a9e643b497f...
Author: Connor McAdams cmcadams@codeweavers.com Date: Mon Mar 20 08:10:55 2023 -0400
uiautomationcore/tests: Add NULL input argument tests for IUIAutomationTreeWalker navigation method.
Signed-off-by: Connor McAdams cmcadams@codeweavers.com
---
dlls/uiautomationcore/tests/uiautomation.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index 6aa5e67c440..b957999a365 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -11841,6 +11841,15 @@ static void test_CUIAutomation_TreeWalker_ifaces(IUIAutomation *uia_iface) provider_add_child(&Provider, &Provider_child); provider_add_child(&Provider, &Provider_child2);
+ /* NULL input argument tests. */ + hr = IUIAutomationTreeWalker_GetFirstChildElement(walker, element, NULL); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); + + element2 = (void *)0xdeadbeef; + hr = IUIAutomationTreeWalker_GetFirstChildElement(walker, NULL, &element2); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); + ok(!element2, "element2 != NULL\n"); + /* NavigateDirection_FirstChild. */ element2 = NULL; hr = IUIAutomationTreeWalker_GetFirstChildElement(walker, element, &element2);