2 * Unit test suite for Background Copy Job Interface
4 * Copyright 2007 Google (Roy Shea)
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #define WIN32_NO_STATUS
25 #define COM_NO_WINDOWS_H
29 #include <wine/test.h>
36 /* Globals used by many tests */
37 static const WCHAR test_displayName
[] = {'T', 'e', 's', 't', 0};
38 static WCHAR test_remotePathA
[MAX_PATH
];
39 static WCHAR test_remotePathB
[MAX_PATH
];
40 static WCHAR test_localPathA
[MAX_PATH
];
41 static WCHAR test_localPathB
[MAX_PATH
];
42 static IBackgroundCopyManager
*test_manager
;
43 static IBackgroundCopyJob
*test_job
;
44 static GUID test_jobId
;
45 static BG_JOB_TYPE test_type
;
47 static HRESULT
test_create_manager(void)
50 IBackgroundCopyManager
*manager
= NULL
;
52 /* Creating BITS instance */
53 hres
= CoCreateInstance(&CLSID_BackgroundCopyManager
, NULL
, CLSCTX_LOCAL_SERVER
,
54 &IID_IBackgroundCopyManager
, (void **) &manager
);
56 if(hres
== HRESULT_FROM_WIN32(ERROR_SERVICE_DISABLED
)) {
57 win_skip("Needed Service is disabled\n");
62 IBackgroundCopyManager_Release(manager
);
67 static void init_paths(void)
69 WCHAR tmpDir
[MAX_PATH
];
70 WCHAR prefix
[] = {'q', 'm', 'g', 'r', 0};
72 GetTempPathW(MAX_PATH
, tmpDir
);
74 GetTempFileNameW(tmpDir
, prefix
, 0, test_localPathA
);
75 GetTempFileNameW(tmpDir
, prefix
, 0, test_localPathB
);
76 GetTempFileNameW(tmpDir
, prefix
, 0, test_remotePathA
);
77 GetTempFileNameW(tmpDir
, prefix
, 0, test_remotePathB
);
80 /* Generic test setup */
81 static BOOL
setup(void)
87 memset(&test_jobId
, 0, sizeof test_jobId
);
88 test_type
= BG_JOB_TYPE_DOWNLOAD
;
90 hres
= CoCreateInstance(&CLSID_BackgroundCopyManager
, NULL
,
92 &IID_IBackgroundCopyManager
,
93 (void **) &test_manager
);
97 hres
= IBackgroundCopyManager_CreateJob(test_manager
, test_displayName
,
98 test_type
, &test_jobId
, &test_job
);
101 IBackgroundCopyManager_Release(test_manager
);
108 /* Generic test cleanup */
109 static void teardown(void)
111 IBackgroundCopyJob_Cancel(test_job
);
112 IBackgroundCopyJob_Release(test_job
);
113 IBackgroundCopyManager_Release(test_manager
);
116 static BOOL
check_bits20(void)
119 IBackgroundCopyManager
*manager
;
120 IBackgroundCopyJob
*job
, *job3
;
122 hres
= CoCreateInstance(&CLSID_BackgroundCopyManager
, NULL
,
123 CLSCTX_LOCAL_SERVER
, &IID_IBackgroundCopyManager
,
125 if (hres
!= S_OK
) return FALSE
;
127 hres
= IBackgroundCopyManager_CreateJob(manager
, test_displayName
, test_type
, &test_jobId
, &job
);
130 IBackgroundCopyManager_Release(manager
);
134 hres
= IBackgroundCopyJob_QueryInterface(job
, &IID_IBackgroundCopyJob3
, (void **)&job3
);
135 IBackgroundCopyJob_Cancel(job
);
136 IBackgroundCopyJob_Release(job
);
139 IBackgroundCopyManager_Release(manager
);
143 IBackgroundCopyJob_Release(job3
);
144 IBackgroundCopyManager_Release(manager
);
148 static BOOL
check_bits25(void)
151 IBackgroundCopyManager
*manager
;
152 IBackgroundCopyJob
*job
;
153 IBackgroundCopyJobHttpOptions
*options
;
155 hres
= CoCreateInstance(&CLSID_BackgroundCopyManager
, NULL
,
156 CLSCTX_LOCAL_SERVER
, &IID_IBackgroundCopyManager
,
158 if (hres
!= S_OK
) return FALSE
;
160 hres
= IBackgroundCopyManager_CreateJob(manager
, test_displayName
, test_type
, &test_jobId
, &job
);
163 IBackgroundCopyManager_Release(manager
);
167 hres
= IBackgroundCopyJob_QueryInterface(job
, &IID_IBackgroundCopyJobHttpOptions
, (void **)&options
);
168 IBackgroundCopyJob_Cancel(job
);
169 IBackgroundCopyJob_Release(job
);
172 IBackgroundCopyManager_Release(manager
);
176 IBackgroundCopyJobHttpOptions_Release(options
);
177 IBackgroundCopyManager_Release(manager
);
181 /* Test that the jobId is properly set */
182 static void test_GetId(void)
187 hres
= IBackgroundCopyJob_GetId(test_job
, &tmpId
);
188 ok(hres
== S_OK
, "GetId failed: %08x\n", hres
);
189 ok(memcmp(&tmpId
, &test_jobId
, sizeof tmpId
) == 0, "Got incorrect GUID\n");
192 /* Test that the type is properly set */
193 static void test_GetType(void)
198 hres
= IBackgroundCopyJob_GetType(test_job
, &type
);
199 ok(hres
== S_OK
, "GetType failed: %08x\n", hres
);
200 ok(type
== test_type
, "Got incorrect type\n");
203 /* Test that the display name is properly set */
204 static void test_GetName(void)
209 hres
= IBackgroundCopyJob_GetDisplayName(test_job
, &displayName
);
210 ok(hres
== S_OK
, "GetName failed: %08x\n", hres
);
211 ok(lstrcmpW(displayName
, test_displayName
) == 0, "Got incorrect type\n");
212 CoTaskMemFree(displayName
);
215 /* Test adding a file */
216 static void test_AddFile(void)
220 hres
= IBackgroundCopyJob_AddFile(test_job
, test_remotePathA
,
222 ok(hres
== S_OK
, "First call to AddFile failed: 0x%08x\n", hres
);
224 hres
= IBackgroundCopyJob_AddFile(test_job
, test_remotePathB
,
226 ok(hres
== S_OK
, "Second call to AddFile failed: 0x%08x\n", hres
);
229 /* Test adding a set of files */
230 static void test_AddFileSet(void)
233 BG_FILE_INFO files
[2] =
235 {test_remotePathA
, test_localPathA
},
236 {test_remotePathB
, test_localPathB
}
238 hres
= IBackgroundCopyJob_AddFileSet(test_job
, 2, files
);
239 ok(hres
== S_OK
, "AddFileSet failed: 0x%08x\n", hres
);
242 /* Test creation of a job enumerator */
243 static void test_EnumFiles(void)
246 IEnumBackgroundCopyFiles
*enumFiles
;
249 hres
= IBackgroundCopyJob_AddFile(test_job
, test_remotePathA
,
251 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
253 hres
= IBackgroundCopyJob_EnumFiles(test_job
, &enumFiles
);
254 ok(hres
== S_OK
, "EnumFiles failed: 0x%08x\n", hres
);
256 res
= IEnumBackgroundCopyFiles_Release(enumFiles
);
257 ok(res
== 0, "Bad ref count on release: %u\n", res
);
260 /* Test getting job progress */
261 static void test_GetProgress_preTransfer(void)
264 BG_JOB_PROGRESS progress
;
266 hres
= IBackgroundCopyJob_GetProgress(test_job
, &progress
);
267 ok(hres
== S_OK
, "GetProgress failed: 0x%08x\n", hres
);
269 ok(progress
.BytesTotal
== 0, "Incorrect BytesTotal: %s\n",
270 wine_dbgstr_longlong(progress
.BytesTotal
));
271 ok(progress
.BytesTransferred
== 0, "Incorrect BytesTransferred: %s\n",
272 wine_dbgstr_longlong(progress
.BytesTransferred
));
273 ok(progress
.FilesTotal
== 0, "Incorrect FilesTotal: %u\n", progress
.FilesTotal
);
274 ok(progress
.FilesTransferred
== 0, "Incorrect FilesTransferred %u\n", progress
.FilesTransferred
);
277 /* Test getting job state */
278 static void test_GetState(void)
283 state
= BG_JOB_STATE_ERROR
;
284 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
285 ok(hres
== S_OK
, "GetState failed: 0x%08x\n", hres
);
286 ok(state
== BG_JOB_STATE_SUSPENDED
, "Incorrect job state: %d\n", state
);
289 /* Test resuming a job */
290 static void test_ResumeEmpty(void)
295 hres
= IBackgroundCopyJob_Resume(test_job
);
296 ok(hres
== BG_E_EMPTY
, "Resume failed to return BG_E_EMPTY error: 0x%08x\n", hres
);
298 state
= BG_JOB_STATE_ERROR
;
299 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
300 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
301 ok(state
== BG_JOB_STATE_SUSPENDED
, "Incorrect job state: %d\n", state
);
304 static void makeFile(WCHAR
*name
, const char *contents
)
307 DWORD w
, len
= strlen(contents
);
310 file
= CreateFileW(name
, GENERIC_WRITE
, 0, NULL
, CREATE_ALWAYS
,
311 FILE_ATTRIBUTE_NORMAL
, NULL
);
312 ok(file
!= INVALID_HANDLE_VALUE
, "CreateFile\n");
313 ok(WriteFile(file
, contents
, len
, &w
, NULL
), "WriteFile\n");
317 static void compareFiles(WCHAR
*n1
, WCHAR
*n2
)
324 f1
= CreateFileW(n1
, GENERIC_READ
, FILE_SHARE_READ
, NULL
, OPEN_EXISTING
,
325 FILE_ATTRIBUTE_NORMAL
, NULL
);
326 ok(f1
!= INVALID_HANDLE_VALUE
, "CreateFile\n");
328 f2
= CreateFileW(n2
, GENERIC_READ
, FILE_SHARE_READ
, NULL
, OPEN_EXISTING
,
329 FILE_ATTRIBUTE_NORMAL
, NULL
);
330 ok(f2
!= INVALID_HANDLE_VALUE
, "CreateFile\n");
332 /* Neither of these files is very big */
333 ok(ReadFile(f1
, b1
, sizeof b1
, &s1
, NULL
), "ReadFile\n");
334 ok(ReadFile(f2
, b2
, sizeof b2
, &s2
, NULL
), "ReadFile\n");
339 ok(s1
== s2
, "Files differ in length\n");
340 ok(memcmp(b1
, b2
, s1
) == 0, "Files differ in contents\n");
343 /* Test a complete transfer for local files */
344 static void test_CompleteLocal(void)
346 static const int timeout_sec
= 30;
351 DeleteFileW(test_localPathA
);
352 DeleteFileW(test_localPathB
);
353 makeFile(test_remotePathA
, "This is a WINE test file for BITS\n");
354 makeFile(test_remotePathB
, "This is another WINE test file for BITS\n");
356 hres
= IBackgroundCopyJob_AddFile(test_job
, test_remotePathA
,
358 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
360 hres
= IBackgroundCopyJob_AddFile(test_job
, test_remotePathB
,
362 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
364 hres
= IBackgroundCopyJob_Resume(test_job
);
365 ok(hres
== S_OK
, "IBackgroundCopyJob_Resume\n");
367 for (i
= 0; i
< timeout_sec
; ++i
)
369 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
370 ok(hres
== S_OK
, "IBackgroundCopyJob_GetState\n");
371 ok(state
== BG_JOB_STATE_QUEUED
|| state
== BG_JOB_STATE_CONNECTING
372 || state
== BG_JOB_STATE_TRANSFERRING
|| state
== BG_JOB_STATE_TRANSFERRED
,
373 "Bad state: %d\n", state
);
374 if (state
== BG_JOB_STATE_TRANSFERRED
)
379 ok(i
< timeout_sec
, "BITS jobs timed out\n");
380 hres
= IBackgroundCopyJob_Complete(test_job
);
381 ok(hres
== S_OK
, "IBackgroundCopyJob_Complete\n");
382 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
383 ok(hres
== S_OK
, "IBackgroundCopyJob_GetState\n");
384 ok(state
== BG_JOB_STATE_ACKNOWLEDGED
, "Bad state: %d\n", state
);
386 compareFiles(test_remotePathA
, test_localPathA
);
387 compareFiles(test_remotePathB
, test_localPathB
);
389 ok(DeleteFileW(test_remotePathA
), "DeleteFile\n");
390 ok(DeleteFileW(test_remotePathB
), "DeleteFile\n");
391 DeleteFileW(test_localPathA
);
392 DeleteFileW(test_localPathB
);
395 /* Test a complete transfer for local files */
396 static void test_CompleteLocalURL(void)
398 static const WCHAR prot
[] = {'f','i','l','e',':','/','/', 0};
399 static const int timeout_sec
= 30;
405 DeleteFileW(test_localPathA
);
406 DeleteFileW(test_localPathB
);
407 makeFile(test_remotePathA
, "This is a WINE test file for BITS\n");
408 makeFile(test_remotePathB
, "This is another WINE test file for BITS\n");
410 urlA
= HeapAlloc(GetProcessHeap(), 0,
411 (7 + lstrlenW(test_remotePathA
) + 1) * sizeof urlA
[0]);
412 urlB
= HeapAlloc(GetProcessHeap(), 0,
413 (7 + lstrlenW(test_remotePathB
) + 1) * sizeof urlB
[0]);
416 skip("Unable to allocate memory for URLs\n");
417 HeapFree(GetProcessHeap(), 0, urlA
);
418 HeapFree(GetProcessHeap(), 0, urlB
);
422 lstrcpyW(urlA
, prot
);
423 lstrcatW(urlA
, test_remotePathA
);
424 lstrcpyW(urlB
, prot
);
425 lstrcatW(urlB
, test_remotePathB
);
427 hres
= IBackgroundCopyJob_AddFile(test_job
, urlA
, test_localPathA
);
428 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
430 hres
= IBackgroundCopyJob_AddFile(test_job
, urlB
, test_localPathB
);
431 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
433 hres
= IBackgroundCopyJob_Resume(test_job
);
434 ok(hres
== S_OK
, "IBackgroundCopyJob_Resume\n");
436 for (i
= 0; i
< timeout_sec
; ++i
)
438 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
439 ok(hres
== S_OK
, "IBackgroundCopyJob_GetState\n");
440 ok(state
== BG_JOB_STATE_QUEUED
|| state
== BG_JOB_STATE_CONNECTING
441 || state
== BG_JOB_STATE_TRANSFERRING
|| state
== BG_JOB_STATE_TRANSFERRED
,
442 "Bad state: %d\n", state
);
443 if (state
== BG_JOB_STATE_TRANSFERRED
)
448 ok(i
< timeout_sec
, "BITS jobs timed out\n");
449 hres
= IBackgroundCopyJob_Complete(test_job
);
450 ok(hres
== S_OK
, "IBackgroundCopyJob_Complete\n");
451 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
452 ok(hres
== S_OK
, "IBackgroundCopyJob_GetState\n");
453 ok(state
== BG_JOB_STATE_ACKNOWLEDGED
, "Bad state: %d\n", state
);
455 compareFiles(test_remotePathA
, test_localPathA
);
456 compareFiles(test_remotePathB
, test_localPathB
);
458 ok(DeleteFileW(test_remotePathA
), "DeleteFile\n");
459 ok(DeleteFileW(test_remotePathB
), "DeleteFile\n");
460 DeleteFileW(test_localPathA
);
461 DeleteFileW(test_localPathB
);
463 HeapFree(GetProcessHeap(), 0, urlA
);
464 HeapFree(GetProcessHeap(), 0, urlB
);
467 static void test_NotifyFlags(void)
472 /* check default flags */
474 hr
= IBackgroundCopyJob_GetNotifyFlags(test_job
, &flags
);
475 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
476 ok(flags
== (BG_NOTIFY_JOB_ERROR
| BG_NOTIFY_JOB_TRANSFERRED
), "flags 0x%08x\n", flags
);
479 static void test_NotifyInterface(void)
484 unk
= (IUnknown
*)0xdeadbeef;
485 hr
= IBackgroundCopyJob_GetNotifyInterface(test_job
, &unk
);
486 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
487 ok(unk
== NULL
, "got %p\n", unk
);
490 static void test_Cancel(void)
495 state
= BG_JOB_STATE_ERROR
;
496 hr
= IBackgroundCopyJob_GetState(test_job
, &state
);
497 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
498 ok(state
!= BG_JOB_STATE_CANCELLED
, "got %u\n", state
);
500 hr
= IBackgroundCopyJob_Cancel(test_job
);
501 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
503 state
= BG_JOB_STATE_ERROR
;
504 hr
= IBackgroundCopyJob_GetState(test_job
, &state
);
505 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
506 ok(state
== BG_JOB_STATE_CANCELLED
, "got %u\n", state
);
508 hr
= IBackgroundCopyJob_Cancel(test_job
);
509 ok(hr
== BG_E_INVALID_STATE
, "got 0x%08x\n", hr
);
512 static void test_HttpOptions(void)
514 static const WCHAR urlW
[] =
515 {'h','t','t','p','s',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/',0};
516 static const WCHAR winetestW
[] =
517 {'W','i','n','e',':',' ','t','e','s','t','\r','\n',0};
518 static const unsigned int timeout
= 30;
520 IBackgroundCopyJobHttpOptions
*options
;
521 IBackgroundCopyError
*error
;
525 ULONG flags
, orig_flags
;
527 DeleteFileW(test_localPathA
);
528 hr
= IBackgroundCopyJob_AddFile(test_job
, urlW
, test_localPathA
);
529 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
531 hr
= IBackgroundCopyJob_QueryInterface(test_job
, &IID_IBackgroundCopyJobHttpOptions
, (void **)&options
);
532 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
536 headers
= (WCHAR
*)0xdeadbeef;
537 hr
= IBackgroundCopyJobHttpOptions_GetCustomHeaders(options
, &headers
);
538 ok(hr
== S_FALSE
, "got 0x%08x\n", hr
);
539 ok(headers
== NULL
, "got %p\n", headers
);
541 hr
= IBackgroundCopyJobHttpOptions_SetCustomHeaders(options
, winetestW
);
542 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
544 headers
= (WCHAR
*)0xdeadbeef;
545 hr
= IBackgroundCopyJobHttpOptions_GetCustomHeaders(options
, &headers
);
546 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
549 ok(!lstrcmpW(headers
, winetestW
), "got %s\n", wine_dbgstr_w(headers
));
550 CoTaskMemFree(headers
);
553 hr
= IBackgroundCopyJobHttpOptions_SetCustomHeaders(options
, NULL
);
554 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
556 headers
= (WCHAR
*)0xdeadbeef;
557 hr
= IBackgroundCopyJobHttpOptions_GetCustomHeaders(options
, &headers
);
558 ok(hr
== S_FALSE
, "got 0x%08x\n", hr
);
559 ok(headers
== NULL
, "got %p\n", headers
);
561 orig_flags
= 0xdeadbeef;
562 hr
= IBackgroundCopyJobHttpOptions_GetSecurityFlags(options
, &orig_flags
);
563 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
564 ok(!orig_flags
, "got 0x%08x\n", orig_flags
);
566 hr
= IBackgroundCopyJobHttpOptions_SetSecurityFlags(options
, 0);
567 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
570 hr
= IBackgroundCopyJobHttpOptions_GetSecurityFlags(options
, &flags
);
571 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
572 ok(!flags
, "got 0x%08x\n", flags
);
575 hr
= IBackgroundCopyJob_Resume(test_job
);
576 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
578 for (i
= 0; i
< timeout
; i
++)
580 hr
= IBackgroundCopyJob_GetState(test_job
, &state
);
581 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
583 ok(state
== BG_JOB_STATE_QUEUED
||
584 state
== BG_JOB_STATE_CONNECTING
||
585 state
== BG_JOB_STATE_TRANSFERRING
||
586 state
== BG_JOB_STATE_TRANSFERRED
, "unexpected state: %u\n", state
);
588 if (state
== BG_JOB_STATE_TRANSFERRED
) break;
591 ok(i
< timeout
, "BITS job timed out\n");
594 hr
= IBackgroundCopyJob_GetError(test_job
, &error
);
595 ok(hr
== BG_E_ERROR_INFORMATION_UNAVAILABLE
, "got 0x%08x\n", hr
);
600 headers
= (WCHAR
*)0xdeadbeef;
601 hr
= IBackgroundCopyJobHttpOptions_GetCustomHeaders(options
, &headers
);
602 ok(hr
== S_FALSE
, "got 0x%08x\n", hr
);
603 ok(headers
== NULL
, "got %p\n", headers
);
605 hr
= IBackgroundCopyJobHttpOptions_SetCustomHeaders(options
, NULL
);
606 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
608 hr
= IBackgroundCopyJobHttpOptions_GetCustomHeaders(options
, &headers
);
609 ok(hr
== S_FALSE
, "got 0x%08x\n", hr
);
612 hr
= IBackgroundCopyJobHttpOptions_GetSecurityFlags(options
, &flags
);
613 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
614 ok(!flags
, "got 0x%08x\n", flags
);
616 hr
= IBackgroundCopyJobHttpOptions_SetSecurityFlags(options
, orig_flags
);
617 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
619 IBackgroundCopyJobHttpOptions_Release(options
);
622 hr
= IBackgroundCopyJob_Complete(test_job
);
623 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
625 hr
= IBackgroundCopyJob_GetState(test_job
, &state
);
626 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
627 ok(state
== BG_JOB_STATE_ACKNOWLEDGED
, "unexpected state: %u\n", state
);
629 hr
= IBackgroundCopyJob_Complete(test_job
);
630 ok(hr
== BG_E_INVALID_STATE
, "got 0x%08x\n", hr
);
632 DeleteFileW(test_localPathA
);
635 typedef void (*test_t
)(void);
639 static const test_t tests
[] = {
643 test_GetProgress_preTransfer
,
647 test_NotifyInterface
,
650 static const test_t tests_bits20
[] = {
655 test_CompleteLocalURL
,
656 test_Cancel
, /* must be last */
659 static const test_t tests_bits25
[] = {
670 if (FAILED(test_create_manager()))
673 win_skip("Failed to create Manager instance, skipping tests\n");
677 for (test
= tests
, i
= 0; *test
; ++test
, ++i
)
679 /* Keep state separate between tests. */
682 ok(0, "tests:%d: Unable to setup test\n", i
);
691 for (test
= tests_bits20
, i
= 0; *test
; ++test
, ++i
)
693 /* Keep state separate between tests. */
696 ok(0, "tests_bits20:%d: Unable to setup test\n", i
);
705 win_skip("Tests need BITS 2.0 or higher\n");
710 for (test
= tests_bits25
, i
= 0; *test
; ++test
, ++i
)
712 /* Keep state separate between tests. */
715 ok(0, "tests_bits25:%d: Unable to setup test\n", i
);
724 win_skip("Tests need BITS 2.5 or higher\n");