1 /*
2  * PROJECT:         ReactOS api tests
3  * LICENSE:         GPLv2+ - See COPYING in the top level directory
4  * PURPOSE:         COM interface test for ieframe 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_IE_SearchBand),
17         {
18             {  -0x30,   &IID_IObjectWithSite },
19             {  -0x28,   &IID_IDeskBand },
20             {  -0x28,       &IID_IDockingWindow },
21             {  -0x28,           &IID_IOleWindow },
22             {  -0x24,   &IID_IInputObject },
23             {  -0x20,   &IID_IPersistStream },
24             {  -0x20,       &IID_IPersist },
25             {  -0x1c,   &IID_IOleCommandTarget },
26             {  -0x18,   &IID_IServiceProvider },
27             {    0x0,   &IID_IContextMenu },
28             {    0x0,       &IID_IUnknown },
29             {    0x8,   &IID_IDispatch },
30             {   0x10,   &IID_IPersistPropertyBag },
31             {   0x8c,   &IID_IBandNavigate },
32         }
33     },
34     {
35         ID_NAME(CLSID_Internet),
36         {
37             {  -0x18,   &IID_IObjectWithBackReferences },
38             {  -0x14,   &IID_IShellFolder2 },
39             {  -0x14,       &IID_IShellFolder },
40             {  -0x10,   &IID_IPersistFolder2 },
41             {  -0x10,       &IID_IPersistFolder },
42             {  -0x10,           &IID_IPersist },
43             {   -0xc,   &IID_IBrowserFrameOptions },
44             {    0x0,   &IID_IContextMenu },
45             {    0x0,       &IID_IUnknown },
46             {    0x4,   &IID_IShellExtInit },
47         }
48     },
49     {
50         ID_NAME(CLSID_CUrlHistory),
51         {
52             {    0x0,   &IID_IUrlHistoryStg2 },
53             {    0x0,       &IID_IUrlHistoryStg },
54             {    0x0,           &IID_IUnknown },
55         }
56     },
57     {
58         ID_NAME(CLSID_CURLSearchHook),
59         {
60             {    0x0,   &IID_IURLSearchHook2 },
61             {    0x0,       &IID_IURLSearchHook },
62             {    0x0,           &IID_IUnknown },
63         }
64     },
65     {
66         ID_NAME(CLSID_InternetShortcut),
67         {
68             {   -0xc,   &IID_IDataObject },
69             {   -0x8,   &IID_IContextMenu2 },
70             {   -0x8,       &IID_IContextMenu },
71             {   -0x4,   &IID_IExtractIconA },
72             {    0x0,   &IID_IExtractIconW },
73             {    0x0,       &IID_IUnknown },
74             {    0x4,   &IID_IPersistFile },
75             {    0x4,       &IID_IPersist },
76             {    0x8,   &IID_IPersistStream },
77             {    0xc,   &IID_IShellExtInit },
78             {   0x10,   &IID_IShellLinkA },
79             {   0x14,   &IID_IShellLinkW },
80             {   0x18,   &IID_IShellPropSheetExt },
81             {   0x1c,   &IID_IPropertySetStorage },
82             {   0x20,   &IID_INewShortcutHookA },
83             {   0x24,   &IID_INewShortcutHookW },
84             {   0x30,   &IID_IQueryInfo },
85             {   0x38,   &IID_IObjectWithSite },
86             {   0x44,   &IID_IOleCommandTarget },
87             {   0x48,   &IID_IServiceProvider },
88             {   0x4c,   &IID_IPropertyStore },
89             {   0x50,   &IID_IInitializeWithFile },
90             {   0x54,   &IID_IInitializeWithBindCtx },
91         }
92     },
93     {
94         ID_NAME(CLSID_ShellUIHelper),
95         {
96             {    0x0,   &IID_IUnknown },
97             {    0xc,   &IID_IObjectWithSite },
98             {   0x10,   &IID_IObjectSafety },
99             {   0x14,   &IID_IShellUIHelper2 },
100             {   0x14,       &IID_IShellUIHelper },
101             {   0x14,           &IID_IDispatch },
102             {   0x18,   &IID_IDispatchEx },
103         }
104     },
105     {
106         ID_NAME(CLSID_ShellNameSpace),
107         {
108             {    0x0,   &IID_IShellNameSpace },
109             {    0x0,       &IID_IShellFavoritesNameSpace },
110             {    0x0,           &IID_IDispatch },
111             {    0x0,               &IID_IUnknown },
112             {    0x4,   &IID_IProvideClassInfo2 },
113             {    0x4,       &IID_IProvideClassInfo },
114             {    0x8,   &IID_IPersistStreamInit },
115             {   0x10,   &IID_IPersistPropertyBag },
116             {   0x14,   &IID_IQuickActivate },
117             {   0x18,   &IID_IOleControl },
118             {   0x1c,   &IID_IOleObject },
119             {   0x20,   &IID_IOleInPlaceActiveObject },
120             {   0x24,   &IID_IViewObjectEx },
121             {   0x24,       &IID_IViewObject2 },
122             {   0x24,           &IID_IViewObject },
123             {   0x28,   &IID_IOleInPlaceObjectWindowless },
124             {   0x28,       &IID_IOleInPlaceObject },
125             {   0x28,           &IID_IOleWindow },
126             {   0x38,   &IID_IConnectionPointContainer },
127             {   0x3c,   &IID_IDropTarget },
128             {   0xb4,   &IID_IObjectWithSite },
129             {   0xbc,   &IID_INSCTree },
130             {   0xc4,   &IID_IShellBrowser },
131             {   0xc8,   &IID_IFolderFilterSite },
132             {   0xcc,   &IID_INewMenuClient },
133             {   0xd0,   &IID_IServiceProvider },
134             {   0xd4,   &IID_INameSpaceTreeControl },
135             {   0xe0,   &IID_IVisualProperties },
136             {   0xe4,   &IID_IWinEventHandler },
137         }
138     },
139     {
140         ID_NAME(CLSID_ShellWindows),
141         {
142             {  -0xa0,   &IID_IMarshal2 },
143             {  -0xa0,       &IID_IMarshal },
144             {  -0x20,   &IID_IClientSecurity },
145             {  -0x18,   &IID_IRpcOptions },
146             {   -0xc,   &IID_ICallFactory },
147             {   -0x8,   &IID_IForegroundTransfer },
148             {    0x0,   &IID_IMultiQI },
149             {    0x0,       &IID_IUnknown },
150             { FARAWY,   &IID_IShellWindows },
151             { FARAWY,   &IID_IDispatch },
152             { FARAWY,   &IID_IConnectionPointContainer },
153         }
154     },
155     {
156         ID_NAME(CLSID_WebBrowser),
157         {
158             {  -0x20,   &IID_IPersist },
159             {  -0x1c,   &IID_IOleObject },
160             {  -0x18,   &IID_IViewObject2 },
161             {  -0x18,       &IID_IViewObject },
162             {  -0x14,   &IID_IDataObject },
163             {  -0x10,   &IID_IOleInPlaceObject },
164             {  -0x10,       &IID_IOleWindow },
165             {   -0xc,   &IID_IOleInPlaceActiveObject },
166             {    0x0,   &IID_IUnknown },
167             {   0x98,   &IID_IPersistStream },
168             {   0x98,   &IID_IPersistStreamInit },
169             {   0x9c,   &IID_IPersistPropertyBag },
170             {   0xa0,   &IID_IOleControl },
171             {   0xa8,   &IID_IProvideClassInfo2 },
172             {   0xa8,       &IID_IProvideClassInfo },
173             {   0xac,   &IID_IConnectionPointContainer },
174             {  0x120,   &IID_IWebBrowser2 },
175             {  0x120,       &IID_IWebBrowserApp },
176             {  0x120,           &IID_IWebBrowser },
177             {  0x120,               &IID_IDispatch },
178             {  0x130,   &IID_IOleCommandTarget },
179             {  0x134,   &IID_IObjectSafety },
180             {  0x13c,   &IID_ITargetEmbedding },
181             {  0x140,   &IID_IPersistStorage },
182             {  0x144,   &IID_IPersistHistory },
183             { FARAWY,   &IID_IShellService },
184             { FARAWY,   &IID_IServiceProvider },
185             { FARAWY,   &IID_IHlinkFrame },
186             { FARAWY,   &IID_IUrlHistoryNotify },
187             { FARAWY,   &IID_ITargetFrame2 },
188             { FARAWY,   &IID_ITargetNotify },
189             { FARAWY,   &IID_ITargetFramePriv2 },
190             { FARAWY,       &IID_ITargetFramePriv },
191             { FARAWY,   &IID_IEFrameAuto },
192             { FARAWY,   &IID_IWebBrowserPriv },
193             { FARAWY,   &IID_IWebBrowserPriv2 },
194             { FARAWY,   &IID_ISecMgrCacheSeedTarget },
195             { FARAWY,   &IID_ITargetFrame },
196         }
197     },
198     {
199         ID_NAME(CLSID_WebBrowser_V1),
200         {
201             {  -0x20,   &IID_IPersist },
202             {  -0x1c,   &IID_IOleObject },
203             {  -0x18,   &IID_IViewObject2 },
204             {  -0x18,       &IID_IViewObject },
205             {  -0x14,   &IID_IDataObject },
206             {  -0x10,   &IID_IOleInPlaceObject },
207             {  -0x10,       &IID_IOleWindow },
208             {   -0xc,   &IID_IOleInPlaceActiveObject },
209             {    0x0,   &IID_IUnknown },
210             {   0x98,   &IID_IPersistStream },
211             {   0x98,   &IID_IPersistStreamInit },
212             {   0x9c,   &IID_IPersistPropertyBag },
213             {   0xa0,   &IID_IOleControl },
214             {   0xa8,   &IID_IProvideClassInfo2 },
215             {   0xa8,       &IID_IProvideClassInfo },
216             {   0xac,   &IID_IConnectionPointContainer },
217             {  0x120,   &IID_IWebBrowser2 },
218             {  0x120,       &IID_IWebBrowserApp },
219             {  0x120,           &IID_IWebBrowser },
220             {  0x120,               &IID_IDispatch },
221             {  0x130,   &IID_IOleCommandTarget },
222             {  0x134,   &IID_IObjectSafety },
223             {  0x13c,   &IID_ITargetEmbedding },
224             {  0x140,   &IID_IPersistStorage },
225             {  0x144,   &IID_IPersistHistory },
226             { FARAWY,   &IID_IShellService },
227             { FARAWY,   &IID_IServiceProvider },
228             { FARAWY,   &IID_IHlinkFrame },
229             { FARAWY,   &IID_IUrlHistoryNotify },
230             { FARAWY,   &IID_ITargetFrame2 },
231             { FARAWY,   &IID_ITargetNotify },
232             { FARAWY,   &IID_ITargetFramePriv2 },
233             { FARAWY,       &IID_ITargetFramePriv },
234             { FARAWY,   &IID_IEFrameAuto },
235             { FARAWY,   &IID_IWebBrowserPriv },
236             { FARAWY,   &IID_IWebBrowserPriv2 },
237             { FARAWY,   &IID_ISecMgrCacheSeedTarget },
238             { FARAWY,   &IID_ITargetFrame },
239         }
240     },
241 };
242 static const INT ExpectedInterfaceCount = RTL_NUMBER_OF(ExpectedInterfaces);
243 
244 START_TEST(ieframe)
245 {
246     TestClasses(L"ieframe", ExpectedInterfaces, ExpectedInterfaceCount);
247 }
248