Commit 096377be authored by Biswapriyo Nath's avatar Biswapriyo Nath Committed by Alexandre Julliard

uiautomationcore: Fix typo with TreeScope_Subtree name.

parent 7d72397a
......@@ -11544,7 +11544,7 @@ static void test_CUIAutomation_cache_request_iface(IUIAutomation *uia_iface)
hr = IUIAutomationCacheRequest_put_TreeScope(cache_req, TreeScope_Ancestors | TreeScope_Element);
ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IUIAutomationCacheRequest_put_TreeScope(cache_req, ~(TreeScope_SubTree | TreeScope_Parent | TreeScope_Ancestors));
hr = IUIAutomationCacheRequest_put_TreeScope(cache_req, ~(TreeScope_Subtree | TreeScope_Parent | TreeScope_Ancestors));
ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Invalid values don't change anything. */
......@@ -12133,7 +12133,7 @@ static void test_Element_Find(IUIAutomation *uia_iface)
* Equivalent to: Maximum find depth of -1, find first is FALSE, exclude
* root is FALSE.
*/
hr = IUIAutomationElement_FindAllBuildCache(element, TreeScope_SubTree, condition, cache_req, &element_arr);
hr = IUIAutomationElement_FindAllBuildCache(element, TreeScope_Subtree, condition, cache_req, &element_arr);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_elem_desc(&exp_elems[0], &Provider, NULL, GetCurrentProcessId(), 2, 2);
......@@ -12378,7 +12378,7 @@ static void test_Element_Find(IUIAutomation *uia_iface)
* root is FALSE. Provider_child_child2 is the only element in the tree
* to match our condition.
*/
hr = IUIAutomationElement_FindFirstBuildCache(element, TreeScope_SubTree, condition, cache_req, &element2);
hr = IUIAutomationElement_FindFirstBuildCache(element, TreeScope_Subtree, condition, cache_req, &element2);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(Provider_child_child2.ref == 2, "Unexpected refcnt %ld\n", Provider_child_child2.ref);
......@@ -12443,7 +12443,7 @@ static void test_Element_Find(IUIAutomation *uia_iface)
set_provider_prop_override(&Provider_child, &prop_override, 1);
set_provider_prop_override(&Provider_child_child, &prop_override, 1);
hr = IUIAutomationElement_FindFirst(element, TreeScope_SubTree, condition, &element2);
hr = IUIAutomationElement_FindFirst(element, TreeScope_Subtree, condition, &element2);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(Provider_child_child2.ref == 2, "Unexpected refcnt %ld\n", Provider_child_child2.ref);
......@@ -13231,11 +13231,11 @@ static void test_IUIAutomationEventHandler(IUIAutomation *uia_iface, IUIAutomati
/*
* Invalid input argument tests.
*/
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, UIA_LiveRegionChangedEventId, NULL, TreeScope_SubTree, NULL,
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, UIA_LiveRegionChangedEventId, NULL, TreeScope_Subtree, NULL,
&AutomationEventHandler.IUIAutomationEventHandler_iface);
ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, UIA_LiveRegionChangedEventId, elem, TreeScope_SubTree, NULL,
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, UIA_LiveRegionChangedEventId, elem, TreeScope_Subtree, NULL,
NULL);
ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
......@@ -13260,14 +13260,14 @@ static void test_IUIAutomationEventHandler(IUIAutomation *uia_iface, IUIAutomati
* AddFocusChangedEventHandler. Trying to register it on a regular event
* handler returns E_INVALIDARG.
*/
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, UIA_AutomationFocusChangedEventId, elem, TreeScope_SubTree, NULL,
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, UIA_AutomationFocusChangedEventId, elem, TreeScope_Subtree, NULL,
&AutomationEventHandler.IUIAutomationEventHandler_iface);
ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Windows 11 queries the HWND for the element when adding a new handler. */
set_uia_hwnd_expects(3, 2, 2, 3, 0);
/* All other event IDs are fine, only focus events are blocked. */
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, 1, elem, TreeScope_SubTree, NULL,
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, 1, elem, TreeScope_Subtree, NULL,
&AutomationEventHandler.IUIAutomationEventHandler_iface);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(AutomationEventHandler.ref > 1, "Unexpected refcnt %ld\n", AutomationEventHandler.ref);
......@@ -13282,7 +13282,7 @@ static void test_IUIAutomationEventHandler(IUIAutomation *uia_iface, IUIAutomati
* Test event raising behavior.
*/
set_uia_hwnd_expects(3, 2, 2, 3, 0);
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, UIA_LiveRegionChangedEventId, elem, TreeScope_SubTree, NULL,
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, UIA_LiveRegionChangedEventId, elem, TreeScope_Subtree, NULL,
&AutomationEventHandler.IUIAutomationEventHandler_iface);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(AutomationEventHandler.ref > 1, "Unexpected refcnt %ld\n", AutomationEventHandler.ref);
......@@ -13349,7 +13349,7 @@ static void test_IUIAutomationEventHandler(IUIAutomation *uia_iface, IUIAutomati
* runtime-id, the only way to unregister the event handler is to call
* RemoveAllEventHandlers().
*/
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, UIA_LiveRegionChangedEventId, elem2, TreeScope_SubTree, NULL,
hr = IUIAutomation_AddAutomationEventHandler(uia_iface, UIA_LiveRegionChangedEventId, elem2, TreeScope_Subtree, NULL,
&AutomationEventHandler.IUIAutomationEventHandler_iface);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(AutomationEventHandler.ref > 1, "Unexpected refcnt %ld\n", AutomationEventHandler.ref);
......
......@@ -743,7 +743,7 @@ static HRESULT WINAPI uia_cache_request_put_TreeScope(IUIAutomationCacheRequest
TRACE("%p, %#x\n", iface, scope);
if (!scope || (scope & ~TreeScope_SubTree))
if (!scope || (scope & ~TreeScope_Subtree))
return E_INVALIDARG;
if ((scope & TreeScope_Children) || (scope & TreeScope_Descendants))
......@@ -1366,7 +1366,7 @@ static HRESULT set_find_params_struct(struct UiaFindParams *params, IUIAutomatio
if (FAILED(hr))
return hr;
if (!scope || (scope & (~TreeScope_SubTree)))
if (!scope || (scope & (~TreeScope_Subtree)))
return E_INVALIDARG;
params->FindFirst = find_first;
......@@ -3447,7 +3447,7 @@ static HRESULT WINAPI uia_iface_AddFocusChangedEventHandler(IUIAutomation6 *ifac
return hr;
}
hr = uia_add_com_event_handler(iface, UIA_AutomationFocusChangedEventId, elem, TreeScope_SubTree, cache_req,
hr = uia_add_com_event_handler(iface, UIA_AutomationFocusChangedEventId, elem, TreeScope_Subtree, cache_req,
&IID_IUIAutomationFocusChangedEventHandler, handler_unk);
IUIAutomationElement_Release(elem);
IUnknown_Release(handler_unk);
......
......@@ -27,7 +27,7 @@ enum TreeScope {
TreeScope_Descendants = 0x04,
TreeScope_Parent = 0x08,
TreeScope_Ancestors = 0x10,
TreeScope_SubTree = TreeScope_Element | TreeScope_Children | TreeScope_Descendants,
TreeScope_Subtree = TreeScope_Element | TreeScope_Children | TreeScope_Descendants,
};
enum PropertyConditionFlags {
......
......@@ -371,7 +371,7 @@ enum TreeScope {
TreeScope_Descendants = 0x04,
TreeScope_Parent = 0x08,
TreeScope_Ancestors = 0x10,
TreeScope_SubTree = TreeScope_Element | TreeScope_Children | TreeScope_Descendants,
TreeScope_Subtree = TreeScope_Element | TreeScope_Children | TreeScope_Descendants,
};
enum PropertyConditionFlags {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment