OLD | NEW |
| (Empty) |
1 // Copyright 2010 Google Inc. | |
2 // | |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 // you may not use this file except in compliance with the License. | |
5 // You may obtain a copy of the License at | |
6 // | |
7 // http://www.apache.org/licenses/LICENSE-2.0 | |
8 // | |
9 // Unless required by applicable law or agreed to in writing, software | |
10 // distributed under the License is distributed on an "AS IS" BASIS, | |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 // See the License for the specific language governing permissions and | |
13 // limitations under the License. | |
14 // ======================================================================== | |
15 // | |
16 // Tests the constants that vary depending on the customization of Omaha. | |
17 // The test checks for the Google Update variations, but can be modified for | |
18 // your purposes. | |
19 | |
20 #include <windows.h> | |
21 #include <tchar.h> | |
22 #include <atlbase.h> | |
23 #include <oleauto.h> | |
24 #include "omaha/base/browser_utils.h" | |
25 #include "omaha/base/utils.h" | |
26 #include "omaha/common/const_goopdate.h" | |
27 #include "goopdate/omaha3_idl.h" | |
28 #include "omaha/testing/omaha_customization_test.h" | |
29 | |
30 // TODO(omaha): Add tests for to detect interface changes that would require | |
31 // rolling _OMAHA3_IDL_PROXY_CLSID_IS. These include: | |
32 // 1) interface changes invovlving the number or signature of methods | |
33 // 2) or that new interfaces have been added | |
34 // For #2, we already have the InvalidIndex test for interfaces in the TypeLib, | |
35 // so we just need to add checks for interfaces not in the TypeLib. | |
36 // | |
37 // ITypeLib and ITypeInfo methods might be useful. See: | |
38 // http://msdn.microsoft.com/en-us/library/aa912648.aspx | |
39 // http://msdn.microsoft.com/en-us/library/aa909031.aspx | |
40 // | |
41 // I do not know how to get information about interfaces not in a TypeLib. | |
42 // Fortunately, most Omaha 3 interfaces are in one. | |
43 // | |
44 // If we can not get all the information we need, we can always save a "golden" | |
45 // idl.h file and diff against it. | |
46 | |
47 | |
48 // Most of the tests are intentionally not using the omaha namespace. Most of | |
49 // the values being tested are not in this namespace, and being in the global | |
50 // namespace is required by TEST_GU_INT_F to catch conflicts with Google types | |
51 // when building non-Google versions. | |
52 | |
53 class OmahaCustomizationGoopdateComInterfaceTest | |
54 : public OmahaCustomizationTypeLibComInterfaceTest { | |
55 protected: | |
56 OmahaCustomizationGoopdateComInterfaceTest() | |
57 : OmahaCustomizationTypeLibComInterfaceTest(omaha::kOmahaDllName) { | |
58 } | |
59 }; | |
60 | |
61 // Fixture for testing interfaces that are not in a TypeLib. | |
62 // We can only verify the uuid of the interfaces and classes. | |
63 class OmahaCustomizationGoopdateComInterfaceNoTypeLibTest | |
64 : public testing::Test { | |
65 }; | |
66 | |
67 // | |
68 // Omaha 3 COM Constants. | |
69 // | |
70 | |
71 namespace omaha { | |
72 | |
73 // TODO(omaha): We should probably move these to a separate | |
74 // const_com_customization.h in goopdate\. | |
75 TEST(OmahaCustomizationTest, Constants_ComProgIds) { | |
76 EXPECT_GU_STREQ(_T("GoogleUpdate.OnDemandCOMClassUser"), kProgIDOnDemandUser); | |
77 EXPECT_GU_STREQ(_T("GoogleUpdate.OnDemandCOMClassMachine"), | |
78 kProgIDOnDemandMachine); | |
79 EXPECT_GU_STREQ(_T("GoogleUpdate.OnDemandCOMClassSvc"), kProgIDOnDemandSvc); | |
80 | |
81 EXPECT_GU_STREQ(_T("GoogleUpdate.Update3WebUser"), kProgIDUpdate3WebUser); | |
82 EXPECT_GU_STREQ(_T("GoogleUpdate.Update3WebMachine"), | |
83 kProgIDUpdate3WebMachine); | |
84 EXPECT_GU_STREQ(_T("GoogleUpdate.Update3WebSvc"), kProgIDUpdate3WebSvc); | |
85 | |
86 EXPECT_GU_STREQ(_T("GoogleUpdate.CoreClass"), kProgIDGoogleUpdateCoreService); | |
87 | |
88 EXPECT_GU_STREQ(_T("GoogleUpdate.ProcessLauncher"), kProgIDProcessLauncher); | |
89 } | |
90 | |
91 } // namespace omaha | |
92 | |
93 // | |
94 // Omaha 3 COM Interfaces Enums. | |
95 // | |
96 | |
97 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, BrowserType) { | |
98 EXPECT_EQ(0, BROWSER_UNKNOWN); | |
99 EXPECT_EQ(1, BROWSER_DEFAULT); | |
100 EXPECT_EQ(2, BROWSER_INTERNET_EXPLORER); | |
101 EXPECT_EQ(3, BROWSER_FIREFOX); | |
102 EXPECT_EQ(4, BROWSER_CHROME); | |
103 } | |
104 | |
105 // There are two different BrowserType definitions, one in the IDL and one | |
106 // in browser_utils. Verify they are identical. | |
107 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, | |
108 BrowserType_DefinitionsMatch) { | |
109 EXPECT_EQ(::BROWSER_UNKNOWN, omaha::BROWSER_UNKNOWN); | |
110 EXPECT_EQ(::BROWSER_DEFAULT, omaha::BROWSER_DEFAULT); | |
111 EXPECT_EQ(::BROWSER_INTERNET_EXPLORER, omaha::BROWSER_IE); | |
112 EXPECT_EQ(::BROWSER_FIREFOX, omaha::BROWSER_FIREFOX); | |
113 EXPECT_EQ(::BROWSER_CHROME, omaha::BROWSER_CHROME); | |
114 | |
115 EXPECT_EQ(::BROWSER_CHROME + 1, omaha::BROWSER_MAX) | |
116 << _T("A browser has been added without updating test and/or the IDL"); | |
117 } | |
118 | |
119 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, CurrentState) { | |
120 EXPECT_EQ(1, STATE_INIT); | |
121 EXPECT_EQ(2, STATE_WAITING_TO_CHECK_FOR_UPDATE); | |
122 EXPECT_EQ(3, STATE_CHECKING_FOR_UPDATE); | |
123 EXPECT_EQ(4, STATE_UPDATE_AVAILABLE); | |
124 EXPECT_EQ(5, STATE_WAITING_TO_DOWNLOAD); | |
125 EXPECT_EQ(6, STATE_RETRYING_DOWNLOAD); | |
126 EXPECT_EQ(7, STATE_DOWNLOADING); | |
127 EXPECT_EQ(8, STATE_DOWNLOAD_COMPLETE); | |
128 EXPECT_EQ(9, STATE_EXTRACTING); | |
129 EXPECT_EQ(10, STATE_APPLYING_DIFFERENTIAL_PATCH); | |
130 EXPECT_EQ(11, STATE_READY_TO_INSTALL); | |
131 EXPECT_EQ(12, STATE_WAITING_TO_INSTALL); | |
132 EXPECT_EQ(13, STATE_INSTALLING); | |
133 EXPECT_EQ(14, STATE_INSTALL_COMPLETE); | |
134 EXPECT_EQ(15, STATE_PAUSED); | |
135 EXPECT_EQ(16, STATE_NO_UPDATE); | |
136 EXPECT_EQ(17, STATE_ERROR); | |
137 } | |
138 | |
139 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, InstallPriority) { | |
140 EXPECT_EQ(0, INSTALL_PRIORITY_LOW); | |
141 EXPECT_EQ(10, INSTALL_PRIORITY_HIGH); | |
142 } | |
143 | |
144 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, PostInstallAction) { | |
145 EXPECT_EQ(0, POST_INSTALL_ACTION_DEFAULT); | |
146 EXPECT_EQ(1, POST_INSTALL_ACTION_EXIT_SILENTLY); | |
147 EXPECT_EQ(2, POST_INSTALL_ACTION_LAUNCH_COMMAND); | |
148 EXPECT_EQ(3, POST_INSTALL_ACTION_EXIT_SILENTLY_ON_LAUNCH_COMMAND); | |
149 EXPECT_EQ(4, POST_INSTALL_ACTION_RESTART_BROWSER); | |
150 EXPECT_EQ(5, POST_INSTALL_ACTION_RESTART_ALL_BROWSERS); | |
151 EXPECT_EQ(6, POST_INSTALL_ACTION_REBOOT); | |
152 } | |
153 | |
154 // | |
155 // Omaha 3 COM Interfaces. | |
156 // | |
157 | |
158 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, TypeLib) { | |
159 EXPECT_GU_ID_EQ(_T("{655DD85A-3C0D-4674-9C58-AF7168C5861E}"), | |
160 LIBID_GoogleUpdate3Lib); | |
161 | |
162 EXPECT_SUCCEEDED(GetDocumentation(-1)); | |
163 EXPECT_STREQ(_T("GoogleUpdate3Lib"), item_name_); | |
164 EXPECT_GU_STREQ(_T("Google Update 3.0 Type Library"), item_doc_string_); | |
165 EXPECT_EQ(0, help_context_); | |
166 EXPECT_TRUE(!help_file_); | |
167 } | |
168 | |
169 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, IGoogleUpdate3) { | |
170 // TODO(omaha): Test uuid constants after extracting from IDLs. | |
171 EXPECT_GU_ID_EQ(_T("{6DB17455-4E85-46e7-9D23-E555E4B005AF}"), | |
172 __uuidof(IGoogleUpdate3)); | |
173 | |
174 EXPECT_SUCCEEDED(GetDocumentation(0)); | |
175 EXPECT_STREQ(_T("IGoogleUpdate3"), item_name_); | |
176 EXPECT_STREQ(_T("IGoogleUpdate3 Interface"), item_doc_string_); | |
177 EXPECT_EQ(0, help_context_); | |
178 EXPECT_TRUE(!help_file_); | |
179 } | |
180 | |
181 // The IAppBundle interface name does not change for non-Google builds, but the | |
182 // ID must. The same is true for many of the interfaces. | |
183 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, IAppBundle) { | |
184 EXPECT_GU_ID_EQ(_T("{313cfb25-4888-4fc6-9e19-764d8c5fc8f8}"), | |
185 __uuidof(IAppBundle)); | |
186 | |
187 EXPECT_SUCCEEDED(GetDocumentation(1)); | |
188 EXPECT_STREQ(_T("IAppBundle"), item_name_); | |
189 EXPECT_STREQ(_T("IAppBundle Interface"), item_doc_string_); | |
190 EXPECT_EQ(0, help_context_); | |
191 EXPECT_TRUE(!help_file_); | |
192 } | |
193 | |
194 // This appears in the typelib for unknown reasons. | |
195 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, ULONG_PTR) { | |
196 EXPECT_SUCCEEDED(GetDocumentation(2)); | |
197 EXPECT_STREQ(_T("ULONG_PTR"), item_name_); | |
198 EXPECT_TRUE(!item_doc_string_); | |
199 EXPECT_EQ(0, help_context_); | |
200 EXPECT_TRUE(!help_file_); | |
201 } | |
202 | |
203 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, IApp) { | |
204 EXPECT_GU_ID_EQ(_T("{D999CE21-98B3-4894-BACB-A49A1D50848F}"), | |
205 __uuidof(IApp)); | |
206 | |
207 EXPECT_SUCCEEDED(GetDocumentation(3)); | |
208 EXPECT_STREQ(_T("IApp"), item_name_); | |
209 EXPECT_STREQ(_T("IApp Interface"), item_doc_string_); | |
210 EXPECT_EQ(0, help_context_); | |
211 EXPECT_TRUE(!help_file_); | |
212 } | |
213 | |
214 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, IAppVersion) { | |
215 EXPECT_GU_ID_EQ(_T("{BCDCB538-01C0-46d1-A6A7-52F4D021C272}"), | |
216 __uuidof(IAppVersion)); | |
217 | |
218 EXPECT_SUCCEEDED(GetDocumentation(4)); | |
219 EXPECT_STREQ(_T("IAppVersion"), item_name_); | |
220 EXPECT_STREQ(_T("IAppVersion Interface"), item_doc_string_); | |
221 EXPECT_EQ(0, help_context_); | |
222 EXPECT_TRUE(!help_file_); | |
223 } | |
224 | |
225 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, IPackage) { | |
226 EXPECT_GU_ID_EQ(_T("{DCAB8386-4F03-4dbd-A366-D90BC9F68DE6}"), | |
227 __uuidof(IPackage)); | |
228 | |
229 EXPECT_SUCCEEDED(GetDocumentation(5)); | |
230 EXPECT_STREQ(_T("IPackage"), item_name_); | |
231 EXPECT_STREQ(_T("IPackage Interface"), item_doc_string_); | |
232 EXPECT_EQ(0, help_context_); | |
233 EXPECT_TRUE(!help_file_); | |
234 } | |
235 | |
236 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, ICurrentState) { | |
237 EXPECT_GU_ID_EQ(_T("{247954F9-9EDC-4E68-8CC3-150C2B89EADF}"), | |
238 __uuidof(ICurrentState)); | |
239 | |
240 EXPECT_SUCCEEDED(GetDocumentation(6)); | |
241 EXPECT_STREQ(_T("ICurrentState"), item_name_); | |
242 EXPECT_STREQ(_T("ICurrentState Interface"), item_doc_string_); | |
243 EXPECT_EQ(0, help_context_); | |
244 EXPECT_TRUE(!help_file_); | |
245 } | |
246 | |
247 // Not in the TypeLib because it derives from IUnknown. | |
248 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, | |
249 IRegistrationUpdateHook) { | |
250 EXPECT_GU_ID_EQ(_T("{4E223325-C16B-4eeb-AEDC-19AA99A237FA}"), | |
251 __uuidof(IRegistrationUpdateHook)); | |
252 } | |
253 | |
254 // Not in the TypeLib because it derives from IUnknown. | |
255 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, ICoCreateAsync) { | |
256 EXPECT_GU_ID_EQ(_T("{DAB1D343-1B2A-47f9-B445-93DC50704BFE}"), | |
257 __uuidof(ICoCreateAsync)); | |
258 } | |
259 | |
260 // Not in the TypeLib because it derives from IUnknown. | |
261 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, ICredentialDialog) { | |
262 EXPECT_GU_ID_EQ(_T("{b3a47570-0a85-4aea-8270-529d47899603}"), | |
263 __uuidof(ICredentialDialog)); | |
264 } | |
265 | |
266 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, IGoogleUpdate3Web) { | |
267 EXPECT_GU_ID_EQ(_T("{494B20CF-282E-4BDD-9F5D-B70CB09D351E}"), | |
268 __uuidof(IGoogleUpdate3Web)); | |
269 | |
270 EXPECT_SUCCEEDED(GetDocumentation(7)); | |
271 EXPECT_STREQ(_T("IGoogleUpdate3Web"), item_name_); | |
272 EXPECT_STREQ(_T("IGoogleUpdate3Web Interface"), item_doc_string_); | |
273 EXPECT_EQ(0, help_context_); | |
274 EXPECT_TRUE(!help_file_); | |
275 } | |
276 | |
277 // Not in the TypeLib because it derives from IUnknown. | |
278 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, | |
279 IGoogleUpdate3WebSecurity) { | |
280 EXPECT_GU_ID_EQ(_T("{2D363682-561D-4c3a-81C6-F2F82107562A}"), | |
281 __uuidof(IGoogleUpdate3WebSecurity)); | |
282 } | |
283 | |
284 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, IAppBundleWeb) { | |
285 EXPECT_GU_ID_EQ(_T("{DD42475D-6D46-496a-924E-BD5630B4CBBA}"), | |
286 __uuidof(IAppBundleWeb)); | |
287 | |
288 EXPECT_SUCCEEDED(GetDocumentation(8)); | |
289 EXPECT_STREQ(_T("IAppBundleWeb"), item_name_); | |
290 EXPECT_STREQ(_T("IAppBundleWeb Interface"), item_doc_string_); | |
291 EXPECT_EQ(0, help_context_); | |
292 EXPECT_TRUE(!help_file_); | |
293 } | |
294 | |
295 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, IAppWeb) { | |
296 EXPECT_GU_ID_EQ(_T("{C6398F88-69CE-44ac-B6A7-1D3E2AA46679}"), | |
297 __uuidof(IAppWeb)); | |
298 | |
299 EXPECT_SUCCEEDED(GetDocumentation(9)); | |
300 EXPECT_STREQ(_T("IAppWeb"), item_name_); | |
301 EXPECT_STREQ(_T("IAppWeb Interface"), item_doc_string_); | |
302 EXPECT_EQ(0, help_context_); | |
303 EXPECT_TRUE(!help_file_); | |
304 } | |
305 | |
306 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, IAppVersionWeb) { | |
307 EXPECT_GU_ID_EQ(_T("{0CD01D1E-4A1C-489d-93B9-9B6672877C57}"), | |
308 __uuidof(IAppVersionWeb)); | |
309 | |
310 EXPECT_SUCCEEDED(GetDocumentation(10)); | |
311 EXPECT_STREQ(_T("IAppVersionWeb"), item_name_); | |
312 EXPECT_STREQ(_T("IAppVersionWeb Interface"), item_doc_string_); | |
313 EXPECT_EQ(0, help_context_); | |
314 EXPECT_TRUE(!help_file_); | |
315 } | |
316 | |
317 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, ICoCreateAsyncStatus) { | |
318 EXPECT_GU_ID_EQ(_T("{2E629606-312A-482f-9B12-2C4ABF6F0B6D}"), | |
319 __uuidof(ICoCreateAsyncStatus)); | |
320 | |
321 EXPECT_SUCCEEDED(GetDocumentation(11)); | |
322 EXPECT_STREQ(_T("ICoCreateAsyncStatus"), item_name_); | |
323 EXPECT_STREQ(_T("ICoCreateAsyncStatus Interface"), item_doc_string_); | |
324 EXPECT_EQ(0, help_context_); | |
325 EXPECT_TRUE(!help_file_); | |
326 } | |
327 | |
328 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
329 GoogleUpdate3UserClass) { | |
330 EXPECT_GU_ID_EQ(_T("{022105BD-948A-40c9-AB42-A3300DDF097F}"), | |
331 __uuidof(GoogleUpdate3UserClass)); | |
332 | |
333 EXPECT_SUCCEEDED(GetDocumentation(12)); | |
334 EXPECT_STREQ(_T("GoogleUpdate3UserClass"), item_name_); | |
335 EXPECT_STREQ(_T("GoogleUpdate3 Class for per-user applications"), | |
336 item_doc_string_); | |
337 EXPECT_EQ(0, help_context_); | |
338 EXPECT_TRUE(!help_file_); | |
339 } | |
340 | |
341 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
342 GoogleUpdate3ServiceClass) { | |
343 EXPECT_GU_ID_EQ(_T("{4EB61BAC-A3B6-4760-9581-655041EF4D69}"), | |
344 __uuidof(GoogleUpdate3ServiceClass)); | |
345 | |
346 EXPECT_SUCCEEDED(GetDocumentation(13)); | |
347 EXPECT_STREQ(_T("GoogleUpdate3ServiceClass"), item_name_); | |
348 EXPECT_STREQ(_T("GoogleUpdate3 Service Class for machine applications"), | |
349 item_doc_string_); | |
350 EXPECT_EQ(0, help_context_); | |
351 EXPECT_TRUE(!help_file_); | |
352 } | |
353 | |
354 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
355 GoogleUpdate3WebUserClass) { | |
356 EXPECT_GU_ID_EQ(_T("{22181302-A8A6-4f84-A541-E5CBFC70CC43}"), | |
357 __uuidof(GoogleUpdate3WebUserClass)); | |
358 | |
359 EXPECT_SUCCEEDED(GetDocumentation(14)); | |
360 EXPECT_STREQ(_T("GoogleUpdate3WebUserClass"), item_name_); | |
361 EXPECT_STREQ(_T("GoogleUpdate3Web for user applications"), | |
362 item_doc_string_); | |
363 EXPECT_EQ(0, help_context_); | |
364 EXPECT_TRUE(!help_file_); | |
365 } | |
366 | |
367 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
368 GoogleUpdate3WebMachineClass) { | |
369 EXPECT_GU_ID_EQ(_T("{8A1D4361-2C08-4700-A351-3EAA9CBFF5E4}"), | |
370 __uuidof(GoogleUpdate3WebMachineClass)); | |
371 | |
372 EXPECT_SUCCEEDED(GetDocumentation(15)); | |
373 EXPECT_STREQ(_T("GoogleUpdate3WebMachineClass"), item_name_); | |
374 EXPECT_STREQ( | |
375 _T("Pass-through broker for the GoogleUpdate3WebServiceClass"), | |
376 item_doc_string_); | |
377 EXPECT_EQ(0, help_context_); | |
378 EXPECT_TRUE(!help_file_); | |
379 } | |
380 | |
381 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
382 GoogleUpdate3WebServiceClass) { | |
383 EXPECT_GU_ID_EQ(_T("{534F5323-3569-4f42-919D-1E1CF93E5BF6}"), | |
384 __uuidof(GoogleUpdate3WebServiceClass)); | |
385 | |
386 EXPECT_SUCCEEDED(GetDocumentation(16)); | |
387 EXPECT_STREQ(_T("GoogleUpdate3WebServiceClass"), item_name_); | |
388 EXPECT_STREQ(_T("GoogleUpdate3Web"), item_doc_string_); | |
389 EXPECT_EQ(0, help_context_); | |
390 EXPECT_TRUE(!help_file_); | |
391 } | |
392 | |
393 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
394 GoogleUpdate3WebMachineFallbackClass) { | |
395 EXPECT_GU_ID_EQ(_T("{598FE0E5-E02D-465d-9A9D-37974A28FD42}"), | |
396 __uuidof(GoogleUpdate3WebMachineFallbackClass)); | |
397 | |
398 EXPECT_SUCCEEDED(GetDocumentation(17)); | |
399 EXPECT_STREQ(_T("GoogleUpdate3WebMachineFallbackClass"), item_name_); | |
400 EXPECT_STREQ(L"Fallback mechanism if GoogleUpdate3WebServiceClass fails", | |
401 item_doc_string_); | |
402 EXPECT_EQ(0, help_context_); | |
403 EXPECT_TRUE(!help_file_); | |
404 } | |
405 | |
406 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
407 CurrentStateUserClass) { | |
408 EXPECT_GU_ID_EQ(_T("{E8CF3E55-F919-49d9-ABC0-948E6CB34B9F}"), | |
409 __uuidof(CurrentStateUserClass)); | |
410 | |
411 EXPECT_SUCCEEDED(GetDocumentation(18)); | |
412 EXPECT_STREQ(_T("CurrentStateUserClass"), item_name_); | |
413 EXPECT_STREQ(_T("CurrentStateUserClass"), item_doc_string_); | |
414 EXPECT_EQ(0, help_context_); | |
415 EXPECT_TRUE(!help_file_); | |
416 } | |
417 | |
418 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
419 CurrentStateMachineClass) { | |
420 EXPECT_GU_ID_EQ(_T("{9D6AA569-9F30-41ad-885A-346685C74928}"), | |
421 __uuidof(CurrentStateMachineClass)); | |
422 | |
423 EXPECT_SUCCEEDED(GetDocumentation(19)); | |
424 EXPECT_STREQ(_T("CurrentStateMachineClass"), item_name_); | |
425 EXPECT_STREQ(_T("CurrentStateMachineClass"), item_doc_string_); | |
426 EXPECT_EQ(0, help_context_); | |
427 EXPECT_TRUE(!help_file_); | |
428 } | |
429 | |
430 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
431 CoCreateAsyncClass) { | |
432 EXPECT_GU_ID_EQ(_T("{7DE94008-8AFD-4c70-9728-C6FBFFF6A73E}"), | |
433 __uuidof(CoCreateAsyncClass)); | |
434 | |
435 EXPECT_SUCCEEDED(GetDocumentation(20)); | |
436 EXPECT_STREQ(_T("CoCreateAsyncClass"), item_name_); | |
437 EXPECT_STREQ(_T("CoCreateAsyncClass"), item_doc_string_); | |
438 EXPECT_EQ(0, help_context_); | |
439 EXPECT_TRUE(!help_file_); | |
440 } | |
441 | |
442 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
443 CredentialDialogUserClass) { | |
444 EXPECT_GU_ID_EQ(_T("{e67be843-bbbe-4484-95fb-05271ae86750}"), | |
445 __uuidof(CredentialDialogUserClass)); | |
446 | |
447 EXPECT_SUCCEEDED(GetDocumentation(21)); | |
448 EXPECT_STREQ(_T("CredentialDialogUserClass"), item_name_); | |
449 EXPECT_STREQ(_T("CredentialDialogUserClass"), item_doc_string_); | |
450 EXPECT_EQ(0, help_context_); | |
451 EXPECT_TRUE(!help_file_); | |
452 } | |
453 | |
454 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
455 CredentialDialogMachineClass) { | |
456 EXPECT_GU_ID_EQ(_T("{25461599-633d-42b1-84fb-7cd68d026e53}"), | |
457 __uuidof(CredentialDialogMachineClass)); | |
458 | |
459 EXPECT_SUCCEEDED(GetDocumentation(22)); | |
460 EXPECT_STREQ(_T("CredentialDialogMachineClass"), item_name_); | |
461 EXPECT_STREQ(_T("CredentialDialogMachineClass"), item_doc_string_); | |
462 EXPECT_EQ(0, help_context_); | |
463 EXPECT_TRUE(!help_file_); | |
464 } | |
465 | |
466 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
467 GoogleComProxyMachineClass) { | |
468 EXPECT_SUCCEEDED(GetDocumentation(23)); | |
469 EXPECT_STREQ(_T("GoogleComProxyMachineClass"), item_name_); | |
470 EXPECT_STREQ(_T("GoogleComProxyMachineClass"), item_doc_string_); | |
471 EXPECT_EQ(0, help_context_); | |
472 EXPECT_TRUE(!help_file_); | |
473 } | |
474 | |
475 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
476 GoogleComProxyUserClass) { | |
477 EXPECT_SUCCEEDED(GetDocumentation(24)); | |
478 EXPECT_STREQ(_T("GoogleComProxyUserClass"), item_name_); | |
479 EXPECT_STREQ(_T("GoogleComProxyUserClass"), item_doc_string_); | |
480 EXPECT_EQ(0, help_context_); | |
481 EXPECT_TRUE(!help_file_); | |
482 } | |
483 | |
484 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
485 ProcessLauncherClass) { | |
486 EXPECT_GU_ID_EQ(_T("{ABC01078-F197-4b0b-ADBC-CFE684B39C82}"), | |
487 __uuidof(ProcessLauncherClass)); | |
488 | |
489 EXPECT_SUCCEEDED(GetDocumentation(25)); | |
490 EXPECT_STREQ(_T("ProcessLauncherClass"), item_name_); | |
491 EXPECT_STREQ(_T("ProcessLauncherClass Class"), item_doc_string_); | |
492 EXPECT_EQ(0, help_context_); | |
493 EXPECT_TRUE(!help_file_); | |
494 } | |
495 | |
496 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
497 OneClickUserProcessLauncherClass) { | |
498 EXPECT_GU_ID_EQ(_T("{51F9E8EF-59D7-475b-A106-C7EA6F30C119}"), | |
499 __uuidof(OneClickUserProcessLauncherClass)); | |
500 | |
501 EXPECT_SUCCEEDED(GetDocumentation(26)); | |
502 EXPECT_STREQ(_T("OneClickUserProcessLauncherClass"), item_name_); | |
503 EXPECT_STREQ(_T("OneClickUserProcessLauncherClass Class"), | |
504 item_doc_string_); | |
505 EXPECT_EQ(0, help_context_); | |
506 EXPECT_TRUE(!help_file_); | |
507 } | |
508 | |
509 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
510 IOneClickProcessLauncher) { | |
511 EXPECT_GU_ID_EQ(_T("{5CCCB0EF-7073-4516-8028-4C628D0C8AAB}"), | |
512 __uuidof(IOneClickProcessLauncher)); | |
513 | |
514 EXPECT_SUCCEEDED(GetDocumentation(27)); | |
515 EXPECT_STREQ(_T("IOneClickProcessLauncher"), item_name_); | |
516 EXPECT_STREQ(_T("Google Update IOneClickProcessLauncher Interface"), | |
517 item_doc_string_); | |
518 EXPECT_EQ(0, help_context_); | |
519 EXPECT_TRUE(!help_file_); | |
520 } | |
521 | |
522 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
523 OneClickMachineProcessLauncherClass) { | |
524 EXPECT_GU_ID_EQ(_T("{AAD4AE2E-D834-46d4-8B09-490FAC9C722B}"), | |
525 __uuidof(OneClickMachineProcessLauncherClass)); | |
526 | |
527 EXPECT_SUCCEEDED(GetDocumentation(28)); | |
528 EXPECT_STREQ(_T("OneClickMachineProcessLauncherClass"), item_name_); | |
529 EXPECT_STREQ(_T("OneClickMachineProcessLauncherClass Class"), | |
530 item_doc_string_); | |
531 EXPECT_EQ(0, help_context_); | |
532 EXPECT_TRUE(!help_file_); | |
533 } | |
534 | |
535 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
536 OnDemandUserAppsClass) { | |
537 EXPECT_GU_ID_EQ(_T("{2F0E2680-9FF5-43c0-B76E-114A56E93598}"), | |
538 __uuidof(OnDemandUserAppsClass)); | |
539 | |
540 EXPECT_SUCCEEDED(GetDocumentation(29)); | |
541 EXPECT_STREQ(_T("OnDemandUserAppsClass"), item_name_); | |
542 EXPECT_STREQ(_T("OnDemand updates for per-user applications."), | |
543 item_doc_string_); | |
544 EXPECT_EQ(0, help_context_); | |
545 EXPECT_TRUE(!help_file_); | |
546 } | |
547 | |
548 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
549 OnDemandMachineAppsClass) { | |
550 EXPECT_GU_ID_EQ(_T("{6F8BD55B-E83D-4a47-85BE-81FFA8057A69}"), | |
551 __uuidof(OnDemandMachineAppsClass)); | |
552 | |
553 EXPECT_SUCCEEDED(GetDocumentation(30)); | |
554 EXPECT_STREQ(_T("OnDemandMachineAppsClass"), item_name_); | |
555 EXPECT_STREQ(_T("OnDemand pass-through broker for machine applications."), | |
556 item_doc_string_); | |
557 EXPECT_EQ(0, help_context_); | |
558 EXPECT_TRUE(!help_file_); | |
559 } | |
560 | |
561 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
562 OnDemandMachineAppsServiceClass) { | |
563 EXPECT_GU_ID_EQ(_T("{9465B4B4-5216-4042-9A2C-754D3BCDC410}"), | |
564 __uuidof(OnDemandMachineAppsServiceClass)); | |
565 | |
566 EXPECT_SUCCEEDED(GetDocumentation(31)); | |
567 EXPECT_STREQ(_T("OnDemandMachineAppsServiceClass"), item_name_); | |
568 EXPECT_STREQ(_T("OnDemand updates for per-machine applications."), | |
569 item_doc_string_); | |
570 EXPECT_EQ(0, help_context_); | |
571 EXPECT_TRUE(!help_file_); | |
572 } | |
573 | |
574 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
575 OnDemandMachineAppsFallbackClass) { | |
576 EXPECT_GU_ID_EQ(_T("{B3D28DBD-0DFA-40e4-8071-520767BADC7E}"), | |
577 __uuidof(OnDemandMachineAppsFallbackClass)); | |
578 | |
579 EXPECT_SUCCEEDED(GetDocumentation(32)); | |
580 EXPECT_STREQ(_T("OnDemandMachineAppsFallbackClass"), item_name_); | |
581 EXPECT_STREQ(_T("Fallback for if OnDemandMachineAppsServiceClass fails."), | |
582 item_doc_string_); | |
583 EXPECT_EQ(0, help_context_); | |
584 EXPECT_TRUE(!help_file_); | |
585 } | |
586 | |
587 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
588 GoogleUpdateCoreClass) { | |
589 EXPECT_GU_ID_EQ(_T("{E225E692-4B47-4777-9BED-4FD7FE257F0E}"), | |
590 __uuidof(GoogleUpdateCoreClass)); | |
591 | |
592 EXPECT_SUCCEEDED(GetDocumentation(33)); | |
593 EXPECT_STREQ(_T("GoogleUpdateCoreClass"), item_name_); | |
594 EXPECT_STREQ(_T("GoogleUpdateCore Class"), item_doc_string_); | |
595 EXPECT_EQ(0, help_context_); | |
596 EXPECT_TRUE(!help_file_); | |
597 } | |
598 | |
599 TEST_GU_INT_F(OmahaCustomizationGoopdateComInterfaceTest, | |
600 GoogleUpdateCoreMachineClass) { | |
601 EXPECT_GU_ID_EQ(_T("{9B2340A0-4068-43d6-B404-32E27217859D}"), | |
602 __uuidof(GoogleUpdateCoreMachineClass)); | |
603 | |
604 EXPECT_SUCCEEDED(GetDocumentation(34)); | |
605 EXPECT_STREQ(_T("GoogleUpdateCoreMachineClass"), item_name_); | |
606 EXPECT_STREQ(_T("GoogleUpdateCore Machine Class"), item_doc_string_); | |
607 EXPECT_EQ(0, help_context_); | |
608 EXPECT_TRUE(!help_file_); | |
609 } | |
610 | |
611 // Verifies there are no new interfaces in the TypeLib. | |
612 TEST_F(OmahaCustomizationGoopdateComInterfaceTest, VerifyNoNewInterfaces) { | |
613 EXPECT_EQ(TYPE_E_ELEMENTNOTFOUND, GetDocumentation(35)) | |
614 << _T("A new interface may have been added. If so, roll ") | |
615 << _T("PROXY_CLSID_IS_MACHINE/USER and GoogleComProxyMachine/UserClass, ") | |
616 << _T("add the interface to kIIDsToRegister, and add test(s) for new ") | |
617 << _T("interface(s)."); | |
618 } | |
619 | |
620 // | |
621 // Omaha 2 COM Interfaces. | |
622 // | |
623 // TODO(omaha): We should make it so open source versions do not need these | |
624 // legacy interfaces. | |
625 | |
626 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, | |
627 IBrowserHttpRequest2) { | |
628 EXPECT_GU_ID_EQ(_T("{5B25A8DC-1780-4178-A629-6BE8B8DEFAA2}"), | |
629 __uuidof(IBrowserHttpRequest2)); | |
630 } | |
631 | |
632 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, | |
633 IProcessLauncher) { | |
634 EXPECT_GU_ID_EQ(_T("{128C2DA6-2BC0-44c0-B3F6-4EC22E647964}"), | |
635 __uuidof(IProcessLauncher)); | |
636 } | |
637 | |
638 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, | |
639 IProgressWndEvents) { | |
640 EXPECT_GU_ID_EQ(_T("{1C642CED-CA3B-4013-A9DF-CA6CE5FF6503}"), | |
641 __uuidof(IProgressWndEvents)); | |
642 } | |
643 | |
644 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, | |
645 IJobObserver) { | |
646 EXPECT_GU_ID_EQ(_T("{49D7563B-2DDB-4831-88C8-768A53833837}"), | |
647 __uuidof(IJobObserver)); | |
648 } | |
649 | |
650 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, | |
651 IGoogleUpdate) { | |
652 EXPECT_GU_ID_EQ(_T("{31AC3F11-E5EA-4a85-8A3D-8E095A39C27B}"), | |
653 __uuidof(IGoogleUpdate)); | |
654 } | |
655 | |
656 TEST_F(OmahaCustomizationGoopdateComInterfaceNoTypeLibTest, | |
657 IGoogleUpdateCore) { | |
658 EXPECT_GU_ID_EQ(_T("{909489C2-85A6-4322-AA56-D25278649D67}"), | |
659 __uuidof(IGoogleUpdateCore)); | |
660 } | |
661 | |
OLD | NEW |