29#include "wine/iaccessible2.h"
34static HRESULT (
WINAPI *pUiaDisconnectProvider)(IRawElementProviderSimple *);
42 { UIA_RuntimeIdPropertyId,
"UIA_RuntimeIdPropertyId", },
43 { UIA_BoundingRectanglePropertyId,
"UIA_BoundingRectanglePropertyId", },
44 { UIA_ProcessIdPropertyId,
"UIA_ProcessIdPropertyId", },
45 { UIA_ControlTypePropertyId,
"UIA_ControlTypePropertyId", },
46 { UIA_LocalizedControlTypePropertyId,
"UIA_LocalizedControlTypePropertyId", },
47 { UIA_NamePropertyId,
"UIA_NamePropertyId", },
48 { UIA_AcceleratorKeyPropertyId,
"UIA_AcceleratorKeyPropertyId", },
49 { UIA_AccessKeyPropertyId,
"UIA_AccessKeyPropertyId", },
50 { UIA_HasKeyboardFocusPropertyId,
"UIA_HasKeyboardFocusPropertyId", },
51 { UIA_IsKeyboardFocusablePropertyId,
"UIA_IsKeyboardFocusablePropertyId", },
52 { UIA_IsEnabledPropertyId,
"UIA_IsEnabledPropertyId", },
53 { UIA_AutomationIdPropertyId,
"UIA_AutomationIdPropertyId", },
54 { UIA_ClassNamePropertyId,
"UIA_ClassNamePropertyId", },
55 { UIA_HelpTextPropertyId,
"UIA_HelpTextPropertyId", },
56 { UIA_ClickablePointPropertyId,
"UIA_ClickablePointPropertyId", },
57 { UIA_CulturePropertyId,
"UIA_CulturePropertyId", },
58 { UIA_IsControlElementPropertyId,
"UIA_IsControlElementPropertyId", },
59 { UIA_IsContentElementPropertyId,
"UIA_IsContentElementPropertyId", },
60 { UIA_LabeledByPropertyId,
"UIA_LabeledByPropertyId", },
61 { UIA_IsPasswordPropertyId,
"UIA_IsPasswordPropertyId", },
62 { UIA_NativeWindowHandlePropertyId,
"UIA_NativeWindowHandlePropertyId", },
63 { UIA_ItemTypePropertyId,
"UIA_ItemTypePropertyId", },
64 { UIA_IsOffscreenPropertyId,
"UIA_IsOffscreenPropertyId", },
65 { UIA_OrientationPropertyId,
"UIA_OrientationPropertyId", },
66 { UIA_FrameworkIdPropertyId,
"UIA_FrameworkIdPropertyId", },
67 { UIA_IsRequiredForFormPropertyId,
"UIA_IsRequiredForFormPropertyId", },
68 { UIA_ItemStatusPropertyId,
"UIA_ItemStatusPropertyId", },
69 { UIA_IsDockPatternAvailablePropertyId,
"UIA_IsDockPatternAvailablePropertyId", },
70 { UIA_IsExpandCollapsePatternAvailablePropertyId,
"UIA_IsExpandCollapsePatternAvailablePropertyId", },
71 { UIA_IsGridItemPatternAvailablePropertyId,
"UIA_IsGridItemPatternAvailablePropertyId", },
72 { UIA_IsGridPatternAvailablePropertyId,
"UIA_IsGridPatternAvailablePropertyId", },
73 { UIA_IsInvokePatternAvailablePropertyId,
"UIA_IsInvokePatternAvailablePropertyId", },
74 { UIA_IsMultipleViewPatternAvailablePropertyId,
"UIA_IsMultipleViewPatternAvailablePropertyId", },
75 { UIA_IsRangeValuePatternAvailablePropertyId,
"UIA_IsRangeValuePatternAvailablePropertyId", },
76 { UIA_IsScrollPatternAvailablePropertyId,
"UIA_IsScrollPatternAvailablePropertyId", },
77 { UIA_IsScrollItemPatternAvailablePropertyId,
"UIA_IsScrollItemPatternAvailablePropertyId", },
78 { UIA_IsSelectionItemPatternAvailablePropertyId,
"UIA_IsSelectionItemPatternAvailablePropertyId", },
79 { UIA_IsSelectionPatternAvailablePropertyId,
"UIA_IsSelectionPatternAvailablePropertyId", },
80 { UIA_IsTablePatternAvailablePropertyId,
"UIA_IsTablePatternAvailablePropertyId", },
81 { UIA_IsTableItemPatternAvailablePropertyId,
"UIA_IsTableItemPatternAvailablePropertyId", },
82 { UIA_IsTextPatternAvailablePropertyId,
"UIA_IsTextPatternAvailablePropertyId", },
83 { UIA_IsTogglePatternAvailablePropertyId,
"UIA_IsTogglePatternAvailablePropertyId", },
84 { UIA_IsTransformPatternAvailablePropertyId,
"UIA_IsTransformPatternAvailablePropertyId", },
85 { UIA_IsValuePatternAvailablePropertyId,
"UIA_IsValuePatternAvailablePropertyId", },
86 { UIA_IsWindowPatternAvailablePropertyId,
"UIA_IsWindowPatternAvailablePropertyId", },
87 { UIA_ValueValuePropertyId,
"UIA_ValueValuePropertyId", },
88 { UIA_ValueIsReadOnlyPropertyId,
"UIA_ValueIsReadOnlyPropertyId", },
89 { UIA_RangeValueValuePropertyId,
"UIA_RangeValueValuePropertyId", },
90 { UIA_RangeValueIsReadOnlyPropertyId,
"UIA_RangeValueIsReadOnlyPropertyId", },
91 { UIA_RangeValueMinimumPropertyId,
"UIA_RangeValueMinimumPropertyId", },
92 { UIA_RangeValueMaximumPropertyId,
"UIA_RangeValueMaximumPropertyId", },
93 { UIA_RangeValueLargeChangePropertyId,
"UIA_RangeValueLargeChangePropertyId", },
94 { UIA_RangeValueSmallChangePropertyId,
"UIA_RangeValueSmallChangePropertyId", },
95 { UIA_ScrollHorizontalScrollPercentPropertyId,
"UIA_ScrollHorizontalScrollPercentPropertyId", },
96 { UIA_ScrollHorizontalViewSizePropertyId,
"UIA_ScrollHorizontalViewSizePropertyId", },
97 { UIA_ScrollVerticalScrollPercentPropertyId,
"UIA_ScrollVerticalScrollPercentPropertyId", },
98 { UIA_ScrollVerticalViewSizePropertyId,
"UIA_ScrollVerticalViewSizePropertyId", },
99 { UIA_ScrollHorizontallyScrollablePropertyId,
"UIA_ScrollHorizontallyScrollablePropertyId", },
100 { UIA_ScrollVerticallyScrollablePropertyId,
"UIA_ScrollVerticallyScrollablePropertyId", },
101 { UIA_SelectionSelectionPropertyId,
"UIA_SelectionSelectionPropertyId", },
102 { UIA_SelectionCanSelectMultiplePropertyId,
"UIA_SelectionCanSelectMultiplePropertyId", },
103 { UIA_SelectionIsSelectionRequiredPropertyId,
"UIA_SelectionIsSelectionRequiredPropertyId", },
104 { UIA_GridRowCountPropertyId,
"UIA_GridRowCountPropertyId", },
105 { UIA_GridColumnCountPropertyId,
"UIA_GridColumnCountPropertyId", },
106 { UIA_GridItemRowPropertyId,
"UIA_GridItemRowPropertyId", },
107 { UIA_GridItemColumnPropertyId,
"UIA_GridItemColumnPropertyId", },
108 { UIA_GridItemRowSpanPropertyId,
"UIA_GridItemRowSpanPropertyId", },
109 { UIA_GridItemColumnSpanPropertyId,
"UIA_GridItemColumnSpanPropertyId", },
110 { UIA_GridItemContainingGridPropertyId,
"UIA_GridItemContainingGridPropertyId", },
111 { UIA_DockDockPositionPropertyId,
"UIA_DockDockPositionPropertyId", },
112 { UIA_ExpandCollapseExpandCollapseStatePropertyId,
"UIA_ExpandCollapseExpandCollapseStatePropertyId", },
113 { UIA_MultipleViewCurrentViewPropertyId,
"UIA_MultipleViewCurrentViewPropertyId", },
114 { UIA_MultipleViewSupportedViewsPropertyId,
"UIA_MultipleViewSupportedViewsPropertyId", },
115 { UIA_WindowCanMaximizePropertyId,
"UIA_WindowCanMaximizePropertyId", },
116 { UIA_WindowCanMinimizePropertyId,
"UIA_WindowCanMinimizePropertyId", },
117 { UIA_WindowWindowVisualStatePropertyId,
"UIA_WindowWindowVisualStatePropertyId", },
118 { UIA_WindowWindowInteractionStatePropertyId,
"UIA_WindowWindowInteractionStatePropertyId", },
119 { UIA_WindowIsModalPropertyId,
"UIA_WindowIsModalPropertyId", },
120 { UIA_WindowIsTopmostPropertyId,
"UIA_WindowIsTopmostPropertyId", },
121 { UIA_SelectionItemIsSelectedPropertyId,
"UIA_SelectionItemIsSelectedPropertyId", },
122 { UIA_SelectionItemSelectionContainerPropertyId,
"UIA_SelectionItemSelectionContainerPropertyId", },
123 { UIA_TableRowHeadersPropertyId,
"UIA_TableRowHeadersPropertyId", },
124 { UIA_TableColumnHeadersPropertyId,
"UIA_TableColumnHeadersPropertyId", },
125 { UIA_TableRowOrColumnMajorPropertyId,
"UIA_TableRowOrColumnMajorPropertyId", },
126 { UIA_TableItemRowHeaderItemsPropertyId,
"UIA_TableItemRowHeaderItemsPropertyId", },
127 { UIA_TableItemColumnHeaderItemsPropertyId,
"UIA_TableItemColumnHeaderItemsPropertyId", },
128 { UIA_ToggleToggleStatePropertyId,
"UIA_ToggleToggleStatePropertyId", },
129 { UIA_TransformCanMovePropertyId,
"UIA_TransformCanMovePropertyId", },
130 { UIA_TransformCanResizePropertyId,
"UIA_TransformCanResizePropertyId", },
131 { UIA_TransformCanRotatePropertyId,
"UIA_TransformCanRotatePropertyId", },
132 { UIA_IsLegacyIAccessiblePatternAvailablePropertyId,
"UIA_IsLegacyIAccessiblePatternAvailablePropertyId", },
133 { UIA_LegacyIAccessibleChildIdPropertyId,
"UIA_LegacyIAccessibleChildIdPropertyId", },
134 { UIA_LegacyIAccessibleNamePropertyId,
"UIA_LegacyIAccessibleNamePropertyId", },
135 { UIA_LegacyIAccessibleValuePropertyId,
"UIA_LegacyIAccessibleValuePropertyId", },
136 { UIA_LegacyIAccessibleDescriptionPropertyId,
"UIA_LegacyIAccessibleDescriptionPropertyId", },
137 { UIA_LegacyIAccessibleRolePropertyId,
"UIA_LegacyIAccessibleRolePropertyId", },
138 { UIA_LegacyIAccessibleStatePropertyId,
"UIA_LegacyIAccessibleStatePropertyId", },
139 { UIA_LegacyIAccessibleHelpPropertyId,
"UIA_LegacyIAccessibleHelpPropertyId", },
140 { UIA_LegacyIAccessibleKeyboardShortcutPropertyId,
"UIA_LegacyIAccessibleKeyboardShortcutPropertyId", },
141 { UIA_LegacyIAccessibleSelectionPropertyId,
"UIA_LegacyIAccessibleSelectionPropertyId", },
142 { UIA_LegacyIAccessibleDefaultActionPropertyId,
"UIA_LegacyIAccessibleDefaultActionPropertyId", },
143 { UIA_AriaRolePropertyId,
"UIA_AriaRolePropertyId", },
144 { UIA_AriaPropertiesPropertyId,
"UIA_AriaPropertiesPropertyId", },
145 { UIA_IsDataValidForFormPropertyId,
"UIA_IsDataValidForFormPropertyId", },
146 { UIA_ControllerForPropertyId,
"UIA_ControllerForPropertyId", },
147 { UIA_DescribedByPropertyId,
"UIA_DescribedByPropertyId", },
148 { UIA_FlowsToPropertyId,
"UIA_FlowsToPropertyId", },
149 { UIA_ProviderDescriptionPropertyId,
"UIA_ProviderDescriptionPropertyId", },
150 { UIA_IsItemContainerPatternAvailablePropertyId,
"UIA_IsItemContainerPatternAvailablePropertyId", },
151 { UIA_IsVirtualizedItemPatternAvailablePropertyId,
"UIA_IsVirtualizedItemPatternAvailablePropertyId", },
152 { UIA_IsSynchronizedInputPatternAvailablePropertyId,
"UIA_IsSynchronizedInputPatternAvailablePropertyId", },
153 { UIA_OptimizeForVisualContentPropertyId,
"UIA_OptimizeForVisualContentPropertyId", },
154 { UIA_IsObjectModelPatternAvailablePropertyId,
"UIA_IsObjectModelPatternAvailablePropertyId", },
155 { UIA_AnnotationAnnotationTypeIdPropertyId,
"UIA_AnnotationAnnotationTypeIdPropertyId", },
156 { UIA_AnnotationAnnotationTypeNamePropertyId,
"UIA_AnnotationAnnotationTypeNamePropertyId", },
157 { UIA_AnnotationAuthorPropertyId,
"UIA_AnnotationAuthorPropertyId", },
158 { UIA_AnnotationDateTimePropertyId,
"UIA_AnnotationDateTimePropertyId", },
159 { UIA_AnnotationTargetPropertyId,
"UIA_AnnotationTargetPropertyId", },
160 { UIA_IsAnnotationPatternAvailablePropertyId,
"UIA_IsAnnotationPatternAvailablePropertyId", },
161 { UIA_IsTextPattern2AvailablePropertyId,
"UIA_IsTextPattern2AvailablePropertyId", },
162 { UIA_StylesStyleIdPropertyId,
"UIA_StylesStyleIdPropertyId", },
163 { UIA_StylesStyleNamePropertyId,
"UIA_StylesStyleNamePropertyId", },
164 { UIA_StylesFillColorPropertyId,
"UIA_StylesFillColorPropertyId", },
165 { UIA_StylesFillPatternStylePropertyId,
"UIA_StylesFillPatternStylePropertyId", },
166 { UIA_StylesShapePropertyId,
"UIA_StylesShapePropertyId", },
167 { UIA_StylesFillPatternColorPropertyId,
"UIA_StylesFillPatternColorPropertyId", },
168 { UIA_StylesExtendedPropertiesPropertyId,
"UIA_StylesExtendedPropertiesPropertyId", },
169 { UIA_IsStylesPatternAvailablePropertyId,
"UIA_IsStylesPatternAvailablePropertyId", },
170 { UIA_IsSpreadsheetPatternAvailablePropertyId,
"UIA_IsSpreadsheetPatternAvailablePropertyId", },
171 { UIA_SpreadsheetItemFormulaPropertyId,
"UIA_SpreadsheetItemFormulaPropertyId", },
172 { UIA_SpreadsheetItemAnnotationObjectsPropertyId,
"UIA_SpreadsheetItemAnnotationObjectsPropertyId", },
173 { UIA_SpreadsheetItemAnnotationTypesPropertyId,
"UIA_SpreadsheetItemAnnotationTypesPropertyId", },
174 { UIA_IsSpreadsheetItemPatternAvailablePropertyId,
"UIA_IsSpreadsheetItemPatternAvailablePropertyId", },
175 { UIA_Transform2CanZoomPropertyId,
"UIA_Transform2CanZoomPropertyId", },
176 { UIA_IsTransformPattern2AvailablePropertyId,
"UIA_IsTransformPattern2AvailablePropertyId", },
177 { UIA_LiveSettingPropertyId,
"UIA_LiveSettingPropertyId", },
178 { UIA_IsTextChildPatternAvailablePropertyId,
"UIA_IsTextChildPatternAvailablePropertyId", },
179 { UIA_IsDragPatternAvailablePropertyId,
"UIA_IsDragPatternAvailablePropertyId", },
180 { UIA_DragIsGrabbedPropertyId,
"UIA_DragIsGrabbedPropertyId", },
181 { UIA_DragDropEffectPropertyId,
"UIA_DragDropEffectPropertyId", },
182 { UIA_DragDropEffectsPropertyId,
"UIA_DragDropEffectsPropertyId", },
183 { UIA_IsDropTargetPatternAvailablePropertyId,
"UIA_IsDropTargetPatternAvailablePropertyId", },
184 { UIA_DropTargetDropTargetEffectPropertyId,
"UIA_DropTargetDropTargetEffectPropertyId", },
185 { UIA_DropTargetDropTargetEffectsPropertyId,
"UIA_DropTargetDropTargetEffectsPropertyId", },
186 { UIA_DragGrabbedItemsPropertyId,
"UIA_DragGrabbedItemsPropertyId", },
187 { UIA_Transform2ZoomLevelPropertyId,
"UIA_Transform2ZoomLevelPropertyId", },
188 { UIA_Transform2ZoomMinimumPropertyId,
"UIA_Transform2ZoomMinimumPropertyId", },
189 { UIA_Transform2ZoomMaximumPropertyId,
"UIA_Transform2ZoomMaximumPropertyId", },
190 { UIA_FlowsFromPropertyId,
"UIA_FlowsFromPropertyId", },
191 { UIA_IsTextEditPatternAvailablePropertyId,
"UIA_IsTextEditPatternAvailablePropertyId", },
192 { UIA_IsPeripheralPropertyId,
"UIA_IsPeripheralPropertyId", },
193 { UIA_IsCustomNavigationPatternAvailablePropertyId,
"UIA_IsCustomNavigationPatternAvailablePropertyId", },
194 { UIA_PositionInSetPropertyId,
"UIA_PositionInSetPropertyId", },
195 { UIA_SizeOfSetPropertyId,
"UIA_SizeOfSetPropertyId", },
196 { UIA_LevelPropertyId,
"UIA_LevelPropertyId", },
197 { UIA_AnnotationTypesPropertyId,
"UIA_AnnotationTypesPropertyId", },
198 { UIA_AnnotationObjectsPropertyId,
"UIA_AnnotationObjectsPropertyId", },
199 { UIA_LandmarkTypePropertyId,
"UIA_LandmarkTypePropertyId", },
200 { UIA_LocalizedLandmarkTypePropertyId,
"UIA_LocalizedLandmarkTypePropertyId", },
201 { UIA_FullDescriptionPropertyId,
"UIA_FullDescriptionPropertyId", },
202 { UIA_FillColorPropertyId,
"UIA_FillColorPropertyId", },
203 { UIA_OutlineColorPropertyId,
"UIA_OutlineColorPropertyId", },
204 { UIA_FillTypePropertyId,
"UIA_FillTypePropertyId", },
205 { UIA_VisualEffectsPropertyId,
"UIA_VisualEffectsPropertyId", },
206 { UIA_OutlineThicknessPropertyId,
"UIA_OutlineThicknessPropertyId", },
207 { UIA_CenterPointPropertyId,
"UIA_CenterPointPropertyId", },
208 { UIA_RotationPropertyId,
"UIA_RotationPropertyId", },
209 { UIA_SizePropertyId,
"UIA_SizePropertyId", },
210 { UIA_IsSelectionPattern2AvailablePropertyId,
"UIA_IsSelectionPattern2AvailablePropertyId", },
211 { UIA_Selection2FirstSelectedItemPropertyId,
"UIA_Selection2FirstSelectedItemPropertyId", },
212 { UIA_Selection2LastSelectedItemPropertyId,
"UIA_Selection2LastSelectedItemPropertyId", },
213 { UIA_Selection2CurrentSelectedItemPropertyId,
"UIA_Selection2CurrentSelectedItemPropertyId", },
214 { UIA_Selection2ItemCountPropertyId,
"UIA_Selection2ItemCountPropertyId", },
215 { UIA_HeadingLevelPropertyId,
"UIA_HeadingLevelPropertyId", },
216 { UIA_IsDialogPropertyId,
"UIA_IsDialogPropertyId", },
220 { UIA_InvokePatternId,
"UIA_InvokePatternId", },
221 { UIA_SelectionPatternId,
"UIA_SelectionPatternId", },
222 { UIA_ValuePatternId,
"UIA_ValuePatternId", },
223 { UIA_RangeValuePatternId,
"UIA_RangeValuePatternId", },
224 { UIA_ScrollPatternId,
"UIA_ScrollPatternId", },
225 { UIA_ExpandCollapsePatternId,
"UIA_ExpandCollapsePatternId", },
226 { UIA_GridPatternId,
"UIA_GridPatternId", },
227 { UIA_GridItemPatternId,
"UIA_GridItemPatternId", },
228 { UIA_MultipleViewPatternId,
"UIA_MultipleViewPatternId", },
229 { UIA_WindowPatternId,
"UIA_WindowPatternId", },
230 { UIA_SelectionItemPatternId,
"UIA_SelectionItemPatternId", },
231 { UIA_DockPatternId,
"UIA_DockPatternId", },
232 { UIA_TablePatternId,
"UIA_TablePatternId", },
233 { UIA_TableItemPatternId,
"UIA_TableItemPatternId", },
234 { UIA_TextPatternId,
"UIA_TextPatternId", },
235 { UIA_TogglePatternId,
"UIA_TogglePatternId", },
236 { UIA_TransformPatternId,
"UIA_TransformPatternId", },
237 { UIA_ScrollItemPatternId,
"UIA_ScrollItemPatternId", },
238 { UIA_LegacyIAccessiblePatternId,
"UIA_LegacyIAccessiblePatternId", },
239 { UIA_ItemContainerPatternId,
"UIA_ItemContainerPatternId", },
240 { UIA_VirtualizedItemPatternId,
"UIA_VirtualizedItemPatternId", },
241 { UIA_SynchronizedInputPatternId,
"UIA_SynchronizedInputPatternId", },
242 { UIA_ObjectModelPatternId,
"UIA_ObjectModelPatternId", },
243 { UIA_AnnotationPatternId,
"UIA_AnnotationPatternId", },
244 { UIA_TextPattern2Id,
"UIA_TextPattern2Id", },
245 { UIA_StylesPatternId,
"UIA_StylesPatternId", },
246 { UIA_SpreadsheetPatternId,
"UIA_SpreadsheetPatternId", },
247 { UIA_SpreadsheetItemPatternId,
"UIA_SpreadsheetItemPatternId", },
248 { UIA_TransformPattern2Id,
"UIA_TransformPattern2Id", },
249 { UIA_TextChildPatternId,
"UIA_TextChildPatternId", },
250 { UIA_DragPatternId,
"UIA_DragPatternId", },
251 { UIA_DropTargetPatternId,
"UIA_DropTargetPatternId", },
252 { UIA_TextEditPatternId,
"UIA_TextEditPatternId", },
253 { UIA_CustomNavigationPatternId,
"UIA_CustomNavigationPatternId", },
265 { UIA_ToolTipOpenedEventId,
"UIA_ToolTipOpenedEventId" },
266 { UIA_ToolTipClosedEventId,
"UIA_ToolTipClosedEventId", },
267 { UIA_StructureChangedEventId,
"UIA_StructureChangedEventId", },
268 { UIA_MenuOpenedEventId,
"UIA_MenuOpenedEventId", },
269 { UIA_AutomationPropertyChangedEventId,
"UIA_AutomationPropertyChangedEventId", },
270 { UIA_AutomationFocusChangedEventId,
"UIA_AutomationFocusChangedEventId", },
271 { UIA_AsyncContentLoadedEventId,
"UIA_AsyncContentLoadedEventId", },
272 { UIA_MenuClosedEventId,
"UIA_MenuClosedEventId", },
273 { UIA_LayoutInvalidatedEventId,
"UIA_LayoutInvalidatedEventId", },
274 { UIA_Invoke_InvokedEventId,
"UIA_Invoke_InvokedEventId", },
275 { UIA_SelectionItem_ElementAddedToSelectionEventId,
"UIA_SelectionItem_ElementAddedToSelectionEventId", },
276 { UIA_SelectionItem_ElementRemovedFromSelectionEventId,
"UIA_SelectionItem_ElementRemovedFromSelectionEventId", },
277 { UIA_SelectionItem_ElementSelectedEventId,
"UIA_SelectionItem_ElementSelectedEventId", },
278 { UIA_Selection_InvalidatedEventId,
"UIA_Selection_InvalidatedEventId", },
279 { UIA_Text_TextSelectionChangedEventId,
"UIA_Text_TextSelectionChangedEventId", },
280 { UIA_Text_TextChangedEventId,
"UIA_Text_TextChangedEventId", },
281 { UIA_Window_WindowOpenedEventId,
"UIA_Window_WindowOpenedEventId", },
282 { UIA_Window_WindowClosedEventId,
"UIA_Window_WindowClosedEventId", },
283 { UIA_MenuModeStartEventId,
"UIA_MenuModeStartEventId", },
284 { UIA_MenuModeEndEventId,
"UIA_MenuModeEndEventId", },
285 { UIA_InputReachedTargetEventId,
"UIA_InputReachedTargetEventId", },
286 { UIA_InputReachedOtherElementEventId,
"UIA_InputReachedOtherElementEventId", },
287 { UIA_InputDiscardedEventId,
"UIA_InputDiscardedEventId", },
288 { UIA_SystemAlertEventId,
"UIA_SystemAlertEventId", },
289 { UIA_LiveRegionChangedEventId,
"UIA_LiveRegionChangedEventId", },
290 { UIA_HostedFragmentRootsInvalidatedEventId,
"UIA_HostedFragmentRootsInvalidatedEventId", },
291 { UIA_Drag_DragStartEventId,
"UIA_Drag_DragStartEventId", },
292 { UIA_Drag_DragCancelEventId,
"UIA_Drag_DragCancelEventId", },
293 { UIA_Drag_DragCompleteEventId,
"UIA_Drag_DragCompleteEventId", },
294 { UIA_DropTarget_DragEnterEventId,
"UIA_DropTarget_DragEnterEventId", },
295 { UIA_DropTarget_DragLeaveEventId,
"UIA_DropTarget_DragLeaveEventId", },
296 { UIA_DropTarget_DroppedEventId,
"UIA_DropTarget_DroppedEventId", },
297 { UIA_TextEdit_TextChangedEventId,
"UIA_TextEdit_TextChangedEventId", },
298 { UIA_TextEdit_ConversionTargetChangedEventId,
"UIA_TextEdit_ConversionTargetChangedEventId", },
299 { UIA_ChangesEventId,
"UIA_ChangesEventId", },
300 { UIA_NotificationEventId,
"UIA_NotificationEventId", },
308 return ((*
id) >
pair->id) - ((*id) <
pair->id);
311#define get_str_for_id(id, id_pair) \
312 get_str_from_id_pair( (id), (id_pair), (ARRAY_SIZE(id_pair)) )
324#define PROV_METHOD_TRACE(prov, method) \
325 if(winetest_debug > 1) printf("%#lx:%#lx: %s_" #method "\n", GetCurrentProcessId(), GetCurrentThreadId(), (prov)->prov_name);
327#define PROV_METHOD_TRACE2(prov, method, arg, str_table) \
328 if(winetest_debug > 1) printf("%#lx:%#lx: %s_" #method ": %d (%s)\n", GetCurrentProcessId(), GetCurrentThreadId(), (prov)->prov_name, \
329 arg, get_str_for_id(arg, str_table)); \
331#define ACC_METHOD_TRACE(acc, method) \
332 if(winetest_debug > 1) printf("%#lx:%#lx: %s_" #method "\n", GetCurrentProcessId(), GetCurrentThreadId(), (acc)->interface_name);
334#define ACC_METHOD_TRACE2(acc, cid, method) \
335 if(winetest_debug > 1) printf("%#lx:%#lx: %s_" #method ": %s\n", GetCurrentProcessId(), GetCurrentThreadId(), \
336 (acc)->interface_name, debugstr_variant((cid)));
338#define DEFINE_EXPECT(func) \
339 static int expect_ ## func = 0, called_ ## func = 0
341#define SET_EXPECT(func) \
342 do { called_ ## func = 0; expect_ ## func = 1; } while(0)
344#define SET_EXPECT_MULTI(func, num) \
345 do { called_ ## func = 0; expect_ ## func = num; } while(0)
347#define CHECK_EXPECT2(func) \
349 ok(expect_ ##func, "unexpected call " #func "\n"); \
353#define CHECK_EXPECT(func) \
355 CHECK_EXPECT2(func); \
359#define CALLED_COUNT(func) \
362#define CHECK_CALLED(func) \
364 ok(called_ ## func, "expected " #func "\n"); \
365 expect_ ## func = called_ ## func = 0; \
368#define CHECK_CALLED_MULTI(func, num) \
370 ok(called_ ## func == num, "expected " #func " %d times (got %d)\n", num, called_ ## func); \
371 expect_ ## func = called_ ## func = 0; \
374#define CHECK_CALLED_AT_LEAST(func, num) \
376 ok(called_ ## func >= num, "expected " #func " at least %d time(s) (got %d)\n", num, called_ ## func); \
377 expect_ ## func = called_ ## func = 0; \
380#define CHECK_CALLED_AT_MOST(func, num) \
382 ok(called_ ## func <= num, "expected " #func " at most %d time(s) (got %d)\n", num, called_ ## func); \
383 expect_ ## func = called_ ## func = 0; \
386#define NAVDIR_INTERNAL_HWND 10
387#define UIA_RUNTIME_ID_PREFIX 42
422 V_BOOL(
v) =
val ? VARIANT_TRUE : VARIANT_FALSE;
431 IUnknown_QueryInterface(iface2, &
IID_IUnknown, (
void**)&unk2);
434 IUnknown_Release(
unk1);
435 IUnknown_Release(unk2);
439#define test_implements_interface( unk, iid, exp_implemented ) \
440 test_implements_interface_( ((IUnknown *)(unk)), (iid), (exp_implemented), __FILE__, __LINE__)
446 hr = IUnknown_QueryInterface(unk, iid, (
void **)&unk2);
448 ok_(
file,
line)(!!unk2 == exp_implemented,
"Unexpected iface %p\n", unk2);
450 IUnknown_Release(unk2);
453#define check_interface_marshal_proxy_creation( iface, iid, expect_proxy ) \
454 check_interface_marshal_proxy_creation_( (iface), (iid), (expect_proxy), __FILE__, __LINE__)
458#define DEFINE_ACC_METHOD_EXPECT(method) \
459 int expect_ ## method , called_ ## method
461#define DEFINE_ACC_METHOD_EXPECTS \
462 DEFINE_ACC_METHOD_EXPECT(QI_IAccIdentity); \
463 DEFINE_ACC_METHOD_EXPECT(get_accParent); \
464 DEFINE_ACC_METHOD_EXPECT(get_accChildCount); \
465 DEFINE_ACC_METHOD_EXPECT(get_accChild); \
466 DEFINE_ACC_METHOD_EXPECT(get_accName); \
467 DEFINE_ACC_METHOD_EXPECT(get_accValue); \
468 DEFINE_ACC_METHOD_EXPECT(get_accDescription); \
469 DEFINE_ACC_METHOD_EXPECT(get_accRole); \
470 DEFINE_ACC_METHOD_EXPECT(get_accState); \
471 DEFINE_ACC_METHOD_EXPECT(get_accHelp); \
472 DEFINE_ACC_METHOD_EXPECT(get_accHelpTopic); \
473 DEFINE_ACC_METHOD_EXPECT(get_accKeyboardShortcut); \
474 DEFINE_ACC_METHOD_EXPECT(get_accFocus); \
475 DEFINE_ACC_METHOD_EXPECT(get_accSelection); \
476 DEFINE_ACC_METHOD_EXPECT(get_accDefaultAction); \
477 DEFINE_ACC_METHOD_EXPECT(accSelect); \
478 DEFINE_ACC_METHOD_EXPECT(accLocation); \
479 DEFINE_ACC_METHOD_EXPECT(accNavigate); \
480 DEFINE_ACC_METHOD_EXPECT(accHitTest); \
481 DEFINE_ACC_METHOD_EXPECT(accDoDefaultAction); \
482 DEFINE_ACC_METHOD_EXPECT(put_accName); \
483 DEFINE_ACC_METHOD_EXPECT(put_accValue); \
484 DEFINE_ACC_METHOD_EXPECT(get_nRelations); \
485 DEFINE_ACC_METHOD_EXPECT(get_relation); \
486 DEFINE_ACC_METHOD_EXPECT(get_relations); \
487 DEFINE_ACC_METHOD_EXPECT(role); \
488 DEFINE_ACC_METHOD_EXPECT(scrollTo); \
489 DEFINE_ACC_METHOD_EXPECT(scrollToPoint); \
490 DEFINE_ACC_METHOD_EXPECT(get_groupPosition); \
491 DEFINE_ACC_METHOD_EXPECT(get_states); \
492 DEFINE_ACC_METHOD_EXPECT(get_extendedRole); \
493 DEFINE_ACC_METHOD_EXPECT(get_localizedExtendedRole); \
494 DEFINE_ACC_METHOD_EXPECT(get_nExtendedStates); \
495 DEFINE_ACC_METHOD_EXPECT(get_extendedStates); \
496 DEFINE_ACC_METHOD_EXPECT(get_localizedExtendedStates); \
497 DEFINE_ACC_METHOD_EXPECT(get_uniqueID); \
498 DEFINE_ACC_METHOD_EXPECT(get_windowHandle); \
499 DEFINE_ACC_METHOD_EXPECT(get_indexInParent); \
500 DEFINE_ACC_METHOD_EXPECT(get_locale); \
501 DEFINE_ACC_METHOD_EXPECT(get_attributes) \
505 int events_handled = 0;
524 if (events_handled == event_handle_count)
556#define SET_ACC_METHOD_EXPECT(acc, method) \
557 do { (acc)->called_ ## method = 0; (acc)->expect_ ## method = 1; } while(0)
559#define SET_ACC_METHOD_EXPECT_MULTI(acc, method, num) \
560 do { (acc)->called_ ## method = 0; (acc)->expect_ ## method = num; } while(0)
562#define CHECK_ACC_METHOD_EXPECT2(acc, method) \
564 ok((acc)->expect_ ##method, "unexpected call %s_" #method "\n", (acc)->interface_name); \
565 (acc)->called_ ## method++; \
568#define CHECK_ACC_METHOD_EXPECT(acc, method) \
570 CHECK_ACC_METHOD_EXPECT2(acc, method); \
571 (acc)->expect_ ## method--; \
574#define CHECK_ACC_METHOD_CALLED(acc, method) \
576 ok((acc)->called_ ## method, "expected %s_" #method "\n", (acc)->interface_name); \
577 (acc)->expect_ ## method = (acc)->called_ ## method = 0; \
580#define CHECK_ACC_METHOD_CALLED_MULTI(acc, method, num) \
582 ok((acc)->called_ ## method == num, "expected %s_" #method " %d times (got %d)\n", (acc)->interface_name, num, (acc)->called_ ## method); \
583 (acc)->expect_ ## method = (acc)->called_ ## method = 0; \
586#define CHECK_ACC_METHOD_CALLED_AT_LEAST(acc, method, num) \
588 ok((acc)->called_ ## method >= num, "expected %s_" #method " at least %d time(s) (got %d)\n", (acc)->interface_name, num, (acc)->called_ ## method); \
589 (acc)->expect_ ## method = (acc)->called_ ## method = 0; \
592#define CHECK_ACC_METHOD_CALLED_AT_MOST(acc, method, num) \
594 ok((acc)->called_ ## method <= num, "expected %s_" #method " at most %d time(s) (got %d)\n", (acc)->interface_name, num, (acc)->called_ ## method); \
595 (acc)->expect_ ## method = (acc)->called_ ## method = 0; \
619 *
obj = &
This->IOleWindow_iface;
621 *
obj = &
This->IServiceProvider_iface;
623 *
obj = &
This->IAccessible2_iface;
627 IAccessible_AddRef(iface);
645 ok(0,
"unexpected call\n");
652 ok(0,
"unexpected call\n");
659 ok(0,
"unexpected call\n");
665 VARIANT *var_result, EXCEPINFO *excep_info,
UINT *arg_err)
667 ok(0,
"unexpected call\n");
678 return IAccessible_QueryInterface(
This->parent, &
IID_IDispatch, (
void **)out_parent);
690 if (
This->child_count)
713 switch (
V_I4(&child_id))
716 return IAccessible_QueryInterface(&
This->IAccessible_iface, &
IID_IDispatch, (
void **)out_child);
768 BSTR *out_description)
807 switch (
V_I4(&child_id))
855 BSTR *out_kbd_shortcut)
881 else if (
This->focus_child_id >= 0)
884 V_I4(pchild_id) =
This->focus_child_id;
900 BSTR *out_default_action)
927 *out_left =
This->left;
928 *out_top =
This->top;
929 *out_width =
This->width;
930 *out_height =
This->height;
1035 return IAccessible_QueryInterface(&
This->IAccessible_iface,
riid,
obj);
1041 return IAccessible_AddRef(&
This->IAccessible_iface);
1047 return IAccessible_Release(&
This->IAccessible_iface);
1053 return IAccessible_GetTypeInfoCount(&
This->IAccessible_iface, pctinfo);
1060 return IAccessible_GetTypeInfo(&
This->IAccessible_iface, iTInfo,
lcid, out_tinfo);
1067 return IAccessible_GetIDsOfNames(&
This->IAccessible_iface,
riid, rg_names, name_count,
1073 VARIANT *var_result, EXCEPINFO *excep_info,
UINT *arg_err)
1076 return IAccessible_Invoke(&
This->IAccessible_iface, disp_id_member,
riid,
lcid,
flags,
1077 disp_params, var_result, excep_info, arg_err);
1083 return IAccessible_get_accParent(&
This->IAccessible_iface, out_parent);
1089 return IAccessible_get_accChildCount(&
This->IAccessible_iface,
out_count);
1096 return IAccessible_get_accChild(&
This->IAccessible_iface, child_id, out_child);
1103 return IAccessible_get_accName(&
This->IAccessible_iface, child_id, out_name);
1110 return IAccessible_get_accValue(&
This->IAccessible_iface, child_id, out_value);
1114 BSTR *out_description)
1117 return IAccessible_get_accDescription(&
This->IAccessible_iface, child_id, out_description);
1124 return IAccessible_get_accRole(&
This->IAccessible_iface, child_id, out_role);
1131 return IAccessible_get_accState(&
This->IAccessible_iface, child_id, out_state);
1138 return IAccessible_get_accHelp(&
This->IAccessible_iface, child_id, out_help);
1145 return IAccessible_get_accHelpTopic(&
This->IAccessible_iface, out_help_file, child_id,
1150 BSTR *out_kbd_shortcut)
1153 return IAccessible_get_accKeyboardShortcut(&
This->IAccessible_iface, child_id,
1160 return IAccessible_get_accFocus(&
This->IAccessible_iface, pchild_id);
1166 return IAccessible_get_accSelection(&
This->IAccessible_iface, out_selection);
1170 BSTR *out_default_action)
1173 return IAccessible_get_accDefaultAction(&
This->IAccessible_iface, child_id,
1174 out_default_action);
1181 return IAccessible_accSelect(&
This->IAccessible_iface, select_flags, child_id);
1188 return IAccessible_accLocation(&
This->IAccessible_iface, out_left, out_top, out_width,
1189 out_height, child_id);
1196 return IAccessible_accNavigate(&
This->IAccessible_iface,
nav_direction, child_id_start,
1204 return IAccessible_accHitTest(&
This->IAccessible_iface,
left,
top, out_child_id);
1210 return IAccessible_accDoDefaultAction(&
This->IAccessible_iface, child_id);
1217 return IAccessible_put_accName(&
This->IAccessible_iface, child_id,
name);
1224 return IAccessible_put_accValue(&
This->IAccessible_iface, child_id,
value);
1279 LONG *out_similar_items_in_group,
LONG *out_position_in_group)
1304 BSTR *out_localized_extended_role)
1321 BSTR **out_extended_states,
LONG *out_extended_states_count)
1330 BSTR **out_localized_extended_states,
LONG *out_localized_extended_states_count)
1346 if (
This->unique_id)
1348 *out_unique_id =
This->unique_id;
1444 return IAccessible_QueryInterface(&
This->IAccessible_iface,
riid,
obj);
1450 return IAccessible_AddRef(&
This->IAccessible_iface);
1456 return IAccessible_Release(&
This->IAccessible_iface);
1488 return IAccessible_QueryInterface(&
This->IAccessible_iface,
riid,
obj);
1494 return IAccessible_AddRef(&
This->IAccessible_iface);
1500 return IAccessible_Release(&
This->IAccessible_iface);
1510 return IAccessible_QueryInterface(&
This->IAccessible_iface,
riid,
obj);
1577 "Accessible_child2",
1733 "get_ProviderOptions",
1734 "GetPatternProvider",
1736 "get_HostRawElementProvider",
1740 "get_BoundingRectangle",
1741 "GetEmbeddedFragmentRoots",
1743 "GetOverrideProviderForHwnd",
1745 "AdviseEventRemoved",
1746 "RespondToWinEvent",
1775#define NODE_CREATE_SEQ(prov) \
1776 { prov , PROV_GET_PROVIDER_OPTIONS }, \
1778 { prov , PROV_GET_PROPERTY_VALUE, METHOD_OPTIONAL }, \
1779 { prov , PROV_GET_HOST_RAW_ELEMENT_PROVIDER }, \
1780 { prov , PROV_GET_PROPERTY_VALUE }, \
1781 { prov , FRAG_NAVIGATE }, \
1782 { prov , PROV_GET_PROVIDER_OPTIONS, METHOD_OPTIONAL } \
1784#define NODE_CREATE_SEQ_OPTIONAL(prov) \
1785 { prov , PROV_GET_PROVIDER_OPTIONS, METHOD_OPTIONAL }, \
1787 { prov , PROV_GET_PROPERTY_VALUE, METHOD_OPTIONAL }, \
1788 { prov , PROV_GET_HOST_RAW_ELEMENT_PROVIDER, METHOD_OPTIONAL }, \
1789 { prov , PROV_GET_PROPERTY_VALUE, METHOD_OPTIONAL }, \
1790 { prov , FRAG_NAVIGATE, METHOD_OPTIONAL }, \
1791 { prov , PROV_GET_PROVIDER_OPTIONS, METHOD_OPTIONAL } \
1797#define NODE_CREATE_SEQ2(prov) \
1798 { prov , PROV_GET_PROVIDER_OPTIONS }, \
1800 { prov , PROV_GET_PROPERTY_VALUE, METHOD_OPTIONAL }, \
1801 { prov , PROV_GET_HOST_RAW_ELEMENT_PROVIDER }, \
1802 { prov , FRAG_NAVIGATE }, \
1803 { prov , PROV_GET_PROVIDER_OPTIONS, METHOD_OPTIONAL } \
1805#define NODE_CREATE_SEQ2_OPTIONAL(prov) \
1806 { prov , PROV_GET_PROVIDER_OPTIONS, METHOD_OPTIONAL }, \
1807 { prov , PROV_GET_HOST_RAW_ELEMENT_PROVIDER, METHOD_OPTIONAL }, \
1808 { prov , FRAG_NAVIGATE, METHOD_OPTIONAL }, \
1809 { prov , PROV_GET_PROVIDER_OPTIONS, METHOD_OPTIONAL } \
1816#define NODE_CREATE_SEQ3(prov) \
1817 { prov , PROV_GET_PROVIDER_OPTIONS, METHOD_OPTIONAL }, \
1819 { prov , PROV_GET_PROPERTY_VALUE, METHOD_OPTIONAL }, \
1820 { prov , PROV_GET_HOST_RAW_ELEMENT_PROVIDER }, \
1821 { prov , PROV_GET_PROPERTY_VALUE }, \
1822 { prov , FRAG_NAVIGATE }, \
1823 { prov , PROV_GET_PROVIDER_OPTIONS, METHOD_OPTIONAL } \
1848 prov_method.
flags = 0;
1852#define ok_method_sequence( exp, context ) \
1853 ok_method_sequence_( (exp), (context), __FILE__, __LINE__)
1859 unsigned int count = 0;
1910 ok_(
file,
line)(0,
"incomplete sequence: expected %s_%s, got nothing\n",
expected->prov->prov_name,
1913 ok_(
file,
line)(0,
"incomplete sequence: expected nothing, got %s_%s\n", actual->
prov->prov_name,
1925 if (
prov->method_call_event_handle && (
prov->method_call_event_method_id ==
method))
1979#define check_node_provider_desc_todo( prov_desc, prov_type, prov_name, parent_link ) \
1980 check_node_provider_desc_( (prov_desc), (prov_type), (prov_name), (parent_link), TRUE, __FILE__, __LINE__)
1981#define check_node_provider_desc( prov_desc, prov_type, prov_name, parent_link ) \
1982 check_node_provider_desc_( (prov_desc), (prov_type), (prov_name), (parent_link), FALSE, __FILE__, __LINE__)
2017#define check_node_provider_desc_prefix( prov_desc, pid, prov_id ) \
2018 check_node_provider_desc_prefix_( (prov_desc), (pid), (prov_id), __FILE__, __LINE__)
2032 ok_(
file,
line)(prov_pid ==
pid,
"Unexpected pid %lu\n", prov_pid);
2045 ok_(
file,
line)(prov_hwnd == prov_id,
"Unexpected hwnd %p\n", prov_hwnd);
2077#define check_runtime_id( exp_runtime_id, exp_size, runtime_id ) \
2078 check_runtime_id_( (exp_runtime_id), (exp_size), (runtime_id), __FILE__, __LINE__)
2081 LONG i,
idx, lbound, ubound, elems;
2087 ok_(
file,
line)(dims == 1,
"Unexpected array dims %d\n", dims);
2095 elems = (ubound - lbound) + 1;
2096 ok_(
file,
line)(exp_size == elems,
"Unexpected runtime_id array size %#lx\n", elems);
2098 for (
i = 0;
i < elems;
i++)
2120 *
ppv = &
This->IRawElementProviderFragment_iface;
2122 *
ppv = &
This->IRawElementProviderFragmentRoot_iface;
2124 *
ppv = &
This->IRawElementProviderHwndOverride_iface;
2126 *
ppv = &
This->IRawElementProviderAdviseEvents_iface;
2128 *
ppv = &
This->IValueProvider_iface;
2130 *
ppv = &
This->ILegacyIAccessibleProvider_iface;
2131 else if (
This->win_event_handler_data.is_supported &&
IsEqualIID(
riid, &IID_IProxyProviderWinEventHandler))
2132 *
ppv = &
This->IProxyProviderWinEventHandler_iface;
2136 IRawElementProviderSimple_AddRef(iface);
2158 if (
This->expected_tid)
2165 if (
This->prov_opts)
2167 *ret_val =
This->prov_opts;
2180 if (
This->expected_tid)
2188 case UIA_ValuePatternId:
2189 if (
This->value_pattern_data.is_supported)
2193 case UIA_LegacyIAccessiblePatternId:
2194 if (
This->legacy_acc_pattern_data.is_supported)
2203 IUnknown_AddRef(*ret_val);
2215 if (
This->expected_tid)
2221 if (
This->prop_override &&
This->prop_override_count)
2225 for (
i = 0;
i <
This->prop_override_count;
i++)
2227 if (
This->prop_override[
i].prop_id == prop_id)
2229 *ret_val =
This->prop_override[
i].val;
2241 case UIA_NativeWindowHandlePropertyId:
2242 if (
This->ret_invalid_prop_type)
2247 else if (!
This->ignore_hwnd_prop)
2254 case UIA_ProcessIdPropertyId:
2255 case UIA_ControlTypePropertyId:
2256 case UIA_CulturePropertyId:
2257 case UIA_OrientationPropertyId:
2258 case UIA_LiveSettingPropertyId:
2259 case UIA_PositionInSetPropertyId:
2260 case UIA_SizeOfSetPropertyId:
2261 case UIA_LevelPropertyId:
2262 case UIA_LandmarkTypePropertyId:
2263 case UIA_FillColorPropertyId:
2264 case UIA_FillTypePropertyId:
2265 case UIA_VisualEffectsPropertyId:
2266 case UIA_HeadingLevelPropertyId:
2267 if (
This->ret_invalid_prop_type)
2279 case UIA_RotationPropertyId:
2280 if (
This->ret_invalid_prop_type)
2292 case UIA_LocalizedControlTypePropertyId:
2293 case UIA_NamePropertyId:
2294 case UIA_AcceleratorKeyPropertyId:
2295 case UIA_AccessKeyPropertyId:
2296 case UIA_AutomationIdPropertyId:
2297 case UIA_ClassNamePropertyId:
2298 case UIA_HelpTextPropertyId:
2299 case UIA_ItemTypePropertyId:
2300 case UIA_FrameworkIdPropertyId:
2301 case UIA_ItemStatusPropertyId:
2302 case UIA_AriaRolePropertyId:
2303 case UIA_AriaPropertiesPropertyId:
2304 case UIA_LocalizedLandmarkTypePropertyId:
2305 case UIA_FullDescriptionPropertyId:
2306 if (
This->ret_invalid_prop_type)
2318 case UIA_HasKeyboardFocusPropertyId:
2319 case UIA_IsKeyboardFocusablePropertyId:
2320 case UIA_IsEnabledPropertyId:
2321 case UIA_IsControlElementPropertyId:
2322 case UIA_IsContentElementPropertyId:
2323 case UIA_IsPasswordPropertyId:
2324 case UIA_IsOffscreenPropertyId:
2325 case UIA_IsRequiredForFormPropertyId:
2326 case UIA_IsDataValidForFormPropertyId:
2327 case UIA_OptimizeForVisualContentPropertyId:
2328 case UIA_IsPeripheralPropertyId:
2329 case UIA_IsDialogPropertyId:
2330 if (
This->ret_invalid_prop_type)
2338 V_BOOL(ret_val) = VARIANT_TRUE;
2342 case UIA_AnnotationTypesPropertyId:
2343 case UIA_OutlineColorPropertyId:
2344 if (
This->ret_invalid_prop_type)
2356 case UIA_OutlineThicknessPropertyId:
2357 case UIA_SizePropertyId:
2358 if (
This->ret_invalid_prop_type)
2370 case UIA_LabeledByPropertyId:
2371 if (
This->ret_invalid_prop_type)
2384 case UIA_AnnotationObjectsPropertyId:
2385 case UIA_DescribedByPropertyId:
2386 case UIA_FlowsFromPropertyId:
2387 case UIA_FlowsToPropertyId:
2388 case UIA_ControllerForPropertyId:
2389 if (
This->ret_invalid_prop_type)
2401 case UIA_ProviderDescriptionPropertyId:
2424 IRawElementProviderSimple **ret_val)
2429 if (
This->expected_tid)
2482 if (
This->expected_tid)
2491 *ret_val =
This->parent;
2495 *ret_val =
This->next_sibling;
2499 *ret_val =
This->prev_sibling;
2503 *ret_val =
This->first_child;
2507 *ret_val =
This->last_child;
2516 IRawElementProviderFragment_AddRef(*ret_val);
2528 if (
This->expected_tid)
2535 if (
This->runtime_id[0] ||
This->runtime_id[1])
2558 if (
This->expected_tid)
2564 *ret_val =
This->bounds_rect;
2574 if (
This->expected_tid)
2581 if (
This->embedded_frag_roots &&
This->embedded_frag_roots_count)
2600 ok(0,
"unexpected call\n");
2605 IRawElementProviderFragmentRoot **ret_val)
2610 if (
This->expected_tid)
2616 if (
This->frag_root)
2618 *ret_val =
This->frag_root;
2619 IRawElementProviderFragmentRoot_AddRef(
This->frag_root);
2663 double x,
double y, IRawElementProviderFragment **ret_val)
2665 ok(0,
"unexpected call\n");
2670 IRawElementProviderFragment **ret_val)
2684 IRawElementProviderFragment_AddRef(*ret_val);
2724 HWND hwnd, IRawElementProviderSimple **ret_val)
2735 return IRawElementProviderSimple_QueryInterface(&
Provider_override.IRawElementProviderSimple_iface,
2736 &IID_IRawElementProviderSimple, (
void **)ret_val);
2779 if (
This->expected_tid)
2782 This->advise_events_added_event_id = event_id;
2795 if (
This->expected_tid)
2798 This->advise_events_removed_event_id = event_id;
2845 data = &
This->win_event_handler_data;
2846 if ((
data->exp_win_event_id != event_id) || (
data->exp_win_event_hwnd !=
hwnd) || (
data->exp_win_event_obj_id != obj_id) ||
2847 (
data->exp_win_event_child_id != child_id))
2851 if (
This->expected_tid)
2855 if (
data->responder_prov)
2862 hr = IProxyProviderWinEventSink_AddAutomationEvent(event_sink,
data->responder_prov,
data->responder_event);
2903 ok(0,
"unexpected call\n");
2909 ok(0,
"unexpected call\n");
2957 ok(0,
"unexpected call\n");
2963 ok(0,
"unexpected call\n");
2969 ok(0,
"unexpected call\n");
2976 ok(0,
"unexpected call\n");
2990 ok(0,
"unexpected call\n");
2996 ok(0,
"unexpected call\n");
3001 BSTR *out_description)
3003 ok(0,
"unexpected call\n");
3017 ok(0,
"unexpected call\n");
3023 ok(0,
"unexpected call\n");
3028 BSTR *out_kbd_shortcut)
3030 ok(0,
"unexpected call\n");
3037 ok(0,
"unexpected call\n");
3042 BSTR *out_default_action)
3044 ok(0,
"unexpected call\n");
3226 "Provider_override",
3234#define DEFINE_PROVIDER(name) \
3235 static struct Provider Provider_ ## name = \
3237 { &ProviderSimpleVtbl }, \
3238 { &ProviderFragmentVtbl }, \
3239 { &ProviderFragmentRootVtbl }, \
3240 { &ProviderHwndOverrideVtbl }, \
3241 { &ProviderAdviseEventsVtbl }, \
3242 { &ProviderWinEventHandlerVtbl }, \
3243 { &ProviderValuePatternVtbl }, \
3244 { &ProviderLegacyIAccessiblePatternVtbl }, \
3246 "Provider_" # name "", \
3250 ProviderOptions_ServerSideProvider, 0, 0 \
3325 IRawElementProviderSimple *
p, *p2;
3349 ok(
hwnd !=
NULL,
"Failed to create a test window.\n");
3351 p = (
void *)0xdeadbeef;
3354 ok(
p ==
NULL,
"Unexpected instance.\n");
3361 ok(
hr ==
S_OK,
"Failed to get host provider, hr %#lx.\n",
hr);
3365 ok(
hr ==
S_OK,
"Failed to get host provider, hr %#lx.\n",
hr);
3366 ok(
p != p2,
"Unexpected instance.\n");
3367 IRawElementProviderSimple_Release(p2);
3369 hr = IRawElementProviderSimple_get_HostRawElementProvider(
p, &p2);
3371 ok(p2 ==
NULL,
"Unexpected instance.\n");
3373 hr = IRawElementProviderSimple_GetPropertyValue(
p, UIA_NativeWindowHandlePropertyId, &
v);
3378 hr = IRawElementProviderSimple_GetPropertyValue(
p, UIA_ProviderDescriptionPropertyId, &
v);
3384 for (
i = UIA_InvokePatternId;
i < (UIA_CustomNavigationPatternId + 1);
i++)
3388 unk = (
void *)0xdeadbeef;
3389 hr = IRawElementProviderSimple_GetPatternProvider(
p,
i, &unk);
3390 ok(
hr ==
S_OK,
"Unexpected hr %#lx, %d.\n",
hr,
i);
3391 ok(!unk,
"Pattern %d returned %p\n",
i, unk);
3394 hr = IRawElementProviderSimple_get_ProviderOptions(
p, &prov_opt);
3398 "Unexpected provider options %#x\n", prov_opt);
3403 hr = IRawElementProviderSimple_GetPropertyValue(
p, UIA_NativeWindowHandlePropertyId, &
v);
3408 hr = IRawElementProviderSimple_GetPropertyValue(
p, UIA_ProviderDescriptionPropertyId, &
v);
3413 hr = IRawElementProviderSimple_get_ProviderOptions(
p, &prov_opt);
3417 "Unexpected provider options %#x\n", prov_opt);
3419 IRawElementProviderSimple_Release(
p);
3427 IUnknown *unk_ns, *unk_ns2, *unk_ma, *unk_ma2;
3444 ok(unk_ns2 == unk_ns,
"UiaGetReservedNotSupported pointer mismatch, unk_ns2 %p, unk_ns %p\n", unk_ns2, unk_ns);
3445 ok(unk_ma2 == unk_ma,
"UiaGetReservedMixedAttribute pointer mismatch, unk_ma2 %p, unk_ma %p\n", unk_ma2, unk_ma);
3454 IUnknown *unk_ns, *unk_ns2, *unk_ma, *unk_ma2;
3467 ok(unk_ns !=
NULL,
"UiaGetReservedNotSupportedValue returned NULL interface.\n");
3469 refcnt = IUnknown_AddRef(unk_ns);
3470 ok(refcnt == 1,
"Expected refcnt %d, got %ld\n", 1, refcnt);
3472 refcnt = IUnknown_AddRef(unk_ns);
3473 ok(refcnt == 1,
"Expected refcnt %d, got %ld\n", 1, refcnt);
3475 refcnt = IUnknown_Release(unk_ns);
3476 ok(refcnt == 1,
"Expected refcnt %d, got %ld\n", 1, refcnt);
3480 ok(unk_ns2 !=
NULL,
"UiaGetReservedNotSupportedValue returned NULL interface.");
3481 ok(unk_ns2 == unk_ns,
"UiaGetReservedNotSupported pointer mismatch, unk_ns2 %p, unk_ns %p\n", unk_ns2, unk_ns);
3484 hr = IUnknown_QueryInterface(unk_ns, &IID_IMarshal, (
void **)&marshal);
3486 ok(marshal !=
NULL,
"Failed to get IMarshal interface.\n");
3488 refcnt = IMarshal_AddRef(marshal);
3489 ok(refcnt == 2,
"Expected refcnt %d, got %ld\n", 2, refcnt);
3491 refcnt = IMarshal_Release(marshal);
3492 ok(refcnt == 1,
"Expected refcnt %d, got %ld\n", 1, refcnt);
3494 refcnt = IMarshal_Release(marshal);
3495 ok(refcnt == 0,
"Expected refcnt %d, got %ld\n", 0, refcnt);
3503 ok(unk_ma !=
NULL,
"UiaGetReservedMixedAttributeValue returned NULL interface.");
3505 refcnt = IUnknown_AddRef(unk_ma);
3506 ok(refcnt == 1,
"Expected refcnt %d, got %ld\n", 1, refcnt);
3508 refcnt = IUnknown_AddRef(unk_ma);
3509 ok(refcnt == 1,
"Expected refcnt %d, got %ld\n", 1, refcnt);
3511 refcnt = IUnknown_Release(unk_ma);
3512 ok(refcnt == 1,
"Expected refcnt %d, got %ld\n", 1, refcnt);
3516 ok(unk_ma2 !=
NULL,
"UiaGetReservedMixedAttributeValue returned NULL interface.");
3517 ok(unk_ma2 == unk_ma,
"UiaGetReservedMixedAttribute pointer mismatch, unk_ma2 %p, unk_ma %p\n", unk_ma2, unk_ma);
3520 hr = IUnknown_QueryInterface(unk_ma, &IID_IMarshal, (
void **)&marshal);
3522 ok(marshal !=
NULL,
"Failed to get IMarshal interface.\n");
3524 refcnt = IMarshal_AddRef(marshal);
3525 ok(refcnt == 2,
"Expected refcnt %d, got %ld\n", 2, refcnt);
3527 refcnt = IMarshal_Release(marshal);
3528 ok(refcnt == 1,
"Expected refcnt %d, got %ld\n", 1, refcnt);
3530 refcnt = IMarshal_Release(marshal);
3531 ok(refcnt == 0,
"Expected refcnt %d, got %ld\n", 0, refcnt);
3606 IProxyProviderWinEventSink_AddRef(iface);
3628 This->prop_change_elprov = elprov;
3630 IRawElementProviderSimple_AddRef(elprov);
3632 This->prop_change_prop_id = prop_id;
3644 This->event_elprov = elprov;
3646 IRawElementProviderSimple_AddRef(elprov);
3659 This->structure_change_elprov = elprov;
3661 IRawElementProviderSimple_AddRef(elprov);
3690 IProxyProviderWinEventHandler *
handler;
3691 IRawElementProviderSimple *elprov;
3699 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IProxyProviderWinEventHandler, (
void **)&
handler);
3753 IProxyProviderWinEventHandler_Release(
handler);
3754 IRawElementProviderSimple_Release(elprov);
3757DEFINE_GUID(SID_AccFromDAWrapper, 0x33f139ee, 0xe509, 0x47f7, 0xbf,0x39, 0x83,0x76,0x44,0xf7,0x45,0x76);
3763 hr = IAccessible_QueryInterface(acc, &IID_IServiceProvider, (
void**)&
sp);
3768 hr = IServiceProvider_QueryService(
sp, &SID_AccFromDAWrapper, &IID_IAccessible, (
void**)&acc2);
3769 IServiceProvider_Release(
sp);
3777#define check_msaa_prov_acc( elprov, acc, cid) \
3778 check_msaa_prov_acc_( ((IUnknown *)elprov), (acc), (cid), __LINE__)
3781 ILegacyIAccessibleProvider *accprov;
3786 hr = IUnknown_QueryInterface(elprov, &IID_ILegacyIAccessibleProvider, (
void **)&accprov);
3788 ok_(__FILE__,
line)(!!accprov,
"accprov == NULL\n");
3791 hr = ILegacyIAccessibleProvider_GetIAccessible(accprov, &acc2);
3800 IAccessible_Release(acc2);
3803 ok_(__FILE__,
line)(acc2 == acc,
"acc2 != acc\n");
3805 IAccessible_Release(acc2);
3807 hr = ILegacyIAccessibleProvider_get_ChildId(accprov, &child_id);
3809 ok_(__FILE__,
line)(child_id ==
cid,
"child_id != cid\n");
3811 ILegacyIAccessibleProvider_Release(accprov);
3814#define check_msaa_prov_host_elem_prov( elem, exp_host_prov) \
3815 check_msaa_prov_host_elem_prov_( ((IUnknown *)elem), (exp_host_prov), __LINE__)
3818 IRawElementProviderSimple *elprov, *elprov2;
3821 hr = IUnknown_QueryInterface(
elem, &IID_IRawElementProviderSimple, (
void **)&elprov);
3823 ok_(__FILE__,
line)(!!elprov,
"elprov == NULL\n");
3825 elprov2 = (
void *)0xdeadbeef;
3826 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
3828 ok_(__FILE__,
line)((elprov2 != (
void *)0xdeadbeef) && !!elprov2 == exp_host_prov,
"Unexpected provider %p from get_HostRawElementProvider\n", elprov2);
3831 IRawElementProviderSimple_Release(elprov2);
3832 IRawElementProviderSimple_Release(elprov);
3837 IRawElementProviderFragmentRoot *elroot, *elroot2;
3838 IRawElementProviderFragment *elfrag, *elfrag2;
3839 IRawElementProviderSimple *elprov;
3851 ok(!!elprov,
"elprov == NULL\n");
3853 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IRawElementProviderFragment, (
void **)&elfrag);
3855 ok(!!elfrag,
"elfrag == NULL\n");
3858 ret_arr = (
void *)0xdeadbeef;
3859 hr = IRawElementProviderFragment_GetEmbeddedFragmentRoots(elfrag, &ret_arr);
3861 ok(!ret_arr,
"ret_arr != NULL\n");
3872 hr = IRawElementProviderFragment_get_FragmentRoot(elfrag, &elroot);
3874 ok(!!elroot,
"elroot == NULL\n");
3889 hr = IRawElementProviderFragmentRoot_QueryInterface(elroot, &IID_IRawElementProviderFragment, (
void **)&elfrag2);
3891 ok(!!elfrag2,
"elfrag2 == NULL\n");
3900 hr = IRawElementProviderFragment_get_FragmentRoot(elfrag2, &elroot2);
3901 IRawElementProviderFragment_Release(elfrag2);
3903 ok(!!elroot2,
"elroot2 == NULL\n");
3908 IRawElementProviderFragmentRoot_Release(elroot2);
3909 IRawElementProviderFragmentRoot_Release(elroot);
3918 hr = IRawElementProviderFragment_get_FragmentRoot(elfrag, &elroot);
3920 ok(!!elroot,
"elroot == NULL\n");
3930 hr = IRawElementProviderFragmentRoot_QueryInterface(elroot, &IID_IRawElementProviderFragment, (
void **)&elfrag2);
3932 ok(!!elfrag2,
"elfrag2 == NULL\n");
3937 hr = IRawElementProviderFragment_get_FragmentRoot(elfrag2, &elroot2);
3938 IRawElementProviderFragment_Release(elfrag2);
3940 ok(!!elroot2,
"elroot2 == NULL\n");
3945 IRawElementProviderFragmentRoot_Release(elroot2);
3947 IRawElementProviderFragmentRoot_Release(elroot);
3948 IRawElementProviderFragment_Release(elfrag);
3953 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IRawElementProviderFragmentRoot, (
void **)&elroot);
3955 ok(!!elroot,
"elroot == NULL\n");
3958 elfrag = (
void *)0xdeadbeef;
3961 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
3963 ok(!elfrag,
"elfrag != NULL\n");
3971 elfrag = (
void *)0xdeadbeef;
3977 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
3979 ok(!elfrag,
"elfrag != NULL\n");
3989 elfrag = (
void *)0xdeadbeef;
3995 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
3997 ok(!!elfrag,
"elfrag == NULL\n");
4003 IRawElementProviderFragment_Release(elfrag);
4009 elfrag = (
void *)0xdeadbeef;
4019 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
4021 ok(!!elfrag,
"elfrag == NULL\n");
4030 IRawElementProviderFragment_Release(elfrag);
4037 elfrag = (
void *)0xdeadbeef;
4046 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
4048 ok(!elfrag,
"elfrag != NULL\n");
4060 elfrag = (
void *)0xdeadbeef;
4067 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
4069 ok(!elfrag,
"elfrag != NULL\n");
4078 elfrag = (
void *)0xdeadbeef;
4083 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
4085 ok(!!elfrag,
"elfrag == NULL\n");
4092 IRawElementProviderFragment_Release(elfrag);
4100 elfrag = (
void *)0xdeadbeef;
4105 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
4107 ok(!elfrag,
"elfrag != NULL\n");
4114 elfrag = (
void *)0xdeadbeef;
4123 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
4125 ok(!!elfrag,
"elfrag == NULL\n");
4133 IRawElementProviderFragment_Release(elfrag);
4141 elfrag = (
void *)0xdeadbeef;
4147 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
4149 ok(!!elfrag,
"elfrag == NULL\n");
4157 IRawElementProviderFragment_Release(elfrag);
4159 IRawElementProviderFragmentRoot_Release(elroot);
4160 IRawElementProviderSimple_Release(elprov);
4168 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IRawElementProviderFragment, (
void **)&elfrag);
4170 ok(!!elfrag,
"elfrag == NULL\n");
4173 ret_arr = (
void *)0xdeadbeef;
4174 hr = IRawElementProviderFragment_GetEmbeddedFragmentRoots(elfrag, &ret_arr);
4176 ok(!ret_arr,
"ret_arr != NULL\n");
4184 hr = IRawElementProviderFragment_get_FragmentRoot(elfrag, &elroot);
4186 ok(!!elroot,
"elroot == NULL\n");
4191 IRawElementProviderFragmentRoot_Release(elroot);
4192 IRawElementProviderFragment_Release(elfrag);
4198 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IRawElementProviderFragmentRoot, (
void **)&elroot);
4200 ok(!!elroot,
"elroot == NULL\n");
4202 elfrag = (
void *)0xdeadbeef;
4203 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
4205 ok(!elfrag,
"elfrag != NULL\n");
4207 IRawElementProviderFragmentRoot_Release(elroot);
4208 IRawElementProviderSimple_Release(elprov);
4221 ok(!!elprov,
"elprov == NULL\n");
4225 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IRawElementProviderFragment, (
void **)&elfrag);
4227 ok(!!elfrag,
"elfrag == NULL\n");
4230 ret_arr = (
void *)0xdeadbeef;
4231 hr = IRawElementProviderFragment_GetEmbeddedFragmentRoots(elfrag, &ret_arr);
4233 ok(!ret_arr,
"ret_arr != NULL\n");
4241 hr = IRawElementProviderFragment_get_FragmentRoot(elfrag, &elroot);
4243 ok(!!elroot,
"elroot == NULL\n");
4247 IRawElementProviderFragmentRoot_Release(elroot);
4248 IRawElementProviderFragment_Release(elfrag);
4253 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IRawElementProviderFragmentRoot, (
void **)&elroot);
4255 ok(!!elroot,
"elroot == NULL\n");
4261 elfrag = (
void *)0xdeadbeef;
4265 hr = IRawElementProviderFragmentRoot_GetFocus(elroot, &elfrag);
4267 ok(!!elfrag,
"elfrag == NULL\n");
4274 IRawElementProviderFragment_Release(elfrag);
4277 IRawElementProviderFragmentRoot_Release(elroot);
4278 IRawElementProviderSimple_Release(elprov);
4292 { ROLE_SYSTEM_TITLEBAR, UIA_TitleBarControlTypeId },
4293 { ROLE_SYSTEM_MENUBAR, UIA_MenuBarControlTypeId },
4294 { ROLE_SYSTEM_SCROLLBAR, UIA_ScrollBarControlTypeId },
4295 { ROLE_SYSTEM_GRIP, UIA_ThumbControlTypeId },
4296 { ROLE_SYSTEM_WINDOW, UIA_WindowControlTypeId },
4297 { ROLE_SYSTEM_MENUPOPUP, UIA_MenuControlTypeId },
4298 { ROLE_SYSTEM_MENUITEM, UIA_MenuItemControlTypeId },
4299 { ROLE_SYSTEM_TOOLTIP, UIA_ToolTipControlTypeId },
4300 { ROLE_SYSTEM_APPLICATION, UIA_WindowControlTypeId },
4301 { ROLE_SYSTEM_DOCUMENT, UIA_DocumentControlTypeId },
4302 { ROLE_SYSTEM_PANE, UIA_PaneControlTypeId },
4303 { ROLE_SYSTEM_GROUPING, UIA_GroupControlTypeId },
4304 { ROLE_SYSTEM_SEPARATOR, UIA_SeparatorControlTypeId },
4305 { ROLE_SYSTEM_TOOLBAR, UIA_ToolBarControlTypeId },
4306 { ROLE_SYSTEM_STATUSBAR, UIA_StatusBarControlTypeId },
4307 { ROLE_SYSTEM_TABLE, UIA_TableControlTypeId },
4308 { ROLE_SYSTEM_COLUMNHEADER, UIA_HeaderControlTypeId },
4309 { ROLE_SYSTEM_ROWHEADER, UIA_HeaderControlTypeId },
4310 { ROLE_SYSTEM_CELL, UIA_DataItemControlTypeId },
4311 { ROLE_SYSTEM_LINK, UIA_HyperlinkControlTypeId },
4312 { ROLE_SYSTEM_LIST, UIA_ListControlTypeId },
4313 { ROLE_SYSTEM_LISTITEM, UIA_ListItemControlTypeId },
4314 { ROLE_SYSTEM_OUTLINE, UIA_TreeControlTypeId },
4315 { ROLE_SYSTEM_OUTLINEITEM, UIA_TreeItemControlTypeId },
4316 { ROLE_SYSTEM_PAGETAB, UIA_TabItemControlTypeId },
4317 { ROLE_SYSTEM_INDICATOR, UIA_ThumbControlTypeId },
4318 { ROLE_SYSTEM_GRAPHIC, UIA_ImageControlTypeId },
4319 { ROLE_SYSTEM_STATICTEXT, UIA_TextControlTypeId },
4320 { ROLE_SYSTEM_TEXT, UIA_EditControlTypeId },
4321 { ROLE_SYSTEM_PUSHBUTTON, UIA_ButtonControlTypeId },
4322 { ROLE_SYSTEM_CHECKBUTTON, UIA_CheckBoxControlTypeId },
4323 { ROLE_SYSTEM_RADIOBUTTON, UIA_RadioButtonControlTypeId },
4324 { ROLE_SYSTEM_COMBOBOX, UIA_ComboBoxControlTypeId },
4325 { ROLE_SYSTEM_PROGRESSBAR, UIA_ProgressBarControlTypeId },
4326 { ROLE_SYSTEM_SLIDER, UIA_SliderControlTypeId },
4327 { ROLE_SYSTEM_SPINBUTTON, UIA_SpinnerControlTypeId },
4328 { ROLE_SYSTEM_BUTTONDROPDOWN, UIA_SplitButtonControlTypeId },
4329 { ROLE_SYSTEM_BUTTONMENU, UIA_MenuItemControlTypeId },
4330 { ROLE_SYSTEM_BUTTONDROPDOWNGRID, UIA_ButtonControlTypeId },
4331 { ROLE_SYSTEM_PAGETABLIST, UIA_TabControlTypeId },
4332 { ROLE_SYSTEM_SPLITBUTTON, UIA_SplitButtonControlTypeId },
4334 { ROLE_SYSTEM_SOUND, 0 },
4335 { ROLE_SYSTEM_CURSOR, 0 },
4336 { ROLE_SYSTEM_CARET, 0 },
4337 { ROLE_SYSTEM_ALERT, 0 },
4338 { ROLE_SYSTEM_CLIENT, 0 },
4339 { ROLE_SYSTEM_CHART, 0 },
4340 { ROLE_SYSTEM_DIALOG, 0 },
4341 { ROLE_SYSTEM_BORDER, 0 },
4342 { ROLE_SYSTEM_COLUMN, 0 },
4343 { ROLE_SYSTEM_ROW, 0 },
4344 { ROLE_SYSTEM_HELPBALLOON, 0 },
4345 { ROLE_SYSTEM_CHARACTER, 0 },
4346 { ROLE_SYSTEM_PROPERTYPAGE, 0 },
4347 { ROLE_SYSTEM_DROPLIST, 0 },
4348 { ROLE_SYSTEM_DIAL, 0 },
4349 { ROLE_SYSTEM_HOTKEYFIELD, 0 },
4350 { ROLE_SYSTEM_DIAGRAM, 0 },
4351 { ROLE_SYSTEM_ANIMATION, 0 },
4352 { ROLE_SYSTEM_EQUATION, 0 },
4353 { ROLE_SYSTEM_WHITESPACE, 0 },
4354 { ROLE_SYSTEM_IPADDRESS, 0 },
4355 { ROLE_SYSTEM_OUTLINEBUTTON, 0 },
4366 { ~STATE_SYSTEM_UNAVAILABLE, UIA_IsEnabledPropertyId },
4392 IRawElementProviderSimple *elprov, *elprov2;
4405 IRawElementProviderSimple_Release(elprov);
4406 win_skip(
"UiaProviderFromIAccessible has no IAccessible2 support, skipping tests.\n");
4417 elprov2 = (
void *)0xdeadbeef;
4418 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
4420 ok(!elprov2,
"elprov != NULL, elprov %p\n", elprov2);
4431 IRawElementProviderSimple_Release(elprov);
4436 win_skip(
"Win10v1909 doesn't support IAccessible2 interface comparison, skipping tests.\n");
4445 elprov2 = (
void *)0xdeadbeef;
4447 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
4449 ok(!elprov2,
"elprov != NULL, elprov %p\n", elprov2);
4451 IRawElementProviderSimple_Release(elprov);
4476 elprov2 = (
void *)0xdeadbeef;
4477 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
4479 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
4492 IRawElementProviderSimple_Release(elprov2);
4494 elprov2 = (
void *)0xdeadbeef;
4496 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
4498 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
4499 IRawElementProviderSimple_Release(elprov2);
4501 IRawElementProviderSimple_Release(elprov);
4515 elprov2 = (
void *)0xdeadbeef;
4516 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
4518 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
4523 IRawElementProviderSimple_Release(elprov2);
4525 elprov2 = (
void *)0xdeadbeef;
4527 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
4529 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
4530 IRawElementProviderSimple_Release(elprov2);
4532 IRawElementProviderSimple_Release(elprov);
4546 elprov2 = (
void *)0xdeadbeef;
4547 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
4549 ok(!elprov2,
"elprov != NULL, elprov %p\n", elprov2);
4555 elprov2 = (
void *)0xdeadbeef;
4557 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
4559 ok(!elprov2,
"elprov != NULL, elprov %p\n", elprov2);
4561 IRawElementProviderSimple_Release(elprov);
4570#define check_fragment_acc( fragment, acc, cid) \
4571 check_fragment_acc_( (fragment), (acc), (cid), __LINE__)
4575 ILegacyIAccessibleProvider *accprov;
4580 hr = IRawElementProviderFragment_QueryInterface(elfrag, &IID_ILegacyIAccessibleProvider, (
void **)&accprov);
4582 ok_(__FILE__,
line) (!!accprov,
"accprov == NULL\n");
4584 hr = ILegacyIAccessibleProvider_GetIAccessible(accprov, &accessible);
4586 ok_(__FILE__,
line) (accessible == acc,
"accessible != acc\n");
4587 IAccessible_Release(accessible);
4589 hr = ILegacyIAccessibleProvider_get_ChildId(accprov, &child_id);
4591 ok_(__FILE__,
line) (child_id ==
cid,
"child_id != cid\n");
4593 ILegacyIAccessibleProvider_Release(accprov);
4598 IRawElementProviderFragment *elfrag, *elfrag2, *elfrag3;
4599 IRawElementProviderSimple *elprov, *elprov2;
4613 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IRawElementProviderFragment, (
void **)&elfrag);
4615 ok(!!elfrag,
"elfrag == NULL\n");
4626 L"acc_name", 0, 0, 50, 50);
4628 L"acc_name", 0, 0, 50, 50);
4643 elfrag2 = (
void *)0xdeadbeef;
4647 ok(!elfrag2,
"elfrag2 != NULL\n");
4664 elprov2 = (
void *)0xdeadbeef;
4665 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
4667 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
4668 IRawElementProviderSimple_Release(elprov2);
4671 elfrag2 = (
void *)0xdeadbeef;
4675 ok(!elfrag2,
"elfrag2 != NULL\n");
4677 elfrag2 = (
void *)0xdeadbeef;
4681 ok(!elfrag2,
"elfrag2 != NULL\n");
4683 elfrag2 = (
void *)0xdeadbeef;
4687 ok(!elfrag2,
"elfrag2 != NULL\n");
4705 ok(!!elfrag2,
"elfrag2 == NULL\n");
4719 ok(!!elfrag3,
"elfrag2 == NULL\n");
4725 IRawElementProviderFragment_Release(elfrag3);
4727 IRawElementProviderFragment_Release(elfrag2);
4740 ok(!!elfrag2,
"elfrag2 == NULL\n");
4746 IRawElementProviderFragment_Release(elfrag2);
4760 ok(!!elfrag2,
"elfrag2 == NULL\n");
4774 ok(!!elfrag3,
"elfrag2 == NULL\n");
4780 IRawElementProviderFragment_Release(elfrag3);
4782 IRawElementProviderFragment_Release(elfrag2);
4795 ok(!!elfrag2,
"elfrag2 == NULL\n");
4801 IRawElementProviderFragment_Release(elfrag2);
4804 IRawElementProviderFragment_Release(elfrag);
4805 IRawElementProviderSimple_Release(elprov);
4819 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IRawElementProviderFragment, (
void **)&elfrag);
4821 ok(!!elfrag,
"elfrag == NULL\n");
4839 ok(!!elfrag2,
"elfrag2 == NULL\n");
4847 IRawElementProviderFragment_Release(elfrag2);
4856 ok(!!elfrag2,
"elfrag2 == NULL\n");
4859 IRawElementProviderFragment_Release(elfrag2);
4866 ok(!elfrag2,
"elfrag2 != NULL\n");
4872 ok(!elfrag2,
"elfrag2 != NULL\n");
4884 L"acc_child", 0, 0, 50, 50);
4886 L"acc_child", 0, 0, 50, 50);
4902 ok(!elfrag2,
"elfrag2 != NULL\n");
4919 L"acc_child", 0, 0, 50, 50);
4934 ok(!elfrag2,
"elfrag2 != NULL\n");
4949 ok(!!elfrag2,
"elfrag2 == NULL\n");
4956 IRawElementProviderFragment_Release(elfrag2);
4960 IRawElementProviderFragment_Release(elfrag);
4961 IRawElementProviderSimple_Release(elprov);
4972 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IRawElementProviderFragment, (
void **)&elfrag);
4974 ok(!!elfrag,
"elfrag == NULL\n");
4983 ok(!!elfrag2,
"elfrag2 == NULL\n");
4985 IRawElementProviderFragment_Release(elfrag2);
4995 ok(!elfrag2,
"elfrag2 != NULL\n");
5000 ok(!elfrag2,
"elfrag2 != NULL\n");
5015 ok(!!elfrag2,
"elfrag2 == NULL\n");
5023 IRawElementProviderFragment_Release(elfrag2);
5026 IRawElementProviderFragment_Release(elfrag);
5027 IRawElementProviderSimple_Release(elprov);
5038 IRawElementProviderSimple *elprov;
5049 ILegacyIAccessibleProvider *accprov;
5064 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_ControlTypePropertyId, &
v);
5075 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_ControlTypePropertyId, &
v);
5084 hr = IRawElementProviderSimple_GetPatternProvider(elprov, UIA_LegacyIAccessiblePatternId, &unk);
5086 ok(!!unk,
"unk == NULL\n");
5088 hr = IUnknown_QueryInterface(unk, &IID_ILegacyIAccessibleProvider, (
void **)&accprov);
5089 IUnknown_Release(unk);
5091 ok(!!accprov,
"accprov == NULL\n");
5094 hr = ILegacyIAccessibleProvider_get_Role(accprov, &role_val);
5099 ILegacyIAccessibleProvider_Release(accprov);
5100 IRawElementProviderSimple_Release(elprov);
5112 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_ControlTypePropertyId, &
v);
5121 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_ControlTypePropertyId, &
v);
5128 IRawElementProviderSimple_Release(elprov);
5140 for (
x = 0;
x < 2;
x++)
5144 hr = IRawElementProviderSimple_GetPropertyValue(elprov,
state->prop_id, &
v);
5153 hr = IRawElementProviderSimple_GetPropertyValue(elprov,
state->prop_id, &
v);
5167 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_IsOffscreenPropertyId, &
v);
5177 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_IsOffscreenPropertyId, &
v);
5193 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_IsOffscreenPropertyId, &
v);
5209 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_IsOffscreenPropertyId, &
v);
5221 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_IsOffscreenPropertyId, &
v);
5235 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_IsOffscreenPropertyId, &
v);
5242 IRawElementProviderSimple_Release(elprov);
5253 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_NamePropertyId, &
v);
5263 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_NamePropertyId, &
v);
5270 IRawElementProviderSimple_Release(elprov);
5276 ILegacyIAccessibleProvider *accprov;
5277 IRawElementProviderSimple *elprov, *elprov2;
5278 IRawElementProviderFragment *elfrag;
5319 ok(!!acc,
"acc == NULL\n");
5323 IAccessible_Release(acc);
5345 IRawElementProviderSimple_Release(elprov);
5350 if (called_winproc_GETOBJECT_CLIENT)
5352 win_skip(
"UiaProviderFromIAccessible behaves inconsistently on Win10 1507, skipping tests.\n");
5355 expect_winproc_GETOBJECT_CLIENT =
FALSE;
5367 IRawElementProviderSimple_Release(elprov);
5377 hr = IRawElementProviderSimple_get_ProviderOptions(elprov, &prov_opt);
5381 "Unexpected provider options %#x\n", prov_opt);
5385 hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_ProviderDescriptionPropertyId, &
v);
5390 hr = IRawElementProviderSimple_GetPatternProvider(elprov, UIA_LegacyIAccessiblePatternId, &unk);
5392 ok(!!unk,
"unk == NULL\n");
5395 hr = IUnknown_QueryInterface(unk, &IID_ILegacyIAccessibleProvider, (
void **)&accprov);
5397 ok(!!accprov,
"accprov == NULL\n");
5399 hr = ILegacyIAccessibleProvider_get_ChildId(accprov, &
cid);
5403 hr = ILegacyIAccessibleProvider_GetIAccessible(accprov, &acc);
5406 IAccessible_Release(acc);
5407 IUnknown_Release(unk);
5408 ILegacyIAccessibleProvider_Release(accprov);
5410 IRawElementProviderSimple_Release(elprov);
5425 elprov2 = (
void *)0xdeadbeef;
5426 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5428 ok(!elprov2,
"elprov != NULL\n");
5430 hr = IRawElementProviderSimple_GetPatternProvider(elprov, UIA_LegacyIAccessiblePatternId, &unk);
5432 ok(!!unk,
"unk == NULL\n");
5435 hr = IUnknown_QueryInterface(unk, &IID_ILegacyIAccessibleProvider, (
void **)&accprov);
5437 ok(!!accprov,
"accprov == NULL\n");
5439 hr = ILegacyIAccessibleProvider_get_ChildId(accprov, &
cid);
5441 ok(
cid == 1,
"cid != CHILDID_SELF\n");
5443 hr = ILegacyIAccessibleProvider_GetIAccessible(accprov, &acc);
5446 IAccessible_Release(acc);
5447 IUnknown_Release(unk);
5448 ILegacyIAccessibleProvider_Release(accprov);
5450 IRawElementProviderSimple_Release(elprov);
5469 elprov2 = (
void *)0xdeadbeef;
5470 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5472 ok(!elprov2,
"elprov != NULL\n");
5487 elprov2 = (
void *)0xdeadbeef;
5488 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5490 ok(!elprov2,
"elprov != NULL\n");
5492 IRawElementProviderSimple_Release(elprov);
5505 elprov2 = (
void *)0xdeadbeef;
5507 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5509 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
5510 IRawElementProviderSimple_Release(elprov2);
5514 elprov2 = (
void *)0xdeadbeef;
5516 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5518 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
5519 IRawElementProviderSimple_Release(elprov2);
5521 IRawElementProviderSimple_Release(elprov);
5533 L"acc_name", 0, 0, 50, 50);
5535 L"acc_name", 0, 0, 50, 50);
5557 elprov2 = (
void *)0xdeadbeef;
5558 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5560 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
5575 IRawElementProviderSimple_Release(elprov2);
5577 elprov2 = (
void *)0xdeadbeef;
5579 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5581 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
5582 IRawElementProviderSimple_Release(elprov2);
5584 IRawElementProviderSimple_Release(elprov);
5600 L"acc_name", 0, 0, 50, 50);
5610 elprov2 = (
void *)0xdeadbeef;
5611 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5613 ok(!elprov2,
"elprov != NULL, elprov %p\n", elprov2);
5623 elprov2 = (
void *)0xdeadbeef;
5624 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5626 ok(!elprov2,
"elprov != NULL, elprov %p\n", elprov2);
5628 IRawElementProviderSimple_Release(elprov);
5649 elprov2 = (
void *)0xdeadbeef;
5650 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5652 ok(!elprov2,
"elprov != NULL, elprov %p\n", elprov2);
5659 elprov2 = (
void *)0xdeadbeef;
5661 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5663 ok(!elprov2,
"elprov != NULL, elprov %p\n", elprov2);
5665 IRawElementProviderSimple_Release(elprov);
5689 elprov2 = (
void *)0xdeadbeef;
5690 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5692 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
5706 IRawElementProviderSimple_Release(elprov2);
5708 elprov2 = (
void *)0xdeadbeef;
5710 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5712 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
5713 IRawElementProviderSimple_Release(elprov2);
5715 IRawElementProviderSimple_Release(elprov);
5738 elprov2 = (
void *)0xdeadbeef;
5739 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5741 ok(!elprov2,
"elprov != NULL, elprov %p\n", elprov2);
5754 elprov2 = (
void *)0xdeadbeef;
5756 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5758 ok(!elprov2,
"elprov != NULL, elprov %p\n", elprov2);
5760 IRawElementProviderSimple_Release(elprov);
5782 elprov2 = (
void *)0xdeadbeef;
5783 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5785 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
5797 IRawElementProviderSimple_Release(elprov2);
5799 elprov2 = (
void *)0xdeadbeef;
5801 hr = IRawElementProviderSimple_get_HostRawElementProvider(elprov, &elprov2);
5803 ok(!!elprov2,
"elprov == NULL, elprov %p\n", elprov2);
5804 IRawElementProviderSimple_Release(elprov2);
5806 IRawElementProviderSimple_Release(elprov);
5819 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IRawElementProviderFragment, (
void **)&elfrag);
5821 ok(!!elfrag,
"elfrag == NULL\n");
5827 hr = IRawElementProviderFragment_get_BoundingRectangle(elfrag, &
rect);
5841 hr = IRawElementProviderFragment_get_BoundingRectangle(elfrag, &
rect);
5845 ok(
rect.width == 0.0,
"Unexpected width value %f\n",
rect.width);
5846 ok(
rect.height == 0.0,
"Unexpected height value %f\n",
rect.height);
5849 IRawElementProviderFragment_Release(elfrag);
5850 IRawElementProviderSimple_Release(elprov);
5860 hr = IRawElementProviderSimple_QueryInterface(elprov, &IID_IRawElementProviderFragment, (
void **)&elfrag);
5862 ok(!!elfrag,
"elfrag == NULL\n");
5865 hr = IRawElementProviderFragment_get_BoundingRectangle(elfrag, &
rect);
5869 ok(
rect.width == 0.0,
"Unexpected width value %f\n",
rect.width);
5870 ok(
rect.height == 0.0,
"Unexpected height value %f\n",
rect.height);
5874 hr = IRawElementProviderFragment_get_BoundingRectangle(elfrag, &
rect);
5878 ok(
rect.width == 0.0,
"Unexpected width value %f\n",
rect.width);
5879 ok(
rect.height == 0.0,
"Unexpected height value %f\n",
rect.height);
5881 IRawElementProviderFragment_Release(elfrag);
5882 IRawElementProviderSimple_Release(elprov);
5905 { &RuntimeId_Property_GUID, UIA_RuntimeIdPropertyId },
5906 { &BoundingRectangle_Property_GUID, UIA_BoundingRectanglePropertyId },
5907 { &ProcessId_Property_GUID, UIA_ProcessIdPropertyId },
5908 { &ControlType_Property_GUID, UIA_ControlTypePropertyId },
5909 { &LocalizedControlType_Property_GUID, UIA_LocalizedControlTypePropertyId },
5910 { &Name_Property_GUID, UIA_NamePropertyId },
5911 { &AcceleratorKey_Property_GUID, UIA_AcceleratorKeyPropertyId },
5912 { &AccessKey_Property_GUID, UIA_AccessKeyPropertyId },
5913 { &HasKeyboardFocus_Property_GUID, UIA_HasKeyboardFocusPropertyId },
5914 { &IsKeyboardFocusable_Property_GUID, UIA_IsKeyboardFocusablePropertyId },
5915 { &IsEnabled_Property_GUID, UIA_IsEnabledPropertyId },
5916 { &AutomationId_Property_GUID, UIA_AutomationIdPropertyId },
5917 { &ClassName_Property_GUID, UIA_ClassNamePropertyId },
5918 { &HelpText_Property_GUID, UIA_HelpTextPropertyId },
5919 { &ClickablePoint_Property_GUID, UIA_ClickablePointPropertyId },
5920 { &Culture_Property_GUID, UIA_CulturePropertyId },
5921 { &IsControlElement_Property_GUID, UIA_IsControlElementPropertyId },
5922 { &IsContentElement_Property_GUID, UIA_IsContentElementPropertyId },
5923 { &LabeledBy_Property_GUID, UIA_LabeledByPropertyId },
5924 { &IsPassword_Property_GUID, UIA_IsPasswordPropertyId },
5925 { &NewNativeWindowHandle_Property_GUID, UIA_NativeWindowHandlePropertyId },
5926 { &ItemType_Property_GUID, UIA_ItemTypePropertyId },
5927 { &IsOffscreen_Property_GUID, UIA_IsOffscreenPropertyId },
5928 { &Orientation_Property_GUID, UIA_OrientationPropertyId },
5929 { &FrameworkId_Property_GUID, UIA_FrameworkIdPropertyId },
5930 { &IsRequiredForForm_Property_GUID, UIA_IsRequiredForFormPropertyId },
5931 { &ItemStatus_Property_GUID, UIA_ItemStatusPropertyId },
5932 { &IsDockPatternAvailable_Property_GUID, UIA_IsDockPatternAvailablePropertyId },
5933 { &IsExpandCollapsePatternAvailable_Property_GUID, UIA_IsExpandCollapsePatternAvailablePropertyId },
5934 { &IsGridItemPatternAvailable_Property_GUID, UIA_IsGridItemPatternAvailablePropertyId },
5935 { &IsGridPatternAvailable_Property_GUID, UIA_IsGridPatternAvailablePropertyId },
5936 { &IsInvokePatternAvailable_Property_GUID, UIA_IsInvokePatternAvailablePropertyId },
5937 { &IsMultipleViewPatternAvailable_Property_GUID, UIA_IsMultipleViewPatternAvailablePropertyId },
5938 { &IsRangeValuePatternAvailable_Property_GUID, UIA_IsRangeValuePatternAvailablePropertyId },
5939 { &IsScrollPatternAvailable_Property_GUID, UIA_IsScrollPatternAvailablePropertyId },
5940 { &IsScrollItemPatternAvailable_Property_GUID, UIA_IsScrollItemPatternAvailablePropertyId },
5941 { &IsSelectionItemPatternAvailable_Property_GUID, UIA_IsSelectionItemPatternAvailablePropertyId },
5942 { &IsSelectionPatternAvailable_Property_GUID, UIA_IsSelectionPatternAvailablePropertyId },
5943 { &IsTablePatternAvailable_Property_GUID, UIA_IsTablePatternAvailablePropertyId },
5944 { &IsTableItemPatternAvailable_Property_GUID, UIA_IsTableItemPatternAvailablePropertyId },
5945 { &IsTextPatternAvailable_Property_GUID, UIA_IsTextPatternAvailablePropertyId },
5946 { &IsTogglePatternAvailable_Property_GUID, UIA_IsTogglePatternAvailablePropertyId },
5947 { &IsTransformPatternAvailable_Property_GUID, UIA_IsTransformPatternAvailablePropertyId },
5948 { &IsValuePatternAvailable_Property_GUID, UIA_IsValuePatternAvailablePropertyId },
5949 { &IsWindowPatternAvailable_Property_GUID, UIA_IsWindowPatternAvailablePropertyId },
5950 { &Value_Value_Property_GUID, UIA_ValueValuePropertyId },
5951 { &Value_IsReadOnly_Property_GUID, UIA_ValueIsReadOnlyPropertyId },
5952 { &RangeValue_Value_Property_GUID, UIA_RangeValueValuePropertyId },
5953 { &RangeValue_IsReadOnly_Property_GUID, UIA_RangeValueIsReadOnlyPropertyId },
5954 { &RangeValue_Minimum_Property_GUID, UIA_RangeValueMinimumPropertyId },
5955 { &RangeValue_Maximum_Property_GUID, UIA_RangeValueMaximumPropertyId },
5956 { &RangeValue_LargeChange_Property_GUID, UIA_RangeValueLargeChangePropertyId },
5957 { &RangeValue_SmallChange_Property_GUID, UIA_RangeValueSmallChangePropertyId },
5958 { &Scroll_HorizontalScrollPercent_Property_GUID, UIA_ScrollHorizontalScrollPercentPropertyId },
5959 { &Scroll_HorizontalViewSize_Property_GUID, UIA_ScrollHorizontalViewSizePropertyId },
5960 { &Scroll_VerticalScrollPercent_Property_GUID, UIA_ScrollVerticalScrollPercentPropertyId },
5961 { &Scroll_VerticalViewSize_Property_GUID, UIA_ScrollVerticalViewSizePropertyId },
5962 { &Scroll_HorizontallyScrollable_Property_GUID, UIA_ScrollHorizontallyScrollablePropertyId },
5963 { &Scroll_VerticallyScrollable_Property_GUID, UIA_ScrollVerticallyScrollablePropertyId },
5964 { &Selection_Selection_Property_GUID, UIA_SelectionSelectionPropertyId },
5965 { &Selection_CanSelectMultiple_Property_GUID, UIA_SelectionCanSelectMultiplePropertyId },
5966 { &Selection_IsSelectionRequired_Property_GUID, UIA_SelectionIsSelectionRequiredPropertyId },
5967 { &Grid_RowCount_Property_GUID, UIA_GridRowCountPropertyId },
5968 { &Grid_ColumnCount_Property_GUID, UIA_GridColumnCountPropertyId },
5969 { &GridItem_Row_Property_GUID, UIA_GridItemRowPropertyId },
5970 { &GridItem_Column_Property_GUID, UIA_GridItemColumnPropertyId },
5971 { &GridItem_RowSpan_Property_GUID, UIA_GridItemRowSpanPropertyId },
5972 { &GridItem_ColumnSpan_Property_GUID, UIA_GridItemColumnSpanPropertyId },
5973 { &GridItem_Parent_Property_GUID, UIA_GridItemContainingGridPropertyId },
5974 { &Dock_DockPosition_Property_GUID, UIA_DockDockPositionPropertyId },
5975 { &ExpandCollapse_ExpandCollapseState_Property_GUID, UIA_ExpandCollapseExpandCollapseStatePropertyId },
5976 { &MultipleView_CurrentView_Property_GUID, UIA_MultipleViewCurrentViewPropertyId },
5977 { &MultipleView_SupportedViews_Property_GUID, UIA_MultipleViewSupportedViewsPropertyId },
5978 { &Window_CanMaximize_Property_GUID, UIA_WindowCanMaximizePropertyId },
5979 { &Window_CanMinimize_Property_GUID, UIA_WindowCanMinimizePropertyId },
5980 { &Window_WindowVisualState_Property_GUID, UIA_WindowWindowVisualStatePropertyId },
5981 { &Window_WindowInteractionState_Property_GUID, UIA_WindowWindowInteractionStatePropertyId },
5982 { &Window_IsModal_Property_GUID, UIA_WindowIsModalPropertyId },
5983 { &Window_IsTopmost_Property_GUID, UIA_WindowIsTopmostPropertyId },
5984 { &SelectionItem_IsSelected_Property_GUID, UIA_SelectionItemIsSelectedPropertyId },
5985 { &SelectionItem_SelectionContainer_Property_GUID, UIA_SelectionItemSelectionContainerPropertyId },
5986 { &Table_RowHeaders_Property_GUID, UIA_TableRowHeadersPropertyId },
5987 { &Table_ColumnHeaders_Property_GUID, UIA_TableColumnHeadersPropertyId },
5988 { &Table_RowOrColumnMajor_Property_GUID, UIA_TableRowOrColumnMajorPropertyId },
5989 { &TableItem_RowHeaderItems_Property_GUID, UIA_TableItemRowHeaderItemsPropertyId },
5990 { &TableItem_ColumnHeaderItems_Property_GUID, UIA_TableItemColumnHeaderItemsPropertyId },
5991 { &Toggle_ToggleState_Property_GUID, UIA_ToggleToggleStatePropertyId },
5992 { &Transform_CanMove_Property_GUID, UIA_TransformCanMovePropertyId },
5993 { &Transform_CanResize_Property_GUID, UIA_TransformCanResizePropertyId },
5994 { &Transform_CanRotate_Property_GUID, UIA_TransformCanRotatePropertyId },
5995 { &IsLegacyIAccessiblePatternAvailable_Property_GUID, UIA_IsLegacyIAccessiblePatternAvailablePropertyId },
5996 { &LegacyIAccessible_ChildId_Property_GUID, UIA_LegacyIAccessibleChildIdPropertyId },
5997 { &LegacyIAccessible_Name_Property_GUID, UIA_LegacyIAccessibleNamePropertyId },
5998 { &LegacyIAccessible_Value_Property_GUID, UIA_LegacyIAccessibleValuePropertyId },
5999 { &LegacyIAccessible_Description_Property_GUID, UIA_LegacyIAccessibleDescriptionPropertyId },
6000 { &LegacyIAccessible_Role_Property_GUID, UIA_LegacyIAccessibleRolePropertyId },
6001 { &LegacyIAccessible_State_Property_GUID, UIA_LegacyIAccessibleStatePropertyId },
6002 { &LegacyIAccessible_Help_Property_GUID, UIA_LegacyIAccessibleHelpPropertyId },
6003 { &LegacyIAccessible_KeyboardShortcut_Property_GUID, UIA_LegacyIAccessibleKeyboardShortcutPropertyId },
6004 { &LegacyIAccessible_Selection_Property_GUID, UIA_LegacyIAccessibleSelectionPropertyId },
6005 { &LegacyIAccessible_DefaultAction_Property_GUID, UIA_LegacyIAccessibleDefaultActionPropertyId },
6006 { &AriaRole_Property_GUID, UIA_AriaRolePropertyId },
6007 { &AriaProperties_Property_GUID, UIA_AriaPropertiesPropertyId },
6008 { &IsDataValidForForm_Property_GUID, UIA_IsDataValidForFormPropertyId },
6009 { &ControllerFor_Property_GUID, UIA_ControllerForPropertyId },
6010 { &DescribedBy_Property_GUID, UIA_DescribedByPropertyId },
6011 { &FlowsTo_Property_GUID, UIA_FlowsToPropertyId },
6012 { &ProviderDescription_Property_GUID, UIA_ProviderDescriptionPropertyId },
6013 { &IsItemContainerPatternAvailable_Property_GUID, UIA_IsItemContainerPatternAvailablePropertyId },
6014 { &IsVirtualizedItemPatternAvailable_Property_GUID, UIA_IsVirtualizedItemPatternAvailablePropertyId },
6015 { &IsSynchronizedInputPatternAvailable_Property_GUID, UIA_IsSynchronizedInputPatternAvailablePropertyId },
6017 { &OptimizeForVisualContent_Property_GUID, UIA_OptimizeForVisualContentPropertyId },
6018 { &IsObjectModelPatternAvailable_Property_GUID, UIA_IsObjectModelPatternAvailablePropertyId },
6019 { &Annotation_AnnotationTypeId_Property_GUID, UIA_AnnotationAnnotationTypeIdPropertyId },
6020 { &Annotation_AnnotationTypeName_Property_GUID, UIA_AnnotationAnnotationTypeNamePropertyId },
6021 { &Annotation_Author_Property_GUID, UIA_AnnotationAuthorPropertyId },
6022 { &Annotation_DateTime_Property_GUID, UIA_AnnotationDateTimePropertyId },
6023 { &Annotation_Target_Property_GUID, UIA_AnnotationTargetPropertyId },
6024 { &IsAnnotationPatternAvailable_Property_GUID, UIA_IsAnnotationPatternAvailablePropertyId },
6025 { &IsTextPattern2Available_Property_GUID, UIA_IsTextPattern2AvailablePropertyId },
6026 { &Styles_StyleId_Property_GUID, UIA_StylesStyleIdPropertyId },
6027 { &Styles_StyleName_Property_GUID, UIA_StylesStyleNamePropertyId },
6028 { &Styles_FillColor_Property_GUID, UIA_StylesFillColorPropertyId },
6029 { &Styles_FillPatternStyle_Property_GUID, UIA_StylesFillPatternStylePropertyId },
6030 { &Styles_Shape_Property_GUID, UIA_StylesShapePropertyId },
6031 { &Styles_FillPatternColor_Property_GUID, UIA_StylesFillPatternColorPropertyId },
6032 { &Styles_ExtendedProperties_Property_GUID, UIA_StylesExtendedPropertiesPropertyId },
6033 { &IsStylesPatternAvailable_Property_GUID, UIA_IsStylesPatternAvailablePropertyId },
6034 { &IsSpreadsheetPatternAvailable_Property_GUID, UIA_IsSpreadsheetPatternAvailablePropertyId },
6035 { &SpreadsheetItem_Formula_Property_GUID, UIA_SpreadsheetItemFormulaPropertyId },
6036 { &SpreadsheetItem_AnnotationObjects_Property_GUID, UIA_SpreadsheetItemAnnotationObjectsPropertyId },
6037 { &SpreadsheetItem_AnnotationTypes_Property_GUID, UIA_SpreadsheetItemAnnotationTypesPropertyId },
6038 { &IsSpreadsheetItemPatternAvailable_Property_GUID, UIA_IsSpreadsheetItemPatternAvailablePropertyId },
6039 { &Transform2_CanZoom_Property_GUID, UIA_Transform2CanZoomPropertyId },
6040 { &IsTransformPattern2Available_Property_GUID, UIA_IsTransformPattern2AvailablePropertyId },
6041 { &LiveSetting_Property_GUID, UIA_LiveSettingPropertyId },
6042 { &IsTextChildPatternAvailable_Property_GUID, UIA_IsTextChildPatternAvailablePropertyId },
6043 { &IsDragPatternAvailable_Property_GUID, UIA_IsDragPatternAvailablePropertyId },
6044 { &Drag_IsGrabbed_Property_GUID, UIA_DragIsGrabbedPropertyId },
6045 { &Drag_DropEffect_Property_GUID, UIA_DragDropEffectPropertyId },
6046 { &Drag_DropEffects_Property_GUID, UIA_DragDropEffectsPropertyId },
6047 { &IsDropTargetPatternAvailable_Property_GUID, UIA_IsDropTargetPatternAvailablePropertyId },
6048 { &DropTarget_DropTargetEffect_Property_GUID, UIA_DropTargetDropTargetEffectPropertyId },
6049 { &DropTarget_DropTargetEffects_Property_GUID, UIA_DropTargetDropTargetEffectsPropertyId },
6050 { &Drag_GrabbedItems_Property_GUID, UIA_DragGrabbedItemsPropertyId },
6051 { &Transform2_ZoomLevel_Property_GUID, UIA_Transform2ZoomLevelPropertyId },
6052 { &Transform2_ZoomMinimum_Property_GUID, UIA_Transform2ZoomMinimumPropertyId },
6053 { &Transform2_ZoomMaximum_Property_GUID, UIA_Transform2ZoomMaximumPropertyId },
6054 { &FlowsFrom_Property_GUID, UIA_FlowsFromPropertyId },
6055 { &IsTextEditPatternAvailable_Property_GUID, UIA_IsTextEditPatternAvailablePropertyId },
6056 { &IsPeripheral_Property_GUID, UIA_IsPeripheralPropertyId },
6058 { &IsCustomNavigationPatternAvailable_Property_GUID, UIA_IsCustomNavigationPatternAvailablePropertyId },
6059 { &PositionInSet_Property_GUID, UIA_PositionInSetPropertyId },
6060 { &SizeOfSet_Property_GUID, UIA_SizeOfSetPropertyId },
6061 { &Level_Property_GUID, UIA_LevelPropertyId },
6062 { &AnnotationTypes_Property_GUID, UIA_AnnotationTypesPropertyId },
6063 { &AnnotationObjects_Property_GUID, UIA_AnnotationObjectsPropertyId },
6065 { &LandmarkType_Property_GUID, UIA_LandmarkTypePropertyId },
6066 { &LocalizedLandmarkType_Property_GUID, UIA_LocalizedLandmarkTypePropertyId },
6067 { &FullDescription_Property_GUID, UIA_FullDescriptionPropertyId },
6068 { &FillColor_Property_GUID, UIA_FillColorPropertyId },
6069 { &OutlineColor_Property_GUID, UIA_OutlineColorPropertyId },
6070 { &FillType_Property_GUID, UIA_FillTypePropertyId },
6071 { &VisualEffects_Property_GUID, UIA_VisualEffectsPropertyId },
6072 { &OutlineThickness_Property_GUID, UIA_OutlineThicknessPropertyId },
6073 { &CenterPoint_Property_GUID, UIA_CenterPointPropertyId },
6074 { &Rotation_Property_GUID, UIA_RotationPropertyId },
6075 { &Size_Property_GUID, UIA_SizePropertyId },
6076 { &IsSelectionPattern2Available_Property_GUID, UIA_IsSelectionPattern2AvailablePropertyId },
6077 { &Selection2_FirstSelectedItem_Property_GUID, UIA_Selection2FirstSelectedItemPropertyId },
6078 { &Selection2_LastSelectedItem_Property_GUID, UIA_Selection2LastSelectedItemPropertyId },
6079 { &Selection2_CurrentSelectedItem_Property_GUID, UIA_Selection2CurrentSelectedItemPropertyId },
6080 { &Selection2_ItemCount_Property_GUID, UIA_Selection2ItemCountPropertyId },
6081 { &HeadingLevel_Property_GUID, UIA_HeadingLevelPropertyId },
6082 { &IsDialog_Property_GUID, UIA_IsDialogPropertyId },
6086 { &ToolTipOpened_Event_GUID, UIA_ToolTipOpenedEventId },
6087 { &ToolTipClosed_Event_GUID, UIA_ToolTipClosedEventId },
6088 { &StructureChanged_Event_GUID, UIA_StructureChangedEventId },
6089 { &MenuOpened_Event_GUID, UIA_MenuOpenedEventId },
6090 { &AutomationPropertyChanged_Event_GUID, UIA_AutomationPropertyChangedEventId },
6091 { &AutomationFocusChanged_Event_GUID, UIA_AutomationFocusChangedEventId },
6092 { &AsyncContentLoaded_Event_GUID, UIA_AsyncContentLoadedEventId },
6093 { &MenuClosed_Event_GUID, UIA_MenuClosedEventId },
6094 { &LayoutInvalidated_Event_GUID, UIA_LayoutInvalidatedEventId },
6095 { &Invoke_Invoked_Event_GUID, UIA_Invoke_InvokedEventId },
6096 { &SelectionItem_ElementAddedToSelectionEvent_Event_GUID, UIA_SelectionItem_ElementAddedToSelectionEventId },
6097 { &SelectionItem_ElementRemovedFromSelectionEvent_Event_GUID, UIA_SelectionItem_ElementRemovedFromSelectionEventId },
6098 { &SelectionItem_ElementSelectedEvent_Event_GUID, UIA_SelectionItem_ElementSelectedEventId },
6099 { &Selection_InvalidatedEvent_Event_GUID, UIA_Selection_InvalidatedEventId },
6100 { &Text_TextSelectionChangedEvent_Event_GUID, UIA_Text_TextSelectionChangedEventId },
6101 { &Text_TextChangedEvent_Event_GUID, UIA_Text_TextChangedEventId },
6102 { &Window_WindowOpened_Event_GUID, UIA_Window_WindowOpenedEventId },
6103 { &Window_WindowClosed_Event_GUID, UIA_Window_WindowClosedEventId },
6104 { &MenuModeStart_Event_GUID, UIA_MenuModeStartEventId },
6105 { &MenuModeEnd_Event_GUID, UIA_MenuModeEndEventId },
6106 { &InputReachedTarget_Event_GUID, UIA_InputReachedTargetEventId },
6107 { &InputReachedOtherElement_Event_GUID, UIA_InputReachedOtherElementEventId },
6108 { &InputDiscarded_Event_GUID, UIA_InputDiscardedEventId },
6110 { &SystemAlert_Event_GUID, UIA_SystemAlertEventId },
6111 { &LiveRegionChanged_Event_GUID, UIA_LiveRegionChangedEventId },
6112 { &HostedFragmentRootsInvalidated_Event_GUID, UIA_HostedFragmentRootsInvalidatedEventId },
6113 { &Drag_DragStart_Event_GUID, UIA_Drag_DragStartEventId },
6114 { &Drag_DragCancel_Event_GUID, UIA_Drag_DragCancelEventId },
6115 { &Drag_DragComplete_Event_GUID, UIA_Drag_DragCompleteEventId },
6116 { &DropTarget_DragEnter_Event_GUID, UIA_DropTarget_DragEnterEventId },
6117 { &DropTarget_DragLeave_Event_GUID, UIA_DropTarget_DragLeaveEventId },
6118 { &DropTarget_Dropped_Event_GUID, UIA_DropTarget_DroppedEventId },
6119 { &TextEdit_TextChanged_Event_GUID, UIA_TextEdit_TextChangedEventId },
6120 { &TextEdit_ConversionTargetChanged_Event_GUID, UIA_TextEdit_ConversionTargetChangedEventId },
6122 { &Changes_Event_GUID, UIA_ChangesEventId },
6123 { &Notification_Event_GUID, UIA_NotificationEventId },
6127 { &Invoke_Pattern_GUID, UIA_InvokePatternId },
6128 { &Selection_Pattern_GUID, UIA_SelectionPatternId },
6129 { &Value_Pattern_GUID, UIA_ValuePatternId },
6130 { &RangeValue_Pattern_GUID, UIA_RangeValuePatternId },
6131 { &Scroll_Pattern_GUID, UIA_ScrollPatternId },
6132 { &ExpandCollapse_Pattern_GUID, UIA_ExpandCollapsePatternId },
6133 { &Grid_Pattern_GUID, UIA_GridPatternId },
6134 { &GridItem_Pattern_GUID, UIA_GridItemPatternId },
6135 { &MultipleView_Pattern_GUID, UIA_MultipleViewPatternId },
6136 { &Window_Pattern_GUID, UIA_WindowPatternId },
6137 { &SelectionItem_Pattern_GUID, UIA_SelectionItemPatternId },
6138 { &Dock_Pattern_GUID, UIA_DockPatternId },
6139 { &Table_Pattern_GUID, UIA_TablePatternId },
6140 { &TableItem_Pattern_GUID, UIA_TableItemPatternId },
6141 { &Text_Pattern_GUID, UIA_TextPatternId },
6142 { &Toggle_Pattern_GUID, UIA_TogglePatternId },
6143 { &Transform_Pattern_GUID, UIA_TransformPatternId },
6144 { &ScrollItem_Pattern_GUID, UIA_ScrollItemPatternId },
6145 { &LegacyIAccessible_Pattern_GUID, UIA_LegacyIAccessiblePatternId },
6146 { &ItemContainer_Pattern_GUID, UIA_ItemContainerPatternId },
6147 { &VirtualizedItem_Pattern_GUID, UIA_VirtualizedItemPatternId },
6148 { &SynchronizedInput_Pattern_GUID, UIA_SynchronizedInputPatternId },
6150 { &ObjectModel_Pattern_GUID, UIA_ObjectModelPatternId },
6151 { &Annotation_Pattern_GUID, UIA_AnnotationPatternId },
6152 { &Text_Pattern2_GUID, UIA_TextPattern2Id },
6153 { &Styles_Pattern_GUID, UIA_StylesPatternId },
6154 { &Spreadsheet_Pattern_GUID, UIA_SpreadsheetPatternId },
6155 { &SpreadsheetItem_Pattern_GUID, UIA_SpreadsheetItemPatternId },
6156 { &Tranform_Pattern2_GUID, UIA_TransformPattern2Id },
6157 { &TextChild_Pattern_GUID, UIA_TextChildPatternId },
6158 { &Drag_Pattern_GUID, UIA_DragPatternId },
6159 { &DropTarget_Pattern_GUID, UIA_DropTargetPatternId },
6160 { &TextEdit_Pattern_GUID, UIA_TextEditPatternId },
6162 { &CustomNavigation_Pattern_GUID, UIA_CustomNavigationPatternId },
6166 { &Button_Control_GUID, UIA_ButtonControlTypeId },
6167 { &Calendar_Control_GUID, UIA_CalendarControlTypeId },
6168 { &CheckBox_Control_GUID, UIA_CheckBoxControlTypeId },
6169 { &ComboBox_Control_GUID, UIA_ComboBoxControlTypeId },
6170 { &Edit_Control_GUID, UIA_EditControlTypeId },
6171 { &Hyperlink_Control_GUID, UIA_HyperlinkControlTypeId },
6172 { &Image_Control_GUID, UIA_ImageControlTypeId },
6173 { &ListItem_Control_GUID, UIA_ListItemControlTypeId },
6174 { &List_Control_GUID, UIA_ListControlTypeId },
6175 { &Menu_Control_GUID, UIA_MenuControlTypeId },
6176 { &MenuBar_Control_GUID, UIA_MenuBarControlTypeId },
6177 { &MenuItem_Control_GUID, UIA_MenuItemControlTypeId },
6178 { &ProgressBar_Control_GUID, UIA_ProgressBarControlTypeId },
6179 { &RadioButton_Control_GUID, UIA_RadioButtonControlTypeId },
6180 { &ScrollBar_Control_GUID, UIA_ScrollBarControlTypeId },
6181 { &Slider_Control_GUID, UIA_SliderControlTypeId },
6182 { &Spinner_Control_GUID, UIA_SpinnerControlTypeId },
6183 { &StatusBar_Control_GUID, UIA_StatusBarControlTypeId },
6184 { &Tab_Control_GUID, UIA_TabControlTypeId },
6185 { &TabItem_Control_GUID, UIA_TabItemControlTypeId },
6186 { &Text_Control_GUID, UIA_TextControlTypeId },
6187 { &ToolBar_Control_GUID, UIA_ToolBarControlTypeId },
6188 { &ToolTip_Control_GUID, UIA_ToolTipControlTypeId },
6189 { &Tree_Control_GUID, UIA_TreeControlTypeId },
6190 { &TreeItem_Control_GUID, UIA_TreeItemControlTypeId },
6191 { &Custom_Control_GUID, UIA_CustomControlTypeId },
6192 { &Group_Control_GUID, UIA_GroupControlTypeId },
6193 { &Thumb_Control_GUID, UIA_ThumbControlTypeId },
6194 { &DataGrid_Control_GUID, UIA_DataGridControlTypeId },
6195 { &DataItem_Control_GUID, UIA_DataItemControlTypeId },
6196 { &Document_Control_GUID, UIA_DocumentControlTypeId },
6197 { &SplitButton_Control_GUID, UIA_SplitButtonControlTypeId },
6198 { &Window_Control_GUID, UIA_WindowControlTypeId },
6199 { &Pane_Control_GUID, UIA_PaneControlTypeId },
6200 { &Header_Control_GUID, UIA_HeaderControlTypeId },
6201 { &HeaderItem_Control_GUID, UIA_HeaderItemControlTypeId },
6202 { &Table_Control_GUID, UIA_TableControlTypeId },
6203 { &TitleBar_Control_GUID, UIA_TitleBarControlTypeId },
6204 { &Separator_Control_GUID, UIA_SeparatorControlTypeId },
6206 { &SemanticZoom_Control_GUID, UIA_SemanticZoomControlTypeId },
6207 { &AppBar_Control_GUID, UIA_AppBarControlTypeId },
6212 static const struct {
6213 const char *id_type_name;
6228 for (
y = 0;
y <
tests[
i].ids_count;
y++)
6444 win_skip(
"Skipping ProviderOptions_UseComThreading tests for UiaNodeFromProvider.\n");
6513 node = (
void *)0xdeadbeef;
6516 ok(!
node,
"node != NULL\n");
6521 node = (
void *)0xdeadbeef;
6535 ok(
ref == 2,
"Unexpected refcnt %ld\n",
ref);
6538 ok(
ref == 3,
"Unexpected refcnt %ld\n",
ref);
6543 ok(
ref == 1,
"Unexpected refcnt %ld\n",
ref);
6546 ok(
ref == 0,
"Unexpected refcnt %ld\n",
ref);
6554 node = (
void *)0xdeadbeef;
6571 node = (
void *)0xdeadbeef;
6580 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
6593 ok(!!
node,
"node == NULL\n");
6605 node = (
void *)0xdeadbeef;
6612 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
6616 ok(!!
node,
"node == NULL\n");
6640 node = (
void *)0xdeadbeef;
6647 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
6662 ok(!!
node,
"node == NULL\n");
6672 node = (
void *)0xdeadbeef;
6679 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
6694 ok(!!
node,
"node == NULL\n");
6822#define check_uia_rect_val( v, rect ) \
6823 check_uia_rect_val_( (v), (rect), __FILE__, __LINE__)
6826 LONG lbound, ubound, elems,
idx;
6843 ok_(
file,
line)(dims == 1,
"Unexpected dims %d\n", dims);
6845 lbound = ubound = elems = 0;
6848 ok_(
file,
line)(lbound == 0,
"Unexpected lbound %ld\n", lbound);
6852 ok_(
file,
line)(ubound == 3,
"Unexpected ubound %ld\n", ubound);
6854 elems = (ubound - lbound) + 1;
6855 ok_(
file,
line)(elems == 4,
"Unexpected rect elems %ld\n", elems);
6865 ok_(
file,
line)(tmp[2] ==
rect->width,
"Unexpected width value %f, expected %f\n", tmp[2],
rect->width);
6866 ok_(
file,
line)(tmp[3] ==
rect->height,
"Unexpected height value %f, expected %f\n", tmp[3],
rect->height);
6869#define check_uia_rect_rect_val( rect, uia_rect ) \
6870 check_uia_rect_rect_val_( (rect), (uia_rect), __FILE__, __LINE__)
6887 case UIAutomationType_String:
6893 case UIAutomationType_Bool:
6897 if (prop_id == UIA_IsKeyboardFocusablePropertyId)
6899 "Unexpected BOOL %#x\n",
V_BOOL(
v));
6905 case UIAutomationType_Int:
6908 if (prop_id == UIA_NativeWindowHandlePropertyId)
6915 case UIAutomationType_IntArray:
6928 case UIAutomationType_Double:
6934 case UIAutomationType_DoubleArray:
6946 case UIAutomationType_Element:
6954 IUIAutomationElement *
elem;
6957 hr = IUnknown_QueryInterface(
V_UNKNOWN(
v), &IID_IUIAutomationElement, (
void **)&
elem);
6962 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
elem, UIA_ControlTypePropertyId,
TRUE, &
v1);
6964 IUIAutomationElement_Release(
elem);
6970 tmp_node = (HUIANODE)
V_I8(
v);
6973 tmp_node = (HUIANODE)
V_I4(
v);
6990 case UIAutomationType_ElementArray:
6995 IUIAutomationElementArray *elem_arr =
NULL;
7000 hr = IUnknown_QueryInterface(
V_UNKNOWN(
v), &IID_IUIAutomationElementArray, (
void **)&elem_arr);
7002 ok(!!elem_arr,
"elem_arr == NULL\n");
7009 hr = IUIAutomationElementArray_get_Length(elem_arr, &
len);
7015 IUIAutomationElement *tmp_elem =
NULL;
7018 hr = IUIAutomationElementArray_GetElement(elem_arr,
idx, &tmp_elem);
7020 ok(!!tmp_elem,
"tmp_elem == NULL\n");
7022 hr = IUIAutomationElement_GetCurrentPropertyValueEx(tmp_elem, UIA_ControlTypePropertyId,
TRUE, &
v1);
7027 IUIAutomationElement_Release(tmp_elem);
7031 IUIAutomationElementArray_Release(elem_arr);
7078 { &ProcessId_Property_GUID, UIAutomationType_Int,
TRUE },
7079 { &ControlType_Property_GUID, UIAutomationType_Int },
7080 { &LocalizedControlType_Property_GUID, UIAutomationType_String,
TRUE },
7081 { &Name_Property_GUID, UIAutomationType_String },
7082 { &AcceleratorKey_Property_GUID, UIAutomationType_String },
7083 { &AccessKey_Property_GUID, UIAutomationType_String },
7084 { &HasKeyboardFocus_Property_GUID, UIAutomationType_Bool },
7085 { &IsKeyboardFocusable_Property_GUID, UIAutomationType_Bool },
7086 { &IsEnabled_Property_GUID, UIAutomationType_Bool },
7087 { &AutomationId_Property_GUID, UIAutomationType_String },
7088 { &ClassName_Property_GUID, UIAutomationType_String },
7089 { &HelpText_Property_GUID, UIAutomationType_String },
7090 { &Culture_Property_GUID, UIAutomationType_Int },
7091 { &IsControlElement_Property_GUID, UIAutomationType_Bool },
7092 { &IsContentElement_Property_GUID, UIAutomationType_Bool },
7093 { &LabeledBy_Property_GUID, UIAutomationType_Element },
7094 { &IsPassword_Property_GUID, UIAutomationType_Bool },
7095 { &NewNativeWindowHandle_Property_GUID, UIAutomationType_Int },
7096 { &ItemType_Property_GUID, UIAutomationType_String },
7097 { &IsOffscreen_Property_GUID, UIAutomationType_Bool },
7098 { &Orientation_Property_GUID, UIAutomationType_Int },
7099 { &FrameworkId_Property_GUID, UIAutomationType_String },
7100 { &IsRequiredForForm_Property_GUID, UIAutomationType_Bool },
7101 { &ItemStatus_Property_GUID, UIAutomationType_String },
7102 { &AriaRole_Property_GUID, UIAutomationType_String },
7103 { &AriaProperties_Property_GUID, UIAutomationType_String },
7104 { &IsDataValidForForm_Property_GUID, UIAutomationType_Bool },
7105 { &ControllerFor_Property_GUID, UIAutomationType_ElementArray },
7106 { &DescribedBy_Property_GUID, UIAutomationType_ElementArray },
7107 { &FlowsTo_Property_GUID, UIAutomationType_ElementArray },
7109 { &OptimizeForVisualContent_Property_GUID, UIAutomationType_Bool },
7110 { &LiveSetting_Property_GUID, UIAutomationType_Int },
7111 { &FlowsFrom_Property_GUID, UIAutomationType_ElementArray },
7112 { &IsPeripheral_Property_GUID, UIAutomationType_Bool },
7114 { &PositionInSet_Property_GUID, UIAutomationType_Int },
7115 { &SizeOfSet_Property_GUID, UIAutomationType_Int },
7116 { &Level_Property_GUID, UIAutomationType_Int },
7117 { &AnnotationTypes_Property_GUID, UIAutomationType_IntArray },
7118 { &AnnotationObjects_Property_GUID, UIAutomationType_ElementArray },
7120 { &LandmarkType_Property_GUID, UIAutomationType_Int },
7121 { &LocalizedLandmarkType_Property_GUID, UIAutomationType_String,
TRUE },
7122 { &FullDescription_Property_GUID, UIAutomationType_String },
7123 { &FillColor_Property_GUID, UIAutomationType_Int },
7124 { &OutlineColor_Property_GUID, UIAutomationType_IntArray },
7125 { &FillType_Property_GUID, UIAutomationType_Int },
7126 { &VisualEffects_Property_GUID, UIAutomationType_Int },
7127 { &OutlineThickness_Property_GUID, UIAutomationType_DoubleArray },
7128 { &Rotation_Property_GUID, UIAutomationType_Double },
7129 { &Size_Property_GUID, UIAutomationType_DoubleArray },
7130 { &HeadingLevel_Property_GUID, UIAutomationType_Int },
7131 { &IsDialog_Property_GUID, UIAutomationType_Bool },
7150 node = (
void *)0xdeadbeef;
7210 for (
i = 0;
i < 2;
i++)
7232 for (
i = 0;
i < 2;
i++)
7244 for (
i = 0;
i < 2;
i++)
7266 win_skip(
"Skipping UIA_BoundingRectanglePropertyId tests for Win7\n");
7271 node = (
void *)0xdeadbeef;
7302 IUnknown_Release(unk_ns);
7356 int rt_id[4], tmp,
i;
7388 node = (
void *)0xdeadbeef;
7403 sa = (
void *)0xdeadbeef;
7406 ok(!
sa,
"sa != NULL\n");
7412 sa = (
void *)0xdeadbeef;
7415 ok(!!
sa,
"sa == NULL\n");
7435 sa = (
void *)0xdeadbeef;
7441 ok(!
sa,
"sa != NULL\n");
7468 sa = (
void *)0xdeadbeef;
7472 ok(!
sa,
"sa != NULL\n");
7506 ok(!!
sa,
"sa == NULL\n");
7509 ok(
hr ==
S_OK,
"Failed to get LBound with hr %#lx\n",
hr);
7511 lbound = lbound + 2;
7513 ok(
hr ==
S_OK,
"Failed to get element with hr %#lx\n",
hr);
7515 ok(rt_id[2] != tmp,
"Expected different runtime id value from previous\n");
7531 node = (
void *)0xdeadbeef;
7538 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
7554 ok(!!
sa,
"sa == NULL\n");
7575 HUIANODE
node, node2;
7586 node = (
void *)0xdeadbeef;
7590 ok(!
node,
"node != NULL\n");
7597 ok(!!
node,
"node == NULL\n");
7600 node2 = (
void *)0xdeadbeef;
7605 ok(
node == node2,
"node != NULL\n");
7608 ok(node_ref == 3,
"Unexpected node_ref %ld\n", node_ref);
7613 node2 = (
void *)0xdeadbeef;
7615 V_I4(&
v) = 0xbeefdead;
7618 ok(!node2,
"node2 != NULL\n");
7620 node2 = (
void *)0xdeadbeef;
7625 ok(node2 == (
void *)
V_I8(&
v),
"node2 != V_I8\n");
7627 node2 = (
void *)0xdeadbeef;
7629 V_I8(&
v) = 0xbeefdead;
7632 ok(!node2,
"node2 != NULL\n");
7634 node2 = (
void *)0xdeadbeef;
7639 ok(node2 == (
void *)
V_I4(&
v),
"node2 != V_I4\n");
7893 ok(apt_type ==
APTTYPE_MTA,
"Unexpected apt_type %#x\n", apt_type);
7906 ok(apt_type ==
APTTYPE_MTA,
"Unexpected apt_type %#x\n", apt_type);
7913 HUIANODE
node, node2, node3;
7936 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
8035 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
8080 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
8090 if (!pUiaDisconnectProvider)
8092 win_skip(
"UiaDisconnectProvider not exported by uiautomationcore.dll\n");
8179 hr = pUiaDisconnectProvider(&
Provider_child.IRawElementProviderSimple_iface);
8241 HUIANODE
node, node2;
8273 node = (
void *)0xdeadbeef;
8298 node = (
void *)0xdeadbeef;
8324 node = (
void *)0xdeadbeef;
8355 node = (
void *)0xdeadbeef;
8402 node = (
void *)0xdeadbeef;
8411 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
8424 if (pUiaDisconnectProvider)
8482 ok(apt_type ==
APTTYPE_MTA,
"Unexpected apt_type %#x\n", apt_type);
8530 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
8780 IRawElementProviderSimple *elprov =
NULL;
8786 if (
hwnd == Provider_hwnd3.hwnd)
8787 elprov = &Provider_hwnd3.IRawElementProviderSimple_iface;
8788 else if (
hwnd == Provider_hwnd2.hwnd)
8789 elprov = &Provider_hwnd2.IRawElementProviderSimple_iface;
8809 if (
hwnd == Provider_nc3.hwnd)
8810 elprov = &Provider_nc3.IRawElementProviderSimple_iface;
8811 else if (
hwnd == Provider_nc2.hwnd)
8812 elprov = &Provider_nc2.IRawElementProviderSimple_iface;
8851 IRawElementProviderSimple_AddRef(iface);
8899 case UIA_NativeWindowHandlePropertyId:
8907 case UIA_ProviderDescriptionPropertyId:
8920 IRawElementProviderSimple **ret_val)
8943 trace(
"Failed to allocate memory for temporary clientside provider\n");
8960 0, 0, { (
DWORD_PTR)(__FILE__
": clientside_provider_callback_cs") }
8976 IRawElementProviderSimple *elprov =
NULL;
8986 if (
hwnd == Provider_hwnd3.hwnd)
8987 elprov = &Provider_hwnd3.IRawElementProviderSimple_iface;
8988 else if (
hwnd == Provider_hwnd2.hwnd)
8989 elprov = &Provider_hwnd2.IRawElementProviderSimple_iface;
9003 if (
hwnd == Provider_nc3.hwnd)
9004 elprov = &Provider_nc3.IRawElementProviderSimple_iface;
9005 else if (
hwnd == Provider_nc2.hwnd)
9006 elprov = &Provider_nc2.IRawElementProviderSimple_iface;
9008 elprov = &
Provider_nc.IRawElementProviderSimple_iface;
9024 IRawElementProviderSimple_AddRef(elprov);
9027 IRawElementProviderSimple_Release(elprov);
9036#define TIME_SINCE_LAST_CALLBACK_TIMEOUT 200
9040 CONDITION_VARIABLE
cv;
9089 cls.
lpszClassName =
"UiaRegisterProviderCallback child class";
9103 node = (
void *)0xdeadbeef;
9113 ok(!
node,
"node != NULL\n");
9125 node = (
void *)0xdeadbeef;
9135 ok(!!
node,
"node == NULL\n");
9158 node = (
void *)0xdeadbeef;
9168 ok(!!
node,
"node == NULL\n");
9194 node = (
void *)0xdeadbeef;
9203 ok(!!
node,
"node == NULL\n");
9237 node = (
void *)0xdeadbeef;
9246 ok(!!
node,
"node == NULL\n");
9336 node = (
void *)0xdeadbeef;
9474 PROPERTYID *prop_ids,
int prop_ids_count,
PATTERNID *pattern_ids,
int pattern_ids_count,
int elem_mode)
9509#define MAX_NODE_PROVIDERS 4
9544#define test_node_provider_desc( desc, desc_str ) \
9545 test_node_provider_desc_( (desc), (desc_str), __FILE__, __LINE__)
9551 for (
i = 0;
i <
desc->prov_count;
i++)
9553 if (
desc->nested_desc[
i])
9558 "Failed to get nested provider description\n");
9573#define test_cache_req_sa( sa, exp_lbound, exp_elems, exp_node_desc ) \
9574 test_cache_req_sa_( (sa), (exp_lbound), (exp_elems), (exp_node_desc), __FILE__, __LINE__)
9590 ok_(
file,
line)(dims == 2,
"Unexpected dims %d\n", dims);
9592 for (
i = 0;
i < 2;
i++)
9594 LONG lbound, ubound, elems;
9596 lbound = ubound = elems = 0;
9599 ok_(
file,
line)(exp_lbound[
i] == lbound,
"Unexpected lbound[%d] %ld\n",
i, lbound);
9604 elems = (ubound - lbound) + 1;
9605 ok_(
file,
line)(exp_elems[
i] == elems,
"Unexpected elems[%d] %ld\n",
i, elems);
9608 for (
i = 0;
i < exp_elems[0];
i++)
9610 LONG idx[2] = { (exp_lbound[0] +
i), exp_lbound[1] };
9628#define test_provider_event_advise_added( prov, event_id, todo) \
9629 test_provider_event_advise_added_( (prov), (event_id), (todo), __FILE__, __LINE__)
9726 LONG exp_lbound[2], exp_elems[2],
idx[2],
i;
9780 tree_struct =
NULL; out_req =
NULL;
9785 ok(!!out_req,
"out_req == NULL\n");
9786 ok(!!tree_struct,
"tree_struct == NULL\n");
9788 exp_lbound[0] = exp_lbound[1] = 0;
9789 exp_elems[0] = exp_elems[1] = 1;
9801 tree_struct =
NULL; out_req =
NULL;
9805 ok(!out_req,
"out_req != NULL\n");
9808 ok(!!tree_struct,
"tree_struct == NULL\n");
9817 tree_struct =
NULL; out_req =
NULL;
9821 ok(!!out_req,
"out_req == NULL\n");
9822 ok(!!tree_struct,
"tree_struct == NULL\n");
9824 exp_lbound[0] = exp_lbound[1] = 0;
9825 exp_elems[0] = exp_elems[1] = 1;
9838 tree_struct =
NULL; out_req =
NULL;
9841 ok(!out_req,
"out_req != NULL\n");
9844 ok(!!tree_struct,
"tree_struct == NULL\n");
9854 tree_struct =
NULL; out_req =
NULL;
9858 ok(!!out_req,
"out_req == NULL\n");
9859 ok(!!tree_struct,
"tree_struct == NULL\n");
9861 exp_lbound[0] = exp_lbound[1] = 0;
9862 exp_elems[0] = exp_elems[1] = 1;
9877 tree_struct =
NULL; out_req =
NULL;
9882 todo_wine ok(!!tree_struct,
"tree_struct == NULL\n");
9911 tree_struct =
NULL; out_req =
NULL;
9916 ok(!!out_req,
"out_req == NULL\n");
9917 ok(!!tree_struct,
"tree_struct == NULL\n");
9919 exp_lbound[0] = exp_lbound[1] = 0;
9920 exp_elems[0] = exp_elems[1] = 1;
9933 tree_struct =
NULL; out_req =
NULL;
9939 ok(!out_req,
"out_req != NULL\n");
9940 ok(!!tree_struct,
"tree_struct == NULL\n");
9953 tree_struct =
NULL; out_req =
NULL;
9958 ok(!!out_req,
"out_req == NULL\n");
9959 ok(!!tree_struct,
"tree_struct == NULL\n");
9961 exp_lbound[0] = exp_lbound[1] = 0;
9962 exp_elems[0] = exp_elems[1] = 1;
9975 tree_struct =
NULL; out_req =
NULL;
9981 ok(!out_req,
"out_req != NULL\n");
9982 ok(!!tree_struct,
"tree_struct == NULL\n");
9993 tree_struct =
NULL; out_req =
NULL;
9998 ok(!!out_req,
"out_req == NULL\n");
9999 ok(!!tree_struct,
"tree_struct == NULL\n");
10001 exp_lbound[0] = exp_lbound[1] = 0;
10002 exp_elems[0] = exp_elems[1] = 1;
10013 tree_struct =
NULL; out_req =
NULL;
10017 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10018 ok(!out_req,
"out_req != NULL\n");
10019 ok(!!tree_struct,
"tree_struct == NULL\n");
10037 tree_struct =
NULL; out_req =
NULL;
10040 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10041 ok(!!out_req,
"out_req == NULL\n");
10042 ok(!!tree_struct,
"tree_struct == NULL\n");
10044 exp_lbound[0] = exp_lbound[1] = 0;
10045 exp_elems[0] = exp_elems[1] = 1;
10064 tree_struct =
NULL; out_req =
NULL;
10067 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10069 ok(!out_req,
"out_req != NULL\n");
10070 ok(!!tree_struct,
"tree_struct == NULL\n");
10077 win_skip(
"UIA_OutlineColorPropertyId unavailable, skipping property condition tests for it.\n");
10089 tree_struct =
NULL; out_req =
NULL;
10092 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10093 ok(!!out_req,
"out_req == NULL\n");
10094 ok(!!tree_struct,
"tree_struct == NULL\n");
10096 exp_lbound[0] = exp_lbound[1] = 0;
10097 exp_elems[0] = exp_elems[1] = 1;
10107 prop_override.
prop_id = UIA_IsControlElementPropertyId;
10109 V_BOOL(&prop_override.
val) = VARIANT_FALSE;
10118 tree_struct =
NULL; out_req =
NULL;
10121 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10122 ok(!!out_req,
"out_req == NULL\n");
10123 ok(!!tree_struct,
"tree_struct == NULL\n");
10125 exp_lbound[0] = exp_lbound[1] = 0;
10126 exp_elems[0] = exp_elems[1] = 1;
10139 prop_override.
prop_id = UIA_IsControlElementPropertyId;
10141 V_BOOL(&prop_override.
val) = VARIANT_TRUE;
10150 tree_struct =
NULL; out_req =
NULL;
10153 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10155 ok(!out_req,
"out_req != NULL\n");
10156 ok(!!tree_struct,
"tree_struct == NULL\n");
10168 prop_ids[0] = UIA_RuntimeIdPropertyId;
10171 tree_struct =
NULL; out_req =
NULL;
10175 ok(!out_req,
"out_req != NULL\n");
10176 ok(!tree_struct,
"tree_struct != NULL\n");
10182 prop_ids[0] = UIA_RuntimeIdPropertyId;
10183 prop_ids[1] = UIA_IsControlElementPropertyId;
10188 tree_struct =
NULL; out_req =
NULL;
10191 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10192 ok(!!out_req,
"out_req == NULL\n");
10193 ok(!!tree_struct,
"tree_struct == NULL\n");
10195 exp_lbound[0] = exp_lbound[1] = 0;
10233 tree_struct =
NULL; out_req =
NULL;
10236 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10237 ok(!!out_req,
"out_req == NULL\n");
10238 ok(!!tree_struct,
"tree_struct == NULL\n");
10240 exp_lbound[0] = exp_lbound[1] = 0;
10274 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10285 tree_struct =
NULL; out_req =
NULL;
10287 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10288 ok(!out_req,
"out_req != NULL\n");
10289 ok(!!tree_struct,
"tree_struct == NULL\n");
10305 tree_struct =
NULL; out_req =
NULL;
10307 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10308 ok(!!out_req,
"out_req == NULL\n");
10309 ok(!!tree_struct,
"tree_struct == NULL\n");
10312 exp_lbound[0] = exp_lbound[1] = 0;
10313 exp_elems[0] = exp_elems[1] = 1;
10328 IUnknown_Release(unk_ns);
10614 prov->parent = &
parent->IRawElementProviderFragment_iface;
10630 LONG exp_lbound[2], exp_elems[2],
idx[2],
i;
10634 HUIANODE
node, node2, node3;
10671 &Provider_hwnd_child2,
NULL,
NULL);
10686 node = (
void *)0xdeadbeef;
10693 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
10700 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
10719 tree_struct =
NULL; out_req =
NULL;
10722 ok(!!out_req,
"out_req == NULL\n");
10723 ok(!!tree_struct,
"tree_struct == NULL\n");
10724 ok(Provider_hwnd_child.ref == 2,
"Unexpected refcnt %ld\n", Provider_hwnd_child.ref);
10726 node2 = node3 =
NULL;
10732 IUnknown_AddRef((
IUnknown *)node2);
10734 exp_lbound[0] = exp_lbound[1] = 0;
10735 exp_elems[0] = exp_elems[1] = 1;
10749 ok(!!out_req,
"out_req == NULL\n");
10750 ok(!!tree_struct,
"tree_struct == NULL\n");
10751 ok(Provider_hwnd_child2.ref == 2,
"Unexpected refcnt %ld\n", Provider_hwnd_child2.ref);
10758 IUnknown_AddRef((
IUnknown *)node3);
10760 exp_lbound[0] = exp_lbound[1] = 0;
10761 exp_elems[0] = exp_elems[1] = 1;
10771 ok(Provider_hwnd_child.ref == 1,
"Unexpected refcnt %ld\n", Provider_hwnd_child.ref);
10781 ok(!!out_req,
"out_req == NULL\n");
10782 ok(!!tree_struct,
"tree_struct == NULL\n");
10783 ok(Provider_nc_child.ref == 2,
"Unexpected refcnt %ld\n", Provider_nc_child.ref);
10792 IUnknown_AddRef((
IUnknown *)node3);
10794 exp_lbound[0] = exp_lbound[1] = 0;
10795 exp_elems[0] = exp_elems[1] = 1;
10805 ok(Provider_hwnd_child2.ref == 1,
"Unexpected refcnt %ld\n", Provider_hwnd_child2.ref);
10815 ok(!!out_req,
"out_req == NULL\n");
10816 ok(!!tree_struct,
"tree_struct == NULL\n");
10817 ok(Provider_hwnd_child2.ref == 2,
"Unexpected refcnt %ld\n", Provider_hwnd_child2.ref);
10826 IUnknown_AddRef((
IUnknown *)node3);
10828 exp_lbound[0] = exp_lbound[1] = 0;
10829 exp_elems[0] = exp_elems[1] = 1;
10839 ok(Provider_hwnd_child2.ref == 1,
"Unexpected refcnt %ld\n", Provider_hwnd_child2.ref);
10846 ok(!!out_req,
"out_req == NULL\n");
10847 ok(!!tree_struct,
"tree_struct == NULL\n");
10848 ok(Provider_nc_child2.ref == 2,
"Unexpected refcnt %ld\n", Provider_nc_child2.ref);
10855 IUnknown_AddRef((
IUnknown *)node3);
10857 exp_lbound[0] = exp_lbound[1] = 0;
10858 exp_elems[0] = exp_elems[1] = 1;
10868 ok(Provider_nc_child.ref == 1,
"Unexpected refcnt %ld\n", Provider_nc_child.ref);
10878 ok(!!out_req,
"out_req == NULL\n");
10879 ok(!!tree_struct,
"tree_struct == NULL\n");
10889 IUnknown_AddRef((
IUnknown *)node3);
10891 exp_lbound[0] = exp_lbound[1] = 0;
10892 exp_elems[0] = exp_elems[1] = 1;
10902 ok(Provider_nc_child2.ref == 1,
"Unexpected refcnt %ld\n", Provider_nc_child2.ref);
10910 ok(!!out_req,
"out_req == NULL\n");
10911 ok(!!tree_struct,
"tree_struct == NULL\n");
10919 IUnknown_AddRef((
IUnknown *)node3);
10921 exp_lbound[0] = exp_lbound[1] = 0;
10922 exp_elems[0] = exp_elems[1] = 1;
10942 ok(!out_req,
"out_req != NULL\n");
10943 ok(!tree_struct,
"tree_struct != NULL\n");
10957 tree_struct =
NULL;
10961 ok(!!out_req,
"out_req == NULL\n");
10962 ok(!!tree_struct,
"tree_struct == NULL\n");
10963 ok(
Provider_child2.ref == 2,
"Unexpected refcnt %ld\n", Provider_hwnd_child.ref);
10965 exp_lbound[0] = exp_lbound[1] = 0;
10966 exp_elems[0] = exp_elems[1] = 1;
10981 Provider_hwnd_child.hwnd =
hwnd;
10986 tree_struct =
NULL;
10992 ok(!!out_req,
"out_req == NULL\n");
10993 ok(!!tree_struct,
"tree_struct == NULL\n");
10994 ok(Provider_hwnd_child2.ref == 2,
"Unexpected refcnt %ld\n", Provider_hwnd_child2.ref);
11003 IUnknown_AddRef((
IUnknown *)node2);
11005 exp_lbound[0] = exp_lbound[1] = 0;
11006 exp_elems[0] = exp_elems[1] = 1;
11016 ok(Provider_hwnd_child2.ref == 1,
"Unexpected refcnt %ld\n", Provider_hwnd_child2.ref);
11030 tree_struct =
NULL;
11037 ok(!!out_req,
"out_req == NULL\n");
11038 ok(!!tree_struct,
"tree_struct == NULL\n");
11039 ok(
Provider_child.ref == 2,
"Unexpected refcnt %ld\n", Provider_hwnd_child2.ref);
11049 IUnknown_AddRef((
IUnknown *)node2);
11051 exp_lbound[0] = exp_lbound[1] = 0;
11052 exp_elems[0] = exp_elems[1] = 1;
11079 node = (
void *)0xdeadbeef;
11086 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
11093 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
11109 tree_struct =
NULL;
11113 ok(!!out_req,
"out_req == NULL\n");
11114 ok(!!tree_struct,
"tree_struct == NULL\n");
11117 exp_lbound[0] = exp_lbound[1] = 0;
11118 exp_elems[0] = exp_elems[1] = 1;
11133 Provider_hwnd_child.hwnd =
NULL;
11150 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
11151 ok(Provider_child2_child_child.ref == 2,
"Unexpected refcnt %ld\n", Provider_child2_child_child.ref);
11172 tree_struct =
NULL;
11176 ok(!out_req,
"out_req != NULL\n");
11177 ok(!tree_struct,
"tree_struct != NULL\n");
11188 tree_struct =
NULL;
11192 ok(!!out_req,
"out_req == NULL\n");
11193 ok(!!tree_struct,
"tree_struct == NULL\n");
11196 exp_lbound[0] = exp_lbound[1] = 0;
11197 exp_elems[0] = exp_elems[1] = 1;
11206 ok(Provider_child2_child_child.ref == 1,
"Unexpected refcnt %ld\n", Provider_child2_child_child.ref);
11216 params->MaxDepth = max_depth;
11217 params->FindFirst = find_first;
11218 params->ExcludeRoot = exclude_root;
11219 params->pFindCondition = find_cond;
11230 override->prop_id = prop_id;
11231 override->val = *
val;
11235 int responder_event)
11293 if (initialize_nav_links)
11331#define test_find_sa_results( tree_structs, offsets, exp_elems, exp_tree_struct, exp_offsets ) \
11332 test_find_sa_results_( (tree_structs), (offsets), (exp_elems), (exp_tree_struct), (exp_offsets), __FILE__, __LINE__)
11334 const WCHAR **exp_tree_struct,
int *exp_offset,
const char *
file,
int line)
11336 LONG lbound, ubound, elems;
11347 ok_(
file,
line)(dims == 1,
"Unexpected tree structures sa dims %d\n", dims);
11349 lbound = ubound = elems = 0;
11352 ok_(
file,
line)(!lbound,
"Unexpected lbound %ld\n", lbound);
11357 elems = (ubound - lbound) + 1;
11358 ok_(
file,
line)(exp_elems == elems,
"Unexpected elems %ld\n", elems);
11365 ok_(
file,
line)(dims == 1,
"Unexpected offsets sa dims %d\n", dims);
11367 lbound = ubound = elems = 0;
11370 ok_(
file,
line)(!lbound,
"Unexpected lbound %ld\n", lbound);
11375 elems = (ubound - lbound) + 1;
11376 ok_(
file,
line)(exp_elems == elems,
"Unexpected elems %ld\n", elems);
11378 for (
i = 0;
i < exp_elems;
i++)
11709 LONG exp_lbound[2], exp_elems[2],
idx[2],
i;
11715 const WCHAR *exp_tree_struct[7];
11716 int exp_offset[7], cache_prop;
11717 HUIANODE
node, node2;
11736 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
11752 cache_prop = UIA_RuntimeIdPropertyId;
11757 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
11759 ok(Provider_child_child.ref == 2,
"Unexpected refcnt %ld\n", Provider_child_child.ref);
11760 ok(Provider_child_child2.ref == 2,
"Unexpected refcnt %ld\n", Provider_child_child2.ref);
11762 ok(Provider_child2_child.ref == 2,
"Unexpected refcnt %ld\n", Provider_child2_child.ref);
11763 ok(Provider_child2_child_child.ref == 2,
"Unexpected refcnt %ld\n", Provider_child2_child_child.ref);
11772 exp_lbound[0] = exp_lbound[1] = 0;
11778 for (
i = 0;
i < exp_elems[0];
i++)
11781 exp_tree_struct[
i] =
L"P)";
11800 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
11807 exp_lbound[0] = exp_lbound[1] = 0;
11813 for (
i = 0;
i < exp_elems[0];
i++)
11816 exp_tree_struct[
i] =
L"P)";
11836 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
11842 exp_lbound[0] = exp_lbound[1] = 0;
11848 for (
i = 0;
i < exp_elems[0];
i++)
11851 exp_tree_struct[
i] =
L"P)";
11871 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
11875 exp_lbound[0] = exp_lbound[1] = 0;
11886 IUnknown_AddRef((
IUnknown *)node2);
11890 for (
i = 0;
i < exp_elems[0];
i++)
11893 exp_tree_struct[
i] =
L"P)";
11914 hr =
UiaFind(node2, &find_params, &cache_req, &out_req, &
offsets, &tree_structs);
11915 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
11920 exp_lbound[0] = exp_lbound[1] = 0;
11926 for (
i = 0;
i < exp_elems[0];
i++)
11929 exp_tree_struct[
i] =
L"P)";
11951 hr =
UiaFind(node2, &find_params, &cache_req, &out_req, &
offsets, &tree_structs);
11952 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
11955 exp_lbound[0] = exp_lbound[1] = 0;
11961 for (
i = 0;
i < exp_elems[0];
i++)
11964 exp_tree_struct[
i] =
L"P)";
12005 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12006 ok(Provider_child_child.ref == 2,
"Unexpected refcnt %ld\n", Provider_child_child.ref);
12007 ok(Provider_child_child2.ref == 2,
"Unexpected refcnt %ld\n", Provider_child_child2.ref);
12014 exp_lbound[0] = exp_lbound[1] = 0;
12020 for (
i = 0;
i < exp_elems[0];
i++)
12023 exp_tree_struct[
i] =
L"P)";
12058 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12059 ok(Provider_child_child.ref == 2,
"Unexpected refcnt %ld\n", Provider_child_child.ref);
12060 ok(Provider_child_child2.ref == 2,
"Unexpected refcnt %ld\n", Provider_child_child2.ref);
12067 exp_lbound[0] = exp_lbound[1] = 0;
12079 IUnknown_AddRef((
IUnknown *)node2);
12083 for (
i = 0;
i < exp_elems[0];
i++)
12086 exp_tree_struct[
i] =
L"P)";
12114 prop_override.
prop_id = UIA_IsContentElementPropertyId;
12116 V_BOOL(&prop_override.
val) = VARIANT_FALSE;
12124 hr =
UiaFind(node2, &find_params, &cache_req, &out_req, &
offsets, &tree_structs);
12125 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12127 ok(Provider_child2_child.ref == 2,
"Unexpected refcnt %ld\n", Provider_child2_child.ref);
12132 exp_lbound[0] = exp_lbound[1] = 0;
12138 for (
i = 0;
i < exp_elems[0];
i++)
12141 exp_tree_struct[
i] =
L"P)";
12155 ok(Provider_child_child2.ref == 1,
"Unexpected refcnt %ld\n", Provider_child_child2.ref);
12180 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12184 exp_lbound[0] = exp_lbound[1] = 0;
12190 for (
i = 0;
i < exp_elems[0];
i++)
12193 exp_tree_struct[
i] =
L"P)";
12227 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12228 ok(Provider_child_child2.ref == 2,
"Unexpected refcnt %ld\n", Provider_child_child2.ref);
12231 exp_lbound[0] = exp_lbound[1] = 0;
12237 for (
i = 0;
i < exp_elems[0];
i++)
12240 exp_tree_struct[
i] =
L"P)";
12270 IUnknown *proxy_iface, *unk, *unk2;
12275 proxy_iface = unk = unk2 =
NULL;
12281 ok_(
data->file,
data->line)(!!unk,
"unk == NULL\n");
12283 hr = IUnknown_QueryInterface(proxy_iface, &
IID_IUnknown, (
void **)&unk2);
12285 ok_(
data->file,
data->line)(!!unk2,
"unk2 == NULL\n");
12287 if (
data->expect_proxy)
12288 ok_(
data->file,
data->line)(unk != unk2,
"unk == unk2\n");
12290 ok_(
data->file,
data->line)(unk == unk2,
"unk != unk2\n");
12292 IUnknown_Release(proxy_iface);
12293 IUnknown_Release(unk);
12294 IUnknown_Release(unk2);
12307 hr = IUnknown_QueryInterface(
iface,
data.iface_iid, (
void **)&
data.iface);
12325 IUnknown_Release(
data.iface);
12358 if (child_class_name)
12364 IUIAutomationElement *
element;
12368 if (block_hwnd_provs)
12384 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12388 called_winproc_GETOBJECT_CLIENT = expect_winproc_GETOBJECT_CLIENT = 0;
12389 if (block_hwnd_provs)
12395 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, UIA_ProviderDescriptionPropertyId,
TRUE, &
v);
12399 if (!block_hwnd_provs)
12418 IUIAutomationElement2 *element_2;
12419 IUIAutomationElement *
element;
12423 hr = IUIAutomationElement_QueryInterface(
element, &IID_IUIAutomationElement2, (
void **)&element_2);
12426 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12427 ok(!!element_2,
"element_2 == NULL\n");
12428 IUIAutomationElement2_Release(element_2);
12439 IUIAutomationElement_Release(
element);
12452 IUIAutomationElement *
element, *element2;
12453 IUIAutomationElementArray *element_arr;
12468 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12470 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, UIA_ControlTypePropertyId,
TRUE,
NULL);
12475 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, 1,
TRUE, &
v);
12492 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, prop_id,
TRUE, &
v);
12493 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12503 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, prop_id,
TRUE, &
v);
12504 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12519 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, UIA_ControllerForPropertyId,
TRUE, &
v);
12520 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12525 element_arr =
NULL;
12526 hr = IUnknown_QueryInterface(
V_UNKNOWN(&
v), &IID_IUIAutomationElementArray, (
void **)&element_arr);
12528 ok(!!element_arr,
"element_arr == NULL\n");
12531 hr = IUIAutomationElementArray_get_Length(element_arr, &
len);
12536 hr = IUIAutomationElementArray_get_Length(element_arr,
NULL);
12539 element2 = (
void *)0xdeadbeef;
12540 hr = IUIAutomationElementArray_GetElement(element_arr,
len, &element2);
12543 ok(!!element2,
"element2 == NULL\n");
12545 hr = IUIAutomationElementArray_GetElement(element_arr, -1, &element2);
12548 ok(!!element2,
"element2 == NULL\n");
12550 hr = IUIAutomationElementArray_GetElement(element_arr, 0,
NULL);
12553 for (
i = 0;
i <
len;
i++)
12556 hr = IUIAutomationElementArray_GetElement(element_arr,
i, &element2);
12558 ok(!!element2,
"element2 == NULL\n");
12560 hr = IUIAutomationElement_GetCurrentPropertyValueEx(element2, UIA_ControlTypePropertyId,
TRUE, &
v);
12561 ok(
hr ==
S_OK,
"element[%d] Unexpected hr %#lx\n",
i,
hr);
12565 IUIAutomationElement_Release(element2);
12569 IUIAutomationElementArray_Release(element_arr);
12579 tmp_int = 0xdeadb33f;
12580 hr = IUIAutomationElement_get_CurrentControlType(
element, &tmp_int);
12581 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12587 ok(tmp_int == UIA_CustomControlTypeId ||
broken(tmp_int == 0xdeadbeef),
"Unexpected control type %#x\n", tmp_int);
12591 tmp_int = 0xdeadbeef;
12592 hr = IUIAutomationElement_get_CurrentControlType(
element, &tmp_int);
12593 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12594 ok(tmp_int == UIA_CustomControlTypeId,
"Unexpected control type %#x\n", tmp_int);
12600 V_I4(&
v) = UIA_HyperlinkControlTypeId;
12603 hr = IUIAutomationElement_get_CurrentControlType(
element, &tmp_int);
12604 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12605 ok(tmp_int == UIA_HyperlinkControlTypeId,
"Unexpected control type %#x\n", tmp_int);
12613 hr = IUIAutomationElement_get_CurrentName(
element, &tmp_bstr);
12614 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12621 hr = IUIAutomationElement_get_CurrentName(
element, &tmp_bstr);
12622 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12634 win_skip(
"Skipping UIA_BoundingRectanglePropertyId tests for Win7\n");
12641 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, UIA_LabeledByPropertyId,
TRUE, &
v);
12642 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12646 hr = IUnknown_QueryInterface(
V_UNKNOWN(&
v), &IID_IUIAutomationElement, (
void **)&element2);
12647 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12648 ok(!!element2,
"element2 == NULL\n");
12654 hr = IUIAutomationElement_GetCurrentPropertyValueEx(element2, UIA_BoundingRectanglePropertyId,
TRUE, &
v);
12655 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12660 hr = IUIAutomationElement_get_CurrentBoundingRectangle(element2, &
rect);
12661 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12669 hr = IUIAutomationElement_GetCurrentPropertyValueEx(element2, UIA_BoundingRectanglePropertyId,
TRUE, &
v);
12670 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12677 hr = IUIAutomationElement_get_CurrentBoundingRectangle(element2, &
rect);
12678 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12682 IUIAutomationElement_Release(element2);
12687 IUIAutomationElement_Release(
element);
12697 int in_arr[3] = { 0xdeadbeef, 0xfeedbeef, 0x1337b33f };
12698 int *out_arr, out_arr_count,
i;
12699 LONG lbound, ubound;
12710 vt = invalid_int_vts[
i];
12712 ok(!!
sa,
"sa == NULL\n");
12714 out_arr_count = 0xdeadbeef;
12715 out_arr = (
int *)0xdeadbeef;
12716 hr = IUIAutomation_IntSafeArrayToNativeArray(
uia_iface,
sa, &out_arr, &out_arr_count);
12718 ok(!out_arr,
"out_arr != NULL\n");
12719 ok(out_arr_count == 0xdeadbeef,
"Unexpected out_arr_count %#x\n", out_arr_count);
12725 hr = IUIAutomation_IntSafeArrayToNativeArray(
uia_iface,
sa, &out_arr, &out_arr_count);
12726 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12739 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12742 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12746 ok(dims == 1,
"Unexpected array dims %d\n", dims);
12749 ok(
hr ==
S_OK,
"Failed to get LBound with hr %#lx\n",
hr);
12750 ok(lbound == 0,
"Unexpected LBound %#lx\n", lbound);
12753 ok(
hr ==
S_OK,
"Failed to get UBound with hr %#lx\n",
hr);
12754 ok(((ubound - lbound) + 1) ==
ARRAY_SIZE(in_arr),
"Unexpected array size %#lx\n", ((ubound - lbound) + 1));
12762 ok(
hr ==
S_OK,
"Failed to get element at idx %ld, hr %#lx\n",
idx,
hr);
12763 ok(tmp_val == in_arr[
i],
"Expected %d at idx %d, got %d\n", in_arr[
i],
i, tmp_val);
12799 IUIAutomationPropertyCondition *prop_cond, *prop_cond2;
12800 IUIAutomationCondition *cond, **cond_arr;
12802 IUIAutomationBoolCondition *bool_cond;
12803 IUIAutomationNotCondition *not_cond;
12804 IUIAutomationOrCondition *or_cond;
12816 hr = IUIAutomation_CreateTrueCondition(
uia_iface, &cond);
12817 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12818 ok(!!cond,
"cond == NULL\n");
12820 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationBoolCondition, (
void **)&bool_cond);
12821 IUIAutomationCondition_Release(cond);
12822 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12823 ok(!!bool_cond,
"bool_cond == NULL\n");
12825 hr = IUIAutomationBoolCondition_get_BooleanValue(bool_cond,
NULL);
12829 hr = IUIAutomationBoolCondition_get_BooleanValue(bool_cond, &tmp_b);
12830 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12831 ok(tmp_b ==
TRUE,
"tmp_b != TRUE\n");
12832 IUIAutomationBoolCondition_Release(bool_cond);
12838 hr = IUIAutomation_CreateFalseCondition(
uia_iface, &cond);
12839 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12840 ok(!!cond,
"cond == NULL\n");
12842 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationBoolCondition, (
void **)&bool_cond);
12843 IUIAutomationCondition_Release(cond);
12844 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12845 ok(!!bool_cond,
"bool_cond == NULL\n");
12847 hr = IUIAutomationBoolCondition_get_BooleanValue(bool_cond,
NULL);
12851 hr = IUIAutomationBoolCondition_get_BooleanValue(bool_cond, &tmp_b);
12852 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12853 ok(tmp_b ==
FALSE,
"tmp_b != FALSE\n");
12854 IUIAutomationBoolCondition_Release(bool_cond);
12859 cond = (
void *)0xdeadbeef;
12862 hr = IUIAutomation_CreatePropertyCondition(
uia_iface, 0,
v, &cond);
12864 ok(!cond,
"cond != NULL\n");
12867 cond = (
void *)0xdeadbeef;
12869 hr = IUIAutomation_CreatePropertyCondition(
uia_iface, UIA_RuntimeIdPropertyId,
v, &cond);
12871 ok(!cond,
"cond != NULL\n");
12876 hr = IUIAutomation_CreatePropertyCondition(
uia_iface, UIA_RuntimeIdPropertyId,
v,
NULL);
12881 hr = IUIAutomation_CreatePropertyCondition(
uia_iface, UIA_RuntimeIdPropertyId,
v, &cond);
12882 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12883 ok(!!cond,
"cond == NULL\n");
12885 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationPropertyCondition, (
void **)&prop_cond);
12886 IUIAutomationCondition_Release(cond);
12887 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12888 ok(!!prop_cond,
"prop_cond == NULL\n");
12890 hr = IUIAutomationPropertyCondition_get_PropertyId(prop_cond,
NULL);
12893 hr = IUIAutomationPropertyCondition_get_PropertyId(prop_cond, &prop_id);
12894 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12895 ok(prop_id == UIA_RuntimeIdPropertyId,
"Unexpected prop_id %d.\n", prop_id);
12897 hr = IUIAutomationPropertyCondition_get_PropertyValue(prop_cond,
NULL);
12901 hr = IUIAutomationPropertyCondition_get_PropertyValue(prop_cond, &
v);
12902 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12907 hr = IUIAutomationPropertyCondition_get_PropertyConditionFlags(prop_cond,
NULL);
12910 hr = IUIAutomationPropertyCondition_get_PropertyConditionFlags(prop_cond, &prop_flags);
12911 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12917 cond = (
void *)0xdeadbeef;
12923 hr = IUIAutomation_CreateNotCondition(
uia_iface, (IUIAutomationCondition *)&
Object, &cond);
12925 ok(!cond,
"cond != NULL\n");
12928 cond = (
void *)0xdeadbeef;
12931 ok(!cond,
"cond != NULL\n");
12933 hr = IUIAutomation_CreateNotCondition(
uia_iface, (IUIAutomationCondition *)prop_cond,
NULL);
12938 hr = IUIAutomation_CreateNotCondition(
uia_iface, (IUIAutomationCondition *)prop_cond, &cond);
12939 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12940 ok(!!cond,
"cond == NULL\n");
12943 ref = IUIAutomationPropertyCondition_Release(prop_cond);
12944 ok(
ref == 1,
"Unexpected ref %ld\n",
ref);
12946 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationNotCondition, (
void **)¬_cond);
12947 IUIAutomationCondition_Release(cond);
12948 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12949 ok(!!not_cond,
"not_cond == NULL\n");
12951 hr = IUIAutomationNotCondition_GetChild(not_cond,
NULL);
12955 hr = IUIAutomationNotCondition_GetChild(not_cond, &cond);
12956 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12958 IUIAutomationCondition_Release(cond);
12960 IUIAutomationNotCondition_Release(not_cond);
12970 hr = IUIAutomation_CreatePropertyCondition(
uia_iface, UIA_IsControlElementPropertyId,
v, &cond);
12971 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12972 ok(!!cond,
"cond == NULL\n");
12974 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationPropertyCondition, (
void **)&prop_cond);
12975 IUIAutomationCondition_Release(cond);
12976 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12977 ok(!!prop_cond,
"prop_cond == NULL\n");
12983 hr = IUIAutomation_CreatePropertyCondition(
uia_iface, UIA_IsContentElementPropertyId,
v, &cond);
12984 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12985 ok(!!cond,
"cond == NULL\n");
12987 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationPropertyCondition, (
void **)&prop_cond2);
12988 IUIAutomationCondition_Release(cond);
12989 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12990 ok(!!prop_cond2,
"prop_cond2 == NULL\n");
12993 hr = IUIAutomation_CreateOrCondition(
uia_iface, (IUIAutomationCondition *)prop_cond,
12994 (IUIAutomationCondition *)prop_cond2,
NULL);
12997 cond = (
void *)0xdeadbeef;
12998 hr = IUIAutomation_CreateOrCondition(
uia_iface,
NULL, (IUIAutomationCondition *)prop_cond2, &cond);
13000 ok(!cond,
"cond != NULL\n");
13002 cond = (
void *)0xdeadbeef;
13003 hr = IUIAutomation_CreateOrCondition(
uia_iface, (IUIAutomationCondition *)prop_cond,
NULL, &cond);
13005 ok(!cond,
"cond != NULL\n");
13008 cond = (
void *)0xdeadbeef;
13009 hr = IUIAutomation_CreateOrCondition(
uia_iface, (IUIAutomationCondition *)prop_cond,
13010 (IUIAutomationCondition *)&
Object, &cond);
13012 ok(!cond,
"cond != NULL\n");
13015 hr = IUIAutomation_CreateOrCondition(
uia_iface, (IUIAutomationCondition *)prop_cond,
13016 (IUIAutomationCondition *)prop_cond2, &cond);
13017 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13018 ok(!!cond,
"cond == NULL\n");
13021 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationOrCondition, (
void **)&or_cond);
13022 IUIAutomationCondition_Release(cond);
13023 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13024 ok(!!or_cond,
"or_cond == NULL\n");
13027 ref = IUIAutomationPropertyCondition_Release(prop_cond);
13028 ok(
ref == 1,
"Unexpected ref %ld\n",
ref);
13030 ref = IUIAutomationPropertyCondition_Release(prop_cond2);
13031 ok(
ref == 1,
"Unexpected ref %ld\n",
ref);
13033 hr = IUIAutomationOrCondition_get_ChildCount(or_cond,
NULL);
13037 hr = IUIAutomationOrCondition_get_ChildCount(or_cond, &child_count);
13038 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13039 ok(child_count == 2,
"Unexpected child_count %d.\n", child_count);
13042 hr = IUIAutomationOrCondition_GetChildrenAsNativeArray(or_cond,
NULL, &child_count);
13044 ok(child_count == 10,
"Unexpected child_count %d.\n", child_count);
13046 cond_arr = (
void *)0xdeadbeef;
13047 hr = IUIAutomationOrCondition_GetChildrenAsNativeArray(or_cond, &cond_arr,
NULL);
13049 ok(!cond_arr,
"cond_arr != NULL\n");
13053 hr = IUIAutomationOrCondition_GetChildrenAsNativeArray(or_cond, &cond_arr, &child_count);
13054 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13055 ok(child_count == 2,
"Unexpected child_count %d.\n", child_count);
13056 ok(!!cond_arr,
"cond_arr == NULL\n");
13059 IUIAutomationCondition_Release(cond_arr[0]);
13062 IUIAutomationCondition_Release(cond_arr[1]);
13065 IUIAutomationOrCondition_Release(or_cond);
13075 hr = IUIAutomation_get_ControlViewCondition(
uia_iface, &cond);
13076 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13077 ok(!!cond,
"cond == NULL\n");
13079 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationNotCondition, (
void **)¬_cond);
13080 IUIAutomationCondition_Release(cond);
13081 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13082 ok(!!not_cond,
"not_cond == NULL\n");
13085 hr = IUIAutomationNotCondition_GetChild(not_cond, &cond);
13086 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13087 ok(!!cond,
"cond == NULL\n");
13089 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationPropertyCondition, (
void **)&prop_cond);
13090 IUIAutomationCondition_Release(cond);
13091 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13092 ok(!!prop_cond,
"prop_cond == NULL\n");
13094 hr = IUIAutomationPropertyCondition_get_PropertyId(prop_cond, &prop_id);
13095 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13096 ok(prop_id == UIA_IsControlElementPropertyId,
"Unexpected prop_id %d.\n", prop_id);
13099 hr = IUIAutomationPropertyCondition_get_PropertyValue(prop_cond, &
v);
13100 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13104 hr = IUIAutomationPropertyCondition_get_PropertyConditionFlags(prop_cond, &prop_flags);
13105 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13108 IUIAutomationPropertyCondition_Release(prop_cond);
13109 IUIAutomationNotCondition_Release(not_cond);
13119 hr = IUIAutomation_get_RawViewCondition(
uia_iface, &cond);
13120 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13121 ok(!!cond,
"cond == NULL\n");
13123 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationBoolCondition, (
void **)&bool_cond);
13124 IUIAutomationCondition_Release(cond);
13125 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13126 ok(!!bool_cond,
"bool_cond == NULL\n");
13129 hr = IUIAutomationBoolCondition_get_BooleanValue(bool_cond, &tmp_b);
13130 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13131 ok(tmp_b ==
TRUE,
"tmp_b != TRUE\n");
13132 IUIAutomationBoolCondition_Release(bool_cond);
13137 IUIAutomationPropertyCondition *prop_cond;
13139 IUIAutomationCacheRequest *cache_req;
13141 IUIAutomationCondition *cond, *cond2;
13142 IUIAutomationNotCondition *not_cond;
13156 hr = IUIAutomation_CreateCacheRequest(
uia_iface, &cache_req);
13157 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13158 ok(!!cache_req,
"cache_req == NULL\n");
13163 hr = IUIAutomationCacheRequest_get_TreeScope(cache_req,
NULL);
13167 hr = IUIAutomationCacheRequest_get_TreeScope(cache_req, &scope);
13168 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13172 hr = IUIAutomationCacheRequest_put_TreeScope(cache_req, 0);
13192 hr = IUIAutomationCacheRequest_get_TreeScope(cache_req, &scope);
13193 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13201 hr = IUIAutomationCacheRequest_get_TreeScope(cache_req, &scope);
13202 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13209 hr = IUIAutomationCacheRequest_get_TreeFilter(cache_req,
NULL);
13213 hr = IUIAutomationCacheRequest_put_TreeFilter(cache_req,
NULL);
13217 hr = IUIAutomationCacheRequest_put_TreeFilter(cache_req, (IUIAutomationCondition *)&
Object);
13222 hr = IUIAutomationCacheRequest_get_TreeFilter(cache_req, &cond);
13223 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13224 ok(!!cond,
"cond == NULL\n");
13226 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationNotCondition, (
void **)¬_cond);
13227 IUIAutomationCondition_Release(cond);
13228 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13229 ok(!!not_cond,
"not_cond == NULL\n");
13232 hr = IUIAutomationNotCondition_GetChild(not_cond, &cond);
13233 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13234 ok(!!cond,
"cond == NULL\n");
13236 hr = IUIAutomationCondition_QueryInterface(cond, &IID_IUIAutomationPropertyCondition, (
void **)&prop_cond);
13237 IUIAutomationCondition_Release(cond);
13238 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13239 ok(!!prop_cond,
"prop_cond == NULL\n");
13241 hr = IUIAutomationPropertyCondition_get_PropertyId(prop_cond, &prop_id);
13242 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13243 ok(prop_id == UIA_IsControlElementPropertyId,
"Unexpected prop_id %d.\n", prop_id);
13246 hr = IUIAutomationPropertyCondition_get_PropertyValue(prop_cond, &
v);
13247 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13251 hr = IUIAutomationPropertyCondition_get_PropertyConditionFlags(prop_cond, &prop_flags);
13252 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13255 IUIAutomationPropertyCondition_Release(prop_cond);
13256 IUIAutomationNotCondition_Release(not_cond);
13260 hr = IUIAutomation_CreateTrueCondition(
uia_iface, &cond);
13261 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13262 ok(!!cond,
"cond == NULL\n");
13264 hr = IUIAutomationCacheRequest_put_TreeFilter(cache_req, cond);
13265 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13267 hr = IUIAutomationCacheRequest_get_TreeFilter(cache_req, &cond2);
13268 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13269 ok(!!cond2,
"cond2 == NULL\n");
13271 IUIAutomationCondition_Release(cond);
13272 IUIAutomationCondition_Release(cond2);
13277 hr = IUIAutomationCacheRequest_get_AutomationElementMode(cache_req,
NULL);
13281 hr = IUIAutomationCacheRequest_get_AutomationElementMode(cache_req, &elem_mode);
13282 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13286 hr = IUIAutomationCacheRequest_put_AutomationElementMode(cache_req, 0x02);
13293 hr = IUIAutomationCacheRequest_get_AutomationElementMode(cache_req, &elem_mode);
13294 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13300 hr = IUIAutomationCacheRequest_AddProperty(cache_req, UIA_IsContentElementPropertyId);
13301 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13304 hr = IUIAutomationCacheRequest_AddProperty(cache_req, 1);
13307 IUIAutomationCacheRequest_Release(cache_req);
13341 static const int cache_test_props[] = { UIA_IsKeyboardFocusablePropertyId, UIA_NamePropertyId, UIA_ControlTypePropertyId,
13342 UIA_BoundingRectanglePropertyId, UIA_HasKeyboardFocusPropertyId, };
13344 IUIAutomationElement *
element, *element2, *element3;
13346 IUIAutomationCacheRequest *cache_req;
13347 IUIAutomationElementArray *elem_arr;
13348 int tmp_rt_id[2],
i,
len, tmp_int;
13362 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13365 hr = IUIAutomation_CreateCacheRequest(
uia_iface, &cache_req);
13366 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13367 ok(!!cache_req,
"cache_req == NULL\n");
13373 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, UIA_LabeledByPropertyId,
TRUE, &
v);
13374 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13379 IUIAutomationElement_Release(
element);
13382 hr = IUnknown_QueryInterface(
V_UNKNOWN(&
v), &IID_IUIAutomationElement, (
void **)&
element);
13383 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13393 IUIAutomationElement_BuildUpdatedCache(
element, (IUIAutomationCacheRequest *)&
Object, &element2);
13396 hr = IUIAutomationElement_BuildUpdatedCache(
element, cache_req,
NULL);
13399 element2 = (
void *)0xdeadbeef;
13400 hr = IUIAutomationElement_BuildUpdatedCache(
element,
NULL, &element2);
13402 ok(!element2,
"element2 != NULL\n");
13409 hr = IUIAutomationElement_BuildUpdatedCache(
element, cache_req, &element2);
13410 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13411 ok(!!element2,
"element2 == NULL\n");
13415 hr = IUIAutomationElement_GetCachedPropertyValueEx(element2, UIA_RuntimeIdPropertyId,
TRUE, &
v);
13416 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13422 hr = IUIAutomationElement_GetCachedPropertyValueEx(element2, UIA_IsControlElementPropertyId,
TRUE, &
v);
13427 IUIAutomationElement_Release(element2);
13432 hr = IUIAutomationElement_BuildUpdatedCache(
element, cache_req, &element2);
13433 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13434 ok(!!element2,
"element2 == NULL\n");
13437 hr = IUIAutomationElement_GetCachedPropertyValueEx(element2, UIA_RuntimeIdPropertyId,
TRUE, &
v);
13438 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13442 IUIAutomationElement_Release(element2);
13448 hr = IUIAutomationCacheRequest_AddProperty(cache_req, UIA_IsControlElementPropertyId);
13449 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13453 hr = IUIAutomationElement_BuildUpdatedCache(
element, cache_req, &element2);
13454 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13455 ok(!!element2,
"element2 == NULL\n");
13458 hr = IUIAutomationElement_GetCachedPropertyValueEx(element2, UIA_RuntimeIdPropertyId,
TRUE, &
v);
13459 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13464 hr = IUIAutomationElement_GetCachedPropertyValueEx(element2, UIA_IsControlElementPropertyId,
TRUE, &
v);
13465 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13469 IUIAutomationElement_Release(element2);
13470 IUIAutomationCacheRequest_Release(cache_req);
13472 IUIAutomationElement_Release(
element);
13479 hr = IUIAutomation_CreateCacheRequest(
uia_iface, &cache_req);
13480 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13481 ok(!!cache_req,
"cache_req == NULL\n");
13484 hr = IUIAutomationCacheRequest_AddProperty(cache_req, UIA_LabeledByPropertyId);
13485 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13488 hr = IUIAutomationCacheRequest_AddProperty(cache_req, UIA_ControllerForPropertyId);
13489 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13492 hr = IUIAutomationElement_BuildUpdatedCache(
element, cache_req, &element2);
13493 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13494 ok(!!element2,
"element2 == NULL\n");
13500 hr = IUIAutomationElement_GetCachedPropertyValueEx(element2, UIA_RuntimeIdPropertyId,
TRUE, &
v);
13501 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13507 hr = IUIAutomationElement_GetCachedPropertyValueEx(element2, UIA_LabeledByPropertyId,
TRUE, &
v);
13508 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13512 hr = IUnknown_QueryInterface(
V_UNKNOWN(&
v), &IID_IUIAutomationElement, (
void **)&element3);
13513 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13514 ok(!!element3,
"element3 == NULL\n");
13517 hr = IUIAutomationElement_GetCurrentPropertyValueEx(element3, UIA_IsControlElementPropertyId,
TRUE, &
v);
13518 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13520 IUIAutomationElement_Release(element3);
13524 hr = IUIAutomationElement_GetCachedPropertyValueEx(element2, UIA_ControllerForPropertyId,
TRUE, &
v);
13525 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13528 hr = IUnknown_QueryInterface(
V_UNKNOWN(&
v), &IID_IUIAutomationElementArray, (
void **)&elem_arr);
13530 ok(!!elem_arr,
"elem_arr == NULL\n");
13533 hr = IUIAutomationElementArray_get_Length(elem_arr, &
len);
13539 hr = IUIAutomationElementArray_GetElement(elem_arr,
i, &element3);
13541 ok(!!element3,
"element3 == NULL\n");
13543 hr = IUIAutomationElement_GetCurrentPropertyValueEx(element3, UIA_ControlTypePropertyId,
TRUE, &
v);
13544 ok(
hr ==
S_OK,
"elem[%d] Unexpected hr %#lx\n",
i,
hr);
13548 IUIAutomationElement_Release(element3);
13552 IUIAutomationElementArray_Release(elem_arr);
13553 IUIAutomationCacheRequest_Release(cache_req);
13562 IUIAutomationElement_Release(element2);
13567 IUIAutomationElement_Release(
element);
13569 IUnknown_Release(unk_ns);
13577 win_skip(
"Skipping cached UIA_BoundingRectanglePropertyId tests for Win7\n");
13592 hr = IUIAutomation_CreateCacheRequest(
uia_iface, &cache_req);
13593 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13594 ok(!!cache_req,
"cache_req == NULL\n");
13598 hr = IUIAutomationCacheRequest_AddProperty(cache_req, cache_test_props[
i]);
13599 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13606 hr = IUIAutomationElement_BuildUpdatedCache(
element, cache_req, &element2);
13607 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13608 ok(!!element2,
"element2 == NULL\n");
13613 V_I4(&
v) = UIA_HyperlinkControlTypeId;
13619 hr = IUIAutomationElement_BuildUpdatedCache(
element, cache_req, &element3);
13620 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13621 ok(!!element3,
"element3 == NULL\n");
13624 IUIAutomationCacheRequest_Release(cache_req);
13627 hr = IUIAutomationElement_get_CachedHasKeyboardFocus(
element,
NULL);
13630 tmp_bool = 0xdeadbeef;
13631 hr = IUIAutomationElement_get_CachedHasKeyboardFocus(
element, &tmp_bool);
13633 ok(tmp_bool == 0xdeadbeef,
"Unexpected tmp_bool %d\n", tmp_bool);
13635 tmp_bool = 0xdeadbeef;
13636 hr = IUIAutomationElement_get_CachedHasKeyboardFocus(element2, &tmp_bool);
13637 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13638 ok(!tmp_bool,
"tmp_bool != FALSE\n");
13641 hr = IUIAutomationElement_get_CachedHasKeyboardFocus(element3, &tmp_bool);
13642 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13643 ok(!!tmp_bool,
"tmp_bool == FALSE\n");
13646 hr = IUIAutomationElement_get_CachedIsKeyboardFocusable(
element,
NULL);
13649 tmp_bool = 0xdeadbeef;
13650 hr = IUIAutomationElement_get_CachedIsKeyboardFocusable(
element, &tmp_bool);
13652 ok(tmp_bool == 0xdeadbeef,
"Unexpected tmp_bool %d\n", tmp_bool);
13654 tmp_bool = 0xdeadbeef;
13655 hr = IUIAutomationElement_get_CachedIsKeyboardFocusable(element2, &tmp_bool);
13656 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13657 ok(!tmp_bool,
"tmp_bool != FALSE\n");
13660 hr = IUIAutomationElement_get_CachedIsKeyboardFocusable(element3, &tmp_bool);
13661 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13662 ok(!!tmp_bool,
"tmp_bool == FALSE\n");
13668 tmp_bstr = (
void *)0xdeadbeef;
13669 hr = IUIAutomationElement_get_CachedName(
element, &tmp_bstr);
13671 ok(tmp_bstr == (
void *)0xdeadbeef,
"Unexpected BSTR ptr %p\n", tmp_bstr);
13674 hr = IUIAutomationElement_get_CachedName(element2, &tmp_bstr);
13675 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13680 hr = IUIAutomationElement_get_CachedName(element3, &tmp_bstr);
13681 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13686 hr = IUIAutomationElement_get_CachedControlType(
element,
NULL);
13689 tmp_int = 0xdeadbeef;
13690 hr = IUIAutomationElement_get_CachedControlType(
element, &tmp_int);
13692 ok(tmp_int == 0xdeadbeef,
"Unexpected control type %#x\n", tmp_int);
13695 hr = IUIAutomationElement_get_CachedControlType(element2, &tmp_int);
13696 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13697 ok(tmp_int == UIA_CustomControlTypeId,
"Unexpected control type %#x\n", tmp_int);
13700 hr = IUIAutomationElement_get_CachedControlType(element3, &tmp_int);
13701 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13702 ok(tmp_int == UIA_HyperlinkControlTypeId,
"Unexpected control type %#x\n", tmp_int);
13705 hr = IUIAutomationElement_get_CachedBoundingRectangle(
element,
NULL);
13709 hr = IUIAutomationElement_get_CachedBoundingRectangle(
element, &
rect);
13717 hr = IUIAutomationElement_get_CachedBoundingRectangle(element2, &
rect);
13718 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13725 hr = IUIAutomationElement_get_CachedBoundingRectangle(element3, &
rect);
13726 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13729 IUIAutomationElement_Release(element3);
13730 IUIAutomationElement_Release(element2);
13731 IUIAutomationElement_Release(
element);
13817 ULONG exp_release_refcnt)
13819 desc->elem_prov = prov;
13821 desc->exp_refcnt = exp_refcnt;
13822 desc->exp_release_refcnt = exp_release_refcnt;
13825#define test_uia_element_arr( elem_arr, exp_elems, exp_elems_count ) \
13826 test_uia_element_arr_( (elem_arr), (exp_elems), (exp_elems_count), __FILE__, __LINE__)
13833 hr = IUIAutomationElementArray_get_Length(elem_arr, &arr_length);
13834 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13835 ok_(
file,
line)(
hr ==
S_OK,
"IUIAutomationElementArray_get_Length: Unexpected hr %#lx\n",
hr);
13836 ok_(
file,
line)(arr_length == exp_elems_count,
"Unexpected arr_length %d.\n", arr_length);
13838 for (
i = 0;
i < arr_length;
i++)
13841 IUIAutomationElement *
element;
13848 hr = IUIAutomationElementArray_GetElement(elem_arr,
i, &
element);
13849 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13852 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, UIA_ProviderDescriptionPropertyId,
TRUE, &
v);
13856 IUIAutomationElement_Release(
element);
13859 IUIAutomationElementArray_Release(elem_arr);
13861 for (
i = 0;
i < arr_length;
i++)
13872 IUIAutomationCondition *
condition, *condition2;
13875 IUIAutomationElement *
element, *element2;
13876 IUIAutomationElementArray *element_arr;
13877 IUIAutomationCacheRequest *cache_req;
13898 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, UIA_LabeledByPropertyId,
TRUE, &
v);
13899 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13903 hr = IUnknown_QueryInterface(
V_UNKNOWN(&
v), &IID_IUIAutomationElement, (
void **)&element2);
13904 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13905 ok(!!element2,
"element2 == NULL\n");
13910 IUIAutomationElement_Release(
element);
13931 hr = IUIAutomation_CreateCacheRequest(
uia_iface, &cache_req);
13932 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13933 ok(!!cache_req,
"cache_req == NULL\n");
13938 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13941 hr = IUIAutomationCacheRequest_put_TreeFilter(cache_req,
condition);
13942 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13949 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13974 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
13991 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14006 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14009 hr = IUIAutomationElement_GetCurrentPropertyValueEx(element2, UIA_ProviderDescriptionPropertyId,
TRUE, &
v);
14024 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14041 IUIAutomationElement_Release(element2);
14042 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14051 IUIAutomationCondition_Release(
condition);
14056 hr = IUIAutomation_CreatePropertyCondition(
uia_iface, UIA_IsContentElementPropertyId,
v, &
condition);
14057 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14061 hr = IUIAutomationCacheRequest_put_TreeFilter(cache_req,
condition);
14062 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14067 hr = IUIAutomation_CreatePropertyCondition(
uia_iface, UIA_IsControlElementPropertyId,
v, &condition2);
14068 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14069 ok(!!condition2,
"condition2 == NULL\n");
14088 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14115 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14127 hr = IUIAutomationElementArray_GetElement(element_arr, 2, &element2);
14128 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14149 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14150 IUIAutomationElement_Release(element2);
14175 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14194 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14195 ok(Provider_child_child2.ref == 2,
"Unexpected refcnt %ld\n", Provider_child_child2.ref);
14197 hr = IUIAutomationElement_GetCurrentPropertyValueEx(element2, UIA_ProviderDescriptionPropertyId,
TRUE, &
v);
14203 IUIAutomationElement_Release(element2);
14207 IUIAutomationCondition_Release(
condition);
14208 IUIAutomationCondition_Release(condition2);
14209 IUIAutomationCacheRequest_Release(cache_req);
14226 hr = IUIAutomation_CreatePropertyCondition(
uia_iface, UIA_IsContentElementPropertyId,
v, &
condition);
14227 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14231 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14259 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14260 ok(Provider_child_child2.ref == 2,
"Unexpected refcnt %ld\n", Provider_child_child2.ref);
14262 hr = IUIAutomationElement_GetCurrentPropertyValueEx(element2, UIA_ProviderDescriptionPropertyId,
TRUE, &
v);
14268 IUIAutomationElement_Release(element2);
14272 IUIAutomationCondition_Release(
condition);
14273 IUIAutomationElement_Release(
element);
14348 IUIAutomationElement *
element, *element2, *element3;
14349 IUIAutomationCacheRequest *cache_req;
14350 IUIAutomationCondition *cond, *cond2;
14351 IUIAutomationTreeWalker *walker;
14355 hr = IUIAutomation_CreateTrueCondition(
uia_iface, &cond);
14356 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14357 ok(!!cond,
"cond == NULL\n");
14360 walker = (
void *)0xdeadbeef;
14363 ok(!walker,
"walker != NULL\n");
14370 hr = IUIAutomation_CreateTreeWalker(
uia_iface, cond, &walker);
14371 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14372 ok(!!walker,
"walker == NULL\n");
14374 hr = IUIAutomationTreeWalker_get_Condition(walker, &cond2);
14375 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14376 ok(!!cond2,
"cond2 == NULL\n");
14379 IUIAutomationCondition_Release(cond);
14380 IUIAutomationCondition_Release(cond2);
14383 hr = IUIAutomation_CreateCacheRequest(
uia_iface, &cache_req);
14384 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14385 ok(!!cache_req,
"cache_req == NULL\n");
14395 hr = IUIAutomationTreeWalker_GetFirstChildElement(walker,
element,
NULL);
14398 element2 = (
void *)0xdeadbeef;
14399 hr = IUIAutomationTreeWalker_GetFirstChildElement(walker,
NULL, &element2);
14401 ok(!element2,
"element2 != NULL\n");
14405 hr = IUIAutomationTreeWalker_GetFirstChildElement(walker,
element, &element2);
14406 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14408 ok(!!element2,
"element2 == NULL\n");
14411 IUIAutomationElement_Release(element2);
14415 hr = IUIAutomationTreeWalker_GetFirstChildElementBuildCache(walker,
element, cache_req, &element2);
14416 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14418 ok(!!element2,
"element2 == NULL\n");
14423 hr = IUIAutomationTreeWalker_GetNextSiblingElement(walker, element2, &element3);
14424 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14426 ok(!!element3,
"element3 == NULL\n");
14428 IUIAutomationElement_Release(element3);
14432 hr = IUIAutomationTreeWalker_GetNextSiblingElementBuildCache(walker, element2, cache_req, &element3);
14433 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14435 ok(!!element3,
"element3 == NULL\n");
14437 IUIAutomationElement_Release(element3);
14440 IUIAutomationElement_Release(element2);
14445 hr = IUIAutomationTreeWalker_GetLastChildElement(walker,
element, &element2);
14446 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14448 ok(!!element2,
"element2 == NULL\n");
14451 IUIAutomationElement_Release(element2);
14455 hr = IUIAutomationTreeWalker_GetLastChildElementBuildCache(walker,
element, cache_req, &element2);
14456 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14458 ok(!!element2,
"element2 == NULL\n");
14463 hr = IUIAutomationTreeWalker_GetPreviousSiblingElement(walker, element2, &element3);
14464 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14466 ok(!!element3,
"element3 == NULL\n");
14468 IUIAutomationElement_Release(element3);
14472 hr = IUIAutomationTreeWalker_GetPreviousSiblingElementBuildCache(walker, element2, cache_req, &element3);
14473 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14475 ok(!!element3,
"element3 == NULL\n");
14477 IUIAutomationElement_Release(element3);
14483 hr = IUIAutomationTreeWalker_GetParentElement(walker, element2, &element3);
14484 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14486 ok(!!element3,
"element3 == NULL\n");
14488 IUIAutomationElement_Release(element3);
14492 hr = IUIAutomationTreeWalker_GetParentElementBuildCache(walker, element2, cache_req, &element3);
14493 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14495 ok(!!element3,
"element3 == NULL\n");
14497 IUIAutomationElement_Release(element3);
14500 IUIAutomationElement_Release(element2);
14503 IUIAutomationElement_Release(
element);
14506 IUIAutomationCacheRequest_Release(cache_req);
14507 IUIAutomationTreeWalker_Release(walker);
14526 nc_prov->frag_root = &
nc_prov->IRawElementProviderFragmentRoot_iface;
14532 IUIAutomationElement *
element;
14552 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14561 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, UIA_ProviderDescriptionPropertyId,
TRUE, &
v);
14569 IUIAutomationElement_Release(
element);
14584#define test_get_focused_elem( uia_iface, cache_req, exp_hr, exp_node_desc, proxy_cback_count, base_hwnd_cback_count, \
14585 nc_cback_count, win_get_obj_count, child_win_get_obj_count, proxy_cback_todo, \
14586 base_hwnd_cback_todo, nc_cback_todo, win_get_obj_todo, child_win_get_obj_todo ) \
14587 test_get_focused_elem_( (uia_iface), (cache_req), (exp_hr), (exp_node_desc), (proxy_cback_count), (base_hwnd_cback_count), \
14588 (nc_cback_count), (win_get_obj_count), (child_win_get_obj_count), (proxy_cback_todo), \
14589 (base_hwnd_cback_todo), (nc_cback_todo), (win_get_obj_todo), (child_win_get_obj_todo), __FILE__, __LINE__)
14591 struct node_provider_desc *exp_node_desc,
int proxy_cback_count,
int base_hwnd_cback_count,
int nc_cback_count,
14592 int win_get_obj_count,
int child_win_get_obj_count,
BOOL proxy_cback_todo,
BOOL base_hwnd_cback_todo,
14593 BOOL nc_cback_todo,
BOOL win_get_obj_todo,
BOOL child_win_get_obj_todo,
const char *
file,
int line)
14603 SET_EXPECT_MULTI(child_winproc_GETOBJECT_UiaRoot, child_win_get_obj_count);
14619 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
element, UIA_ProviderDescriptionPropertyId,
TRUE, &
v);
14624 IUIAutomationElement_Release(
element);
14634 IUIAutomationCacheRequest *cache_req;
14635 IUIAutomationElement *
element;
14645 hr = IUIAutomation_CreateCacheRequest(
uia_iface, &cache_req);
14646 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14647 ok(!!cache_req,
"cache_req == NULL\n");
14674 hr = IUIAutomation_GetFocusedElementBuildCache(
uia_iface, cache_req,
NULL);
14677 element = (
void *)0xdeadbeef;
14693 test_get_focused_elem(
uia_iface,
NULL,
S_OK, &exp_node_desc, 1, 1, 1, 0, 0,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE);
14694 test_get_focused_elem(
uia_iface, cache_req,
S_OK, &exp_node_desc, 1, 1, 1, 0, 0,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE);
14697 Provider_hwnd.focus_prov = &Provider_hwnd2.IRawElementProviderFragment_iface;
14704 test_get_focused_elem(
uia_iface,
NULL,
S_OK, &exp_node_desc, 2, 1, 2, 1, 0,
TRUE,
FALSE,
FALSE,
FALSE,
FALSE);
14705 test_get_focused_elem(
uia_iface, cache_req,
S_OK, &exp_node_desc, 2, 1, 2, 1, 0,
TRUE,
FALSE,
FALSE,
FALSE,
FALSE);
14722 test_get_focused_elem(
uia_iface,
NULL,
S_OK, &exp_node_desc, 2, 2, 2, 1, 0,
TRUE,
FALSE,
FALSE,
FALSE,
FALSE);
14723 test_get_focused_elem(
uia_iface, cache_req,
S_OK, &exp_node_desc, 2, 2, 2, 1, 0,
TRUE,
FALSE,
FALSE,
FALSE,
FALSE);
14731 Provider_nc.focus_prov = &Provider_nc2.IRawElementProviderFragment_iface;
14733 Provider_nc3.focus_prov = &
Provider_child.IRawElementProviderFragment_iface;
14738 test_get_focused_elem(
uia_iface,
NULL,
S_OK, &exp_node_desc, 2, 3, 2, 2, 1,
TRUE,
FALSE,
FALSE,
TRUE,
FALSE);
14739 test_get_focused_elem(
uia_iface, cache_req,
S_OK, &exp_node_desc, 2, 3, 2, 2, 1,
TRUE,
FALSE,
FALSE,
TRUE,
FALSE);
14751 Provider_proxy.focus_prov = &Provider_child_child.IRawElementProviderFragment_iface;
14766 &exp_node_desc, 2, 2, 2, 1, 0,
TRUE,
FALSE,
FALSE,
FALSE,
FALSE);
14768 &exp_node_desc, 2, 2, 2, 1, 0,
TRUE,
FALSE,
FALSE,
FALSE,
FALSE);
14776 test_get_focused_elem(
uia_iface,
NULL,
S_OK, &exp_node_desc, 1, 1, 1, 0, 0,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE);
14784 IUIAutomationCacheRequest_Release(cache_req);
14792 int win_get_uia_obj_count,
int win_get_client_obj_count)
14802 int base_hwnd_cback_count,
BOOL base_hwnd_cback_todo,
int nc_cback_count,
BOOL nc_cback_todo,
14803 int win_get_uia_obj_count,
BOOL win_get_uia_obj_todo,
int win_get_client_obj_count,
BOOL win_get_client_obj_todo)
14809 if (win_get_client_obj_count)
14814 int win_get_uia_obj_count,
int win_get_client_obj_count)
14824 int base_hwnd_cback_count,
BOOL base_hwnd_cback_todo,
int nc_cback_count,
BOOL nc_cback_todo,
14825 int win_get_uia_obj_count,
BOOL win_get_uia_obj_todo,
int win_get_client_obj_count,
BOOL win_get_client_obj_todo)
14834#define MAX_EVENT_QUEUE_COUNT 4
14844 const int idx =
queue->exp_event_count;
14852 queue->exp_node_desc[
idx] = *exp_node_desc;
14865 queue->exp_event_count++;
14870 if (!
queue->exp_event_count ||
queue->exp_event_pos >=
queue->exp_event_count)
14872 ok(0,
"Failed to pop expected event from queue\n");
14876 return &
queue->exp_node_desc[
queue->exp_event_pos++];
14902#define test_com_event_data( sender ) \
14903 test_com_event_data_( (sender), __FILE__, __LINE__)
14913 hr = IUIAutomationElement_GetCurrentPropertyValueEx(sender, UIA_ProviderDescriptionPropertyId,
TRUE, &
v);
14945 IUIAutomationEventHandler_AddRef(iface);
14962 IUIAutomationElement *sender,
EVENTID event_id)
15007 IUIAutomationFocusChangedEventHandler_AddRef(iface);
15024 IUIAutomationElement *sender)
15028 if (
handler->event_handler_added)
15062 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15076 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15089 IUIAutomationElement *elem2;
15115 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15117 hr = IUIAutomation_RemoveAutomationEventHandler(
uia_iface, UIA_AutomationFocusChangedEventId,
elem,
15119 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15135 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15141 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15150 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15163 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15175 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15191 hr = IUIAutomation_RemoveAutomationEventHandler(
uia_iface, UIA_LiveRegionChangedEventId,
elem,
15193 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15198 hr = IUIAutomationElement_GetCurrentPropertyValueEx(
elem, UIA_LabeledByPropertyId,
TRUE, &
v);
15199 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15203 hr = IUnknown_QueryInterface(
V_UNKNOWN(&
v), &IID_IUIAutomationElement, (
void **)&elem2);
15204 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15205 ok(!!elem2,
"elem2 == NULL\n");
15217 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15221 hr = IUIAutomation_RemoveAutomationEventHandler(
uia_iface, UIA_LiveRegionChangedEventId, elem2,
15223 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15226 hr = IUIAutomation_RemoveAllEventHandlers(
uia_iface);
15227 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15230 IUIAutomationElement_Release(elem2);
15236 IUIAutomationElement *
elem;
15258 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15272 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15280 hr = IUIAutomation_RemoveFocusChangedEventHandler(
uia_iface,
15282 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15294 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15301 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15304 hr = IUIAutomation_RemoveAutomationEventHandler(
uia_iface, UIA_AutomationFocusChangedEventId,
elem,
15306 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15309 IUIAutomationElement_Release(
elem);
15343#define test_hwnd_providers_event_advise_added( main, hwnd, nc, event_id, todo) \
15344 test_hwnd_providers_event_advise_added_( (main), (hwnd), (nc), (event_id), (todo), __FILE__, __LINE__)
15356 IUIAutomationElement *
elem;
15358 int event_handle_count;
15370 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15371 ok(!!
elem,
"elem == NULL\n");
15373 ok(Provider_hwnd2.ref == 2,
"Unexpected refcnt %ld\n", Provider_hwnd2.ref);
15374 ok(Provider_nc2.ref == 2,
"Unexpected refcnt %ld\n", Provider_nc2.ref);
15385 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15393 event_handle_count = 3;
15414 if ((wait_res ==
WAIT_TIMEOUT) && (Provider_nc2.advise_events_added_event_id && Provider_hwnd2.advise_events_added_event_id) &&
15421 win_skip(
"Windows 7 only advises clientside providers of events, skipping further tests.\n");
15422 hr = IUIAutomation_RemoveAutomationEventHandler(
uia_iface, UIA_LiveRegionChangedEventId,
elem,
15424 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15426 IUIAutomationElement_Release(
elem);
15433 ok(wait_res !=
WAIT_TIMEOUT,
"Wait for method_event(s) timed out.\n");
15480 Provider_hwnd3.parent =
NULL;
15492 hr = IUIAutomation_RemoveAutomationEventHandler(
uia_iface, UIA_LiveRegionChangedEventId,
elem,
15494 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15496 IUIAutomationElement_Release(
elem);
15505 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15508 SET_EXPECT(child_winproc_GETOBJECT_UiaRoot);
15512 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15528 event_handle_count++;
15531 SET_EXPECT(child_winproc_GETOBJECT_UiaRoot);
15550 SET_EXPECT(child_winproc_GETOBJECT_UiaRoot);
15557 hr = IUIAutomation_RemoveAutomationEventHandler(
uia_iface, UIA_LiveRegionChangedEventId,
elem,
15559 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15561 IUIAutomationElement_Release(
elem);
15579 SET_EXPECT(child_winproc_GETOBJECT_UiaRoot);
15583 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15597 win_skip(
"Win10v1507 and below advise the currently focused HWND and not the desktop HWND, skipping tests.\n");
15601 hr = IUIAutomation_RemoveFocusChangedEventHandler(
uia_iface,
15603 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15620 event_handle_count = 3;
15644 SET_EXPECT(child_winproc_GETOBJECT_UiaRoot);
15746 "Wait for method_event(s) timed out.\n");
15760 hr = IUIAutomation_RemoveFocusChangedEventHandler(
uia_iface,
15762 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15766 Provider_hwnd3.parent = &Provider_hwnd2.IRawElementProviderFragment_iface;
15795 LONG exp_lbound[2], exp_elems[2];
15802 exp_lbound[0] = exp_lbound[1] = 0;
15803 exp_elems[0] = exp_elems[1] = 1;
15813 HWND test_child_hwnd)
15819 HANDLE event_handles[2];
15831 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15832 ok(!!
node,
"Node == NULL.\n");
15836 SET_EXPECT(child_winproc_GETOBJECT_UiaRoot);
15839 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15840 ok(!!
event,
"event == NULL.\n");
15859 SET_EXPECT(child_winproc_GETOBJECT_UiaRoot);
15864 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15999 win_skip(
"Skipping focus MSAA proxy tests for Win7\n");
16152 hr = IUIAutomation_RemoveFocusChangedEventHandler(
uia_iface,
16154 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
16158 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
16186 IUIAutomationElement *
elem;
16209 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
16210 ok(!!
elem,
"elem == NULL\n");
16212 ok(Provider_hwnd2.ref == 2,
"Unexpected refcnt %ld\n", Provider_hwnd2.ref);
16213 ok(Provider_nc2.ref == 2,
"Unexpected refcnt %ld\n", Provider_nc2.ref);
16218 IUIAutomationElement_Release(
elem);
16226 Provider_hwnd3.parent = &Provider_hwnd2.IRawElementProviderFragment_iface;
16229 hr = IUIAutomation_RemoveAllEventHandlers(
uia_iface);
16230 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
16238 win_skip(
"Skipping COM API WinEvent translation tests for Win7\n");
16270 { &CLSID_CUIAutomation, &IID_IUIAutomation },
16272 { &CLSID_CUIAutomation8, &IID_IUIAutomation },
16273 { &CLSID_CUIAutomation8, &IID_IUIAutomation2 },
16274 { &CLSID_CUIAutomation8, &IID_IUIAutomation3 },
16275 { &CLSID_CUIAutomation8, &IID_IUIAutomation4 },
16276 { &CLSID_CUIAutomation8, &IID_IUIAutomation5 },
16277 { &CLSID_CUIAutomation8, &IID_IUIAutomation6 },
16300 win_skip(
"CLSID_CUIAutomation8 class not registered, skipping further tests.\n");
16313 ok(
hr ==
S_OK,
"Failed to create interface for clsid %s, iid %s, hr %#lx\n",
16315 ok(!!iface,
"iface == NULL\n");
16316 IUnknown_Release(iface);
16325 ok(
hr ==
S_OK,
"Failed to create IUIAutomation interface, hr %#lx\n",
hr);
16330 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
16332 hr = IUIAutomation_get_ReservedNotSupportedValue(
uia_iface, &unk2);
16333 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
16334 ok(
unk1 == unk2,
"unk1 != unk2\n");
16338 hr = IUIAutomation_CheckNotSupported(
uia_iface,
v, &tmp_b);
16339 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
16340 ok(tmp_b ==
TRUE,
"tmp_b != TRUE\n");
16342 IUnknown_Release(
unk1);
16343 IUnknown_Release(unk2);
16346 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
16348 hr = IUIAutomation_get_ReservedMixedAttributeValue(
uia_iface, &unk2);
16349 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
16350 ok(
unk1 == unk2,
"unk1 != unk2\n");
16354 hr = IUIAutomation_CheckNotSupported(
uia_iface,
v, &tmp_b);
16355 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
16356 ok(tmp_b ==
FALSE,
"tmp_b != FALSE\n");
16358 IUnknown_Release(
unk1);
16359 IUnknown_Release(unk2);
16397#define test_node_hwnd_provider( node, hwnd ) \
16398 test_node_hwnd_provider_( (node), (hwnd), __FILE__, __LINE__)
16480 HUIANODE *ret_node)
16482 ULONG main_ref, nc_ref;
16488 main_ref =
main->ref;