1 /*
2  * PROJECT:         ReactOS api tests
3  * LICENSE:         GPLv2+ - See COPYING in the top level directory
4  * PURPOSE:         COM interface test for browseui classes
5  * PROGRAMMER:      Thomas Faber <thomas.faber@reactos.org>
6  */
7 
8 #include "com_apitest.h"
9 
10 #define NDEBUG
11 #include <debug.h>
12 
13 static const CLASS_AND_INTERFACES ExpectedInterfaces[] =
14 {
15     {
16         ID_NAME(CLSID_ACLCustomMRU),
17         {
18             {    0x0,   &IID_IEnumString },
19             {    0x0,       &IID_IUnknown },
20             {    0x4,   &IID_IACList },
21         },
22     },
23     {
24         ID_NAME(CLSID_ACLHistory),
25         {
26             {    0x0,   &IID_IEnumString },
27             {    0x0,       &IID_IUnknown },
28         },
29     },
30     {
31         ID_NAME(CLSID_ACLMRU),
32         {
33             {    0x0,   &IID_IEnumString },
34             {    0x0,       &IID_IUnknown },
35             {    0x4,   &IID_IACList },
36         },
37     },
38     {
39         ID_NAME(CLSID_ACLMulti),
40         {
41             {    0x0,   &IID_IEnumString },
42             {    0x0,       &IID_IUnknown },
43             {    0x4,   &IID_IObjMgr },
44             {    0x8,   &IID_IACList },
45         }
46     },
47     {
48         ID_NAME(CLSID_ACListISF),
49         {
50             {    0x0,   &IID_IEnumString },
51             {    0x0,       &IID_IUnknown },
52             {    0x4,   &IID_IACList2 },
53             {    0x4,       &IID_IACList },
54             {    0x8,   &IID_ICurrentWorkingDirectory },
55             {    0xc,   &IID_IShellService },
56             {   0x10,   &IID_IPersistFolder },
57         }
58     },
59     {
60         ID_NAME(CLSID_AddressEditBox),
61         {
62             {    0x0,   &IID_IWinEventHandler },
63             {    0x0,       &IID_IUnknown },
64             {    0x4,   &IID_IDispatch },
65             {    0x8,   &IID_IAddressBand },
66             {    0xc,   &IID_IAddressEditBox },
67             {   0x10,   &IID_IOleCommandTarget },
68             {   0x14,   &IID_IPersistStream },
69             {   0x18,   &IID_IShellService },
70         }
71     },
72     {
73         ID_NAME(CLSID_AugmentedShellFolder),
74         {
75             {    0x0,   &IID_IAugmentedShellFolder2 },
76             {    0x0,       &IID_IAugmentedShellFolder },
77             {    0x0,           &IID_IShellFolder },
78             {    0x0,               &IID_IUnknown },
79             {    0x4,   &IID_IShellService },
80             {    0x8,   &IID_ITranslateShellChangeNotify },
81         }
82     },
83     {
84         ID_NAME(CLSID_AugmentedShellFolder2),
85         {
86             {    0x0,   &IID_IAugmentedShellFolder2 },
87             {    0x0,       &IID_IAugmentedShellFolder },
88             {    0x0,           &IID_IShellFolder },
89             {    0x0,               &IID_IUnknown },
90             {    0x4,   &IID_IShellFolder2 },
91             {    0x8,   &IID_IShellService },
92             {    0xc,   &IID_ITranslateShellChangeNotify },
93             {   0x10,   &IID_IDropTarget },
94         }
95     },
96     {
97         ID_NAME(CLSID_AutoComplete),
98         {
99             {    0x0,   &IID_IAutoComplete2 },
100             {    0x0,       &IID_IAutoComplete },
101             {    0x0,           &IID_IUnknown },
102             {    0x4,   &IID_IAutoCompleteDropDown },
103             {    0x8,   &IID_IEnumString },
104             {    0xc,   &IID_IAccessible },
105             {    0xc,       &IID_IDispatch },
106         }
107     },
108     {
109         ID_NAME(CLSID_BackgroundTaskScheduler),
110         {
111             {    0x0,   &IID_IShellTaskScheduler },
112             {    0x0,       &IID_IUnknown },
113         }
114     },
115     {
116         ID_NAME(CLSID_BandProxy),
117         {
118             {    0x0,   &IID_IBandProxy },
119             {    0x0,       &IID_IUnknown },
120         }
121     },
122     {
123         ID_NAME(CLSID_BandSiteMenu),
124         {
125             {    0x0,   &IID_IContextMenu3 },
126             {    0x0,       &IID_IContextMenu2 },
127             {    0x0,           &IID_IContextMenu },
128             {    0x0,               &IID_IUnknown },
129             {    0x4,   &IID_IShellService },
130         }
131     },
132     {
133         ID_NAME(CLSID_BrandBand),
134         {
135             {    0x0,   &IID_IDeskBand },
136             {    0x0,       &IID_IDockingWindow },
137             {    0x0,           &IID_IOleWindow },
138             {    0x0,               &IID_IUnknown },
139             {    0x4,   &IID_IObjectWithSite },
140             {    0xc,   &IID_IInputObject },
141             {   0x10,   &IID_IPersistStream },
142             {   0x10,       &IID_IPersist },
143             {   0x14,   &IID_IOleCommandTarget },
144             {   0x18,   &IID_IServiceProvider },
145             {   0x30,   &IID_IWinEventHandler },
146             {   0x34,   &IID_IDispatch },
147         }
148     },
149     {
150         ID_NAME(CLSID_BrowserBand),
151         {
152             {  -0x30,   &IID_IDeskBand },
153             {  -0x30,       &IID_IDockingWindow },
154             {  -0x30,           &IID_IOleWindow },
155             {  -0x2c,   &IID_IObjectWithSite },
156             {  -0x24,   &IID_IInputObject },
157             {  -0x20,   &IID_IPersistStream },
158             {  -0x20,       &IID_IPersist },
159             {  -0x1c,   &IID_IOleCommandTarget },
160             {  -0x18,   &IID_IServiceProvider },
161             {    0x0,   &IID_IContextMenu },
162             {    0x0,       &IID_IUnknown },
163             {    0x4,   &IID_IWinEventHandler },
164             {    0x8,   &IID_IDispatch },
165             {   0x10,   &IID_IPersistPropertyBag },
166         },
167     },
168     {
169         ID_NAME(CLSID_CCommonBrowser),
170         {
171             {    0x0,   &IID_IUnknown },
172             {    0xc,   &IID_IShellBrowser },
173             {    0xc,       &IID_IOleWindow },
174             {   0x10,   &IID_IBrowserService3 },
175             {   0x10,       &IID_IBrowserService2 },
176             {   0x10,           &IID_IBrowserService },
177             {   0x14,   &IID_IServiceProvider },
178             {   0x18,   &IID_IOleCommandTarget },
179             {   0x1c,   &IID_IDockingWindowSite },
180             {   0x20,   &IID_IDockingWindowFrame },
181             {   0x24,   &IID_IInputObjectSite },
182             {   0x28,   &IID_IDropTarget },
183             {   0x2c,   &IID_IShellBrowserService },
184         }
185     },
186     {
187         ID_NAME(CLSID_CDockingBarPropertyBag),
188         {
189             {    0x0,   &IID_IPropertyBag },
190             {    0x0,       &IID_IUnknown },
191         },
192     },
193     {
194         ID_NAME(CLSID_CRegTreeOptions),
195         {
196             {    0x0,   &IID_IRegTreeOptions },
197             {    0x0,       &IID_IUnknown },
198             {    0x4,   &IID_IObjectWithSite },
199         }
200     },
201     {
202         ID_NAME(CLSID_CommBand),
203         {
204             {  -0x30,   &IID_IDeskBand },
205             {  -0x30,       &IID_IDockingWindow },
206             {  -0x30,           &IID_IOleWindow },
207             {  -0x2c,   &IID_IObjectWithSite },
208             {  -0x24,   &IID_IInputObject },
209             {  -0x20,   &IID_IPersistStream },
210             {  -0x20,       &IID_IPersist },
211             {  -0x1c,   &IID_IOleCommandTarget },
212             {  -0x18,   &IID_IServiceProvider },
213             {    0x0,   &IID_IContextMenu },
214             {    0x0,       &IID_IUnknown },
215             {    0x4,   &IID_IWinEventHandler },
216             {    0x8,   &IID_IDispatch },
217             {   0x10,   &IID_IPersistPropertyBag },
218         },
219     },
220     {
221         ID_NAME(CLSID_DeskBar),
222         {
223             {  -0xb8,   &IID_IOleCommandTarget },
224             {  -0xb4,   &IID_IServiceProvider },
225             {  -0xb0,   &IID_IDeskBar },
226             {  -0xb0,       &IID_IOleWindow },
227             {  -0xac,   &IID_IInputObjectSite },
228             {  -0xa8,   &IID_IInputObject },
229             {  -0x70,   &IID_IDockingWindow },
230             {  -0x6c,   &IID_IObjectWithSite },
231             {  -0x68,   &IID_IPersistStreamInit },
232             {  -0x68,   &IID_IPersistStream },
233             {  -0x68,       &IID_IPersist },
234             {  -0x64,   &IID_IPersistPropertyBag },
235             {    0x0,   &IID_IUnknown },
236         }
237     },
238     {
239         ID_NAME(CLSID_DeskBarApp),
240         {
241             {  -0xb8,   &IID_IOleCommandTarget },
242             {  -0xb4,   &IID_IServiceProvider },
243             {  -0xb0,   &IID_IDeskBar },
244             {  -0xb0,       &IID_IOleWindow },
245             {  -0xac,   &IID_IInputObjectSite },
246             {  -0xa8,   &IID_IInputObject },
247             {  -0x70,   &IID_IDockingWindow },
248             {  -0x6c,   &IID_IObjectWithSite },
249             {  -0x68,   &IID_IPersistStreamInit },
250             {  -0x68,   &IID_IPersistStream },
251             {  -0x68,       &IID_IPersist },
252             {  -0x64,   &IID_IPersistPropertyBag },
253             {    0x0,   &IID_IUnknown },
254             {    0x8,   &IID_IContextMenu3 },
255             {    0x8,       &IID_IContextMenu2 },
256             {    0x8,           &IID_IContextMenu },
257         }
258     },
259     {
260         ID_NAME(CLSID_GlobalFolderSettings),
261         {
262             {    0x0,   &IID_IGlobalFolderSettings },
263             {    0x0,       &IID_IUnknown },
264         },
265         L"Both"
266     },
267     {
268         ID_NAME(CLSID_ImageListCache),
269         {
270             {    0x0,   &IID_IUnknown },
271         },
272         L"Both"
273     },
274     {
275         ID_NAME(CLSID_ImgCtxThumbnailExtractor),
276         {
277             {    0x0,   &IID_IExtractImage2 },
278             {    0x0,       &IID_IExtractImage },
279             {    0x0,           &IID_IUnknown },
280             {    0x8,   &IID_IPersistFile },
281         },
282         L"Both"
283     },
284     {
285         ID_NAME(CLSID_InternetToolbar),
286         {
287             {  -0x54,   &IID_IOleCommandTarget },
288             {  -0x50,   &IID_IServiceProvider },
289             {  -0x4c,   &IID_IDeskBar },
290             {  -0x4c,       &IID_IOleWindow },
291             {  -0x48,   &IID_IInputObjectSite },
292             {  -0x44,   &IID_IInputObject },
293             {   -0xc,   &IID_IDockingWindow },
294             {   -0x8,   &IID_IObjectWithSite },
295             {   -0x4,   &IID_IExplorerToolbar },
296             {    0x0,   &DIID_DWebBrowserEvents },
297             {    0x0,   &IID_IDispatch },
298             {    0x0,       &IID_IUnknown },
299             {    0x4,   &IID_IPersistStreamInit },
300             {    0x8,   &IID_IShellChangeNotify },
301         }
302     },
303     {
304         ID_NAME(CLSID_ProgressDialog),
305         {
306             {    0x0,   &IID_IProgressDialog },
307             {    0x0,       &IID_IUnknown },
308             {    0x4,   &IID_IOleWindow },
309             {    0x8,   &IID_IActionProgressDialog },
310             {    0xc,   &IID_IActionProgress },
311             {   0x10,   &IID_IObjectWithSite },
312         },
313         L"Both"
314     },
315     {
316         ID_NAME(CLSID_RebarBandSite),
317         {
318             {    0x0,   &IID_IUnknown },
319             {    0xc,   &IID_IBandSite },
320             {   0x10,   &IID_IInputObjectSite },
321             {   0x14,   &IID_IInputObject },
322             {   0x18,   &IID_IDeskBarClient },
323             {   0x18,       &IID_IOleWindow },
324             {   0x1c,   &IID_IWinEventHandler },
325             {   0x20,   &IID_IPersistStream },
326             {   0x20,       &IID_IPersist },
327             {   0x24,   &IID_IDropTarget },
328             {   0x28,   &IID_IServiceProvider },
329             {   0x2c,   &IID_IBandSiteHelper },
330             {   0x30,   &IID_IOleCommandTarget },
331         }
332     },
333     {
334         ID_NAME(CLSID_SH_AddressBand),
335         {
336             {    0x0,   &IID_IDeskBand },
337             {    0x0,       &IID_IDockingWindow },
338             {    0x0,           &IID_IOleWindow },
339             {    0x0,               &IID_IUnknown },
340             {    0x4,   &IID_IObjectWithSite },
341             {    0xc,   &IID_IInputObject },
342             {   0x10,   &IID_IPersistStream },
343             {   0x10,       &IID_IPersist },
344             {   0x14,   &IID_IOleCommandTarget },
345             {   0x18,   &IID_IServiceProvider },
346             {   0x30,   &IID_IWinEventHandler },
347             {   0x34,   &IID_IAddressBand },
348             {   0x38,   &IID_IInputObjectSite },
349         }
350     },
351     {
352         ID_NAME(CLSID_SH_SearchBand),
353         {
354             {    0x0,   &IID_IUnknown },
355             {   0x74,   &IID_IOleContainer },
356             {   0x78,   &IID_IOleInPlaceFrame },
357             //{   0x78,       &IID_IOleInPlaceUIWindow },
358             {   0x78,           &IID_IOleWindow },
359             {   0xb0,   &IID_IDeskBand },
360             {   0xb0,       &IID_IDockingWindow },
361             {   0xb4,   &IID_IInputObject },
362             {   0xb8,   &IID_IObjectWithSite },
363             {   0xbc,   &IID_IContextMenu },
364             {   0xc0,   &IID_IServiceProvider },
365             {   0xc8,   &IID_ISearchBar },
366             {   0xcc,   &IID_IFileSearchBand },
367             {   0xcc,       &IID_IDispatch },
368             {   0xd0,   &IID_IBandNavigate },
369             {   0xd8,   &IID_IPersist },
370         }
371     },
372     {
373         ID_NAME(CLSID_SharedTaskScheduler),
374         {
375             {    0x0,   &IID_IShellTaskScheduler },
376             {    0x0,       &IID_IUnknown },
377         }
378     },
379     {
380         ID_NAME(CLSID_ShellSearchExt),
381         {
382             {    0x0,   &IID_IContextMenu },
383             {    0x0,       &IID_IUnknown },
384             {    0x4,   &IID_IObjectWithSite },
385         }
386     },
387     {
388         ID_NAME(CLSID_ShellTaskScheduler),
389         {
390             {    0x0,   &IID_IShellTaskScheduler },
391             {    0x0,       &IID_IUnknown },
392         },
393     },
394     {
395         ID_NAME(CLSID_UserAssist),
396         {
397             {    0x0,   &IID_IUnknown },
398         },
399         L"Both"
400     },
401     {
402         ID_NAME(CLSID_WebSearchExt),
403         {
404             {    0x0,   &IID_IContextMenu },
405             {    0x0,       &IID_IUnknown },
406             {    0x4,   &IID_IObjectWithSite },
407         },
408     },
409 };
410 static const INT ExpectedInterfaceCount = RTL_NUMBER_OF(ExpectedInterfaces);
411 
412 START_TEST(browseui)
413 {
414     TestClasses(L"browseui", ExpectedInterfaces, ExpectedInterfaceCount);
415 }
416