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
25 #include "wine/test.h"
31 /* Globals used by many tests */
32 static const WCHAR test_displayName
[] = {'T', 'e', 's', 't', 0};
33 static WCHAR test_remotePathA
[MAX_PATH
];
34 static WCHAR test_remotePathB
[MAX_PATH
];
35 static WCHAR test_localPathA
[MAX_PATH
];
36 static WCHAR test_localPathB
[MAX_PATH
];
37 static IBackgroundCopyManager
*test_manager
;
38 static IBackgroundCopyJob
*test_job
;
39 static GUID test_jobId
;
40 static BG_JOB_TYPE test_type
;
42 static HRESULT
test_create_manager(void)
45 IBackgroundCopyManager
*manager
= NULL
;
47 /* Creating BITS instance */
48 hres
= CoCreateInstance(&CLSID_BackgroundCopyManager
, NULL
, CLSCTX_LOCAL_SERVER
,
49 &IID_IBackgroundCopyManager
, (void **) &manager
);
51 if(hres
== HRESULT_FROM_WIN32(ERROR_SERVICE_DISABLED
)) {
52 win_skip("Needed Service is disabled\n");
57 IBackgroundCopyManager_Release(manager
);
62 static void init_paths(void)
64 WCHAR tmpDir
[MAX_PATH
];
65 WCHAR prefix
[] = {'q', 'm', 'g', 'r', 0};
67 GetTempPathW(MAX_PATH
, tmpDir
);
69 GetTempFileNameW(tmpDir
, prefix
, 0, test_localPathA
);
70 GetTempFileNameW(tmpDir
, prefix
, 0, test_localPathB
);
71 GetTempFileNameW(tmpDir
, prefix
, 0, test_remotePathA
);
72 GetTempFileNameW(tmpDir
, prefix
, 0, test_remotePathB
);
75 /* Generic test setup */
76 static BOOL
setup(void)
82 memset(&test_jobId
, 0, sizeof test_jobId
);
83 test_type
= BG_JOB_TYPE_DOWNLOAD
;
85 hres
= CoCreateInstance(&CLSID_BackgroundCopyManager
, NULL
,
87 &IID_IBackgroundCopyManager
,
88 (void **) &test_manager
);
92 hres
= IBackgroundCopyManager_CreateJob(test_manager
, test_displayName
,
93 test_type
, &test_jobId
, &test_job
);
96 IBackgroundCopyManager_Release(test_manager
);
103 /* Generic test cleanup */
104 static void teardown(void)
106 IBackgroundCopyJob_Cancel(test_job
);
107 IBackgroundCopyJob_Release(test_job
);
108 IBackgroundCopyManager_Release(test_manager
);
111 static BOOL
check_bits20(void)
114 IBackgroundCopyManager
*manager
;
115 IBackgroundCopyJob
*job
, *job3
;
117 hres
= CoCreateInstance(&CLSID_BackgroundCopyManager
, NULL
,
118 CLSCTX_LOCAL_SERVER
, &IID_IBackgroundCopyManager
,
120 if (hres
!= S_OK
) return FALSE
;
122 hres
= IBackgroundCopyManager_CreateJob(manager
, test_displayName
, test_type
, &test_jobId
, &job
);
125 IBackgroundCopyManager_Release(manager
);
129 hres
= IBackgroundCopyJob_QueryInterface(job
, &IID_IBackgroundCopyJob3
, (void **)&job3
);
130 IBackgroundCopyJob_Cancel(job
);
131 IBackgroundCopyJob_Release(job
);
134 IBackgroundCopyManager_Release(manager
);
138 IBackgroundCopyJob_Release(job3
);
139 IBackgroundCopyManager_Release(manager
);
143 static BOOL
check_bits25(void)
146 IBackgroundCopyManager
*manager
;
147 IBackgroundCopyJob
*job
;
148 IBackgroundCopyJobHttpOptions
*options
;
150 hres
= CoCreateInstance(&CLSID_BackgroundCopyManager
, NULL
,
151 CLSCTX_LOCAL_SERVER
, &IID_IBackgroundCopyManager
,
153 if (hres
!= S_OK
) return FALSE
;
155 hres
= IBackgroundCopyManager_CreateJob(manager
, test_displayName
, test_type
, &test_jobId
, &job
);
158 IBackgroundCopyManager_Release(manager
);
162 hres
= IBackgroundCopyJob_QueryInterface(job
, &IID_IBackgroundCopyJobHttpOptions
, (void **)&options
);
163 IBackgroundCopyJob_Cancel(job
);
164 IBackgroundCopyJob_Release(job
);
167 IBackgroundCopyManager_Release(manager
);
171 IBackgroundCopyJobHttpOptions_Release(options
);
172 IBackgroundCopyManager_Release(manager
);
176 /* Test that the jobId is properly set */
177 static void test_GetId(void)
182 hres
= IBackgroundCopyJob_GetId(test_job
, &tmpId
);
183 ok(hres
== S_OK
, "GetId failed: %08x\n", hres
);
184 ok(memcmp(&tmpId
, &test_jobId
, sizeof tmpId
) == 0, "Got incorrect GUID\n");
187 /* Test that the type is properly set */
188 static void test_GetType(void)
193 hres
= IBackgroundCopyJob_GetType(test_job
, &type
);
194 ok(hres
== S_OK
, "GetType failed: %08x\n", hres
);
195 ok(type
== test_type
, "Got incorrect type\n");
198 /* Test that the display name is properly set */
199 static void test_GetName(void)
204 hres
= IBackgroundCopyJob_GetDisplayName(test_job
, &displayName
);
205 ok(hres
== S_OK
, "GetName failed: %08x\n", hres
);
206 ok(lstrcmpW(displayName
, test_displayName
) == 0, "Got incorrect type\n");
207 CoTaskMemFree(displayName
);
210 /* Test adding a file */
211 static void test_AddFile(void)
215 hres
= IBackgroundCopyJob_AddFile(test_job
, test_remotePathA
,
217 ok(hres
== S_OK
, "First call to AddFile failed: 0x%08x\n", hres
);
219 hres
= IBackgroundCopyJob_AddFile(test_job
, test_remotePathB
,
221 ok(hres
== S_OK
, "Second call to AddFile failed: 0x%08x\n", hres
);
224 /* Test adding a set of files */
225 static void test_AddFileSet(void)
228 BG_FILE_INFO files
[2] =
230 {test_remotePathA
, test_localPathA
},
231 {test_remotePathB
, test_localPathB
}
233 hres
= IBackgroundCopyJob_AddFileSet(test_job
, 2, files
);
234 ok(hres
== S_OK
, "AddFileSet failed: 0x%08x\n", hres
);
237 /* Test creation of a job enumerator */
238 static void test_EnumFiles(void)
241 IEnumBackgroundCopyFiles
*enumFiles
;
244 hres
= IBackgroundCopyJob_AddFile(test_job
, test_remotePathA
,
246 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
248 hres
= IBackgroundCopyJob_EnumFiles(test_job
, &enumFiles
);
249 ok(hres
== S_OK
, "EnumFiles failed: 0x%08x\n", hres
);
251 res
= IEnumBackgroundCopyFiles_Release(enumFiles
);
252 ok(res
== 0, "Bad ref count on release: %u\n", res
);
255 /* Test getting job progress */
256 static void test_GetProgress_preTransfer(void)
259 BG_JOB_PROGRESS progress
;
261 hres
= IBackgroundCopyJob_GetProgress(test_job
, &progress
);
262 ok(hres
== S_OK
, "GetProgress failed: 0x%08x\n", hres
);
264 ok(progress
.BytesTotal
== 0, "Incorrect BytesTotal: %x%08x\n",
265 (DWORD
)(progress
.BytesTotal
>> 32), (DWORD
)progress
.BytesTotal
);
266 ok(progress
.BytesTransferred
== 0, "Incorrect BytesTransferred: %x%08x\n",
267 (DWORD
)(progress
.BytesTransferred
>> 32), (DWORD
)progress
.BytesTransferred
);
268 ok(progress
.FilesTotal
== 0, "Incorrect FilesTotal: %u\n", progress
.FilesTotal
);
269 ok(progress
.FilesTransferred
== 0, "Incorrect FilesTransferred %u\n", progress
.FilesTransferred
);
272 /* Test getting job state */
273 static void test_GetState(void)
278 state
= BG_JOB_STATE_ERROR
;
279 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
280 ok(hres
== S_OK
, "GetState failed: 0x%08x\n", hres
);
281 ok(state
== BG_JOB_STATE_SUSPENDED
, "Incorrect job state: %d\n", state
);
284 /* Test resuming a job */
285 static void test_ResumeEmpty(void)
290 hres
= IBackgroundCopyJob_Resume(test_job
);
291 ok(hres
== BG_E_EMPTY
, "Resume failed to return BG_E_EMPTY error: 0x%08x\n", hres
);
293 state
= BG_JOB_STATE_ERROR
;
294 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
295 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
296 ok(state
== BG_JOB_STATE_SUSPENDED
, "Incorrect job state: %d\n", state
);
299 static void makeFile(WCHAR
*name
, const char *contents
)
302 DWORD w
, len
= strlen(contents
);
305 file
= CreateFileW(name
, GENERIC_WRITE
, 0, NULL
, CREATE_ALWAYS
,
306 FILE_ATTRIBUTE_NORMAL
, NULL
);
307 ok(file
!= INVALID_HANDLE_VALUE
, "CreateFile\n");
308 ok(WriteFile(file
, contents
, len
, &w
, NULL
), "WriteFile\n");
312 static void compareFiles(WCHAR
*n1
, WCHAR
*n2
)
319 f1
= CreateFileW(n1
, GENERIC_READ
, FILE_SHARE_READ
, NULL
, OPEN_EXISTING
,
320 FILE_ATTRIBUTE_NORMAL
, NULL
);
321 ok(f1
!= INVALID_HANDLE_VALUE
, "CreateFile\n");
323 f2
= CreateFileW(n2
, GENERIC_READ
, FILE_SHARE_READ
, NULL
, OPEN_EXISTING
,
324 FILE_ATTRIBUTE_NORMAL
, NULL
);
325 ok(f2
!= INVALID_HANDLE_VALUE
, "CreateFile\n");
327 /* Neither of these files is very big */
328 ok(ReadFile(f1
, b1
, sizeof b1
, &s1
, NULL
), "ReadFile\n");
329 ok(ReadFile(f2
, b2
, sizeof b2
, &s2
, NULL
), "ReadFile\n");
334 ok(s1
== s2
, "Files differ in length\n");
335 ok(memcmp(b1
, b2
, s1
) == 0, "Files differ in contents\n");
338 /* Test a complete transfer for local files */
339 static void test_CompleteLocal(void)
341 static const int timeout_sec
= 30;
346 DeleteFileW(test_localPathA
);
347 DeleteFileW(test_localPathB
);
348 makeFile(test_remotePathA
, "This is a WINE test file for BITS\n");
349 makeFile(test_remotePathB
, "This is another WINE test file for BITS\n");
351 hres
= IBackgroundCopyJob_AddFile(test_job
, test_remotePathA
,
353 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
355 hres
= IBackgroundCopyJob_AddFile(test_job
, test_remotePathB
,
357 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
359 hres
= IBackgroundCopyJob_Resume(test_job
);
360 ok(hres
== S_OK
, "IBackgroundCopyJob_Resume\n");
362 for (i
= 0; i
< timeout_sec
; ++i
)
364 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
365 ok(hres
== S_OK
, "IBackgroundCopyJob_GetState\n");
366 ok(state
== BG_JOB_STATE_QUEUED
|| state
== BG_JOB_STATE_CONNECTING
367 || state
== BG_JOB_STATE_TRANSFERRING
|| state
== BG_JOB_STATE_TRANSFERRED
,
368 "Bad state: %d\n", state
);
369 if (state
== BG_JOB_STATE_TRANSFERRED
)
374 ok(i
< timeout_sec
, "BITS jobs timed out\n");
375 hres
= IBackgroundCopyJob_Complete(test_job
);
376 ok(hres
== S_OK
, "IBackgroundCopyJob_Complete\n");
377 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
378 ok(hres
== S_OK
, "IBackgroundCopyJob_GetState\n");
379 ok(state
== BG_JOB_STATE_ACKNOWLEDGED
, "Bad state: %d\n", state
);
381 compareFiles(test_remotePathA
, test_localPathA
);
382 compareFiles(test_remotePathB
, test_localPathB
);
384 ok(DeleteFileW(test_remotePathA
), "DeleteFile\n");
385 ok(DeleteFileW(test_remotePathB
), "DeleteFile\n");
386 DeleteFileW(test_localPathA
);
387 DeleteFileW(test_localPathB
);
390 /* Test a complete transfer for local files */
391 static void test_CompleteLocalURL(void)
393 static const WCHAR prot
[] = {'f','i','l','e',':','/','/', 0};
394 static const int timeout_sec
= 30;
400 DeleteFileW(test_localPathA
);
401 DeleteFileW(test_localPathB
);
402 makeFile(test_remotePathA
, "This is a WINE test file for BITS\n");
403 makeFile(test_remotePathB
, "This is another WINE test file for BITS\n");
405 urlA
= HeapAlloc(GetProcessHeap(), 0,
406 (7 + lstrlenW(test_remotePathA
) + 1) * sizeof urlA
[0]);
407 urlB
= HeapAlloc(GetProcessHeap(), 0,
408 (7 + lstrlenW(test_remotePathB
) + 1) * sizeof urlB
[0]);
411 skip("Unable to allocate memory for URLs\n");
412 HeapFree(GetProcessHeap(), 0, urlA
);
413 HeapFree(GetProcessHeap(), 0, urlB
);
417 lstrcpyW(urlA
, prot
);
418 lstrcatW(urlA
, test_remotePathA
);
419 lstrcpyW(urlB
, prot
);
420 lstrcatW(urlB
, test_remotePathB
);
422 hres
= IBackgroundCopyJob_AddFile(test_job
, urlA
, test_localPathA
);
423 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
425 hres
= IBackgroundCopyJob_AddFile(test_job
, urlB
, test_localPathB
);
426 ok(hres
== S_OK
, "got 0x%08x\n", hres
);
428 hres
= IBackgroundCopyJob_Resume(test_job
);
429 ok(hres
== S_OK
, "IBackgroundCopyJob_Resume\n");
431 for (i
= 0; i
< timeout_sec
; ++i
)
433 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
434 ok(hres
== S_OK
, "IBackgroundCopyJob_GetState\n");
435 ok(state
== BG_JOB_STATE_QUEUED
|| state
== BG_JOB_STATE_CONNECTING
436 || state
== BG_JOB_STATE_TRANSFERRING
|| state
== BG_JOB_STATE_TRANSFERRED
,
437 "Bad state: %d\n", state
);
438 if (state
== BG_JOB_STATE_TRANSFERRED
)
443 ok(i
< timeout_sec
, "BITS jobs timed out\n");
444 hres
= IBackgroundCopyJob_Complete(test_job
);
445 ok(hres
== S_OK
, "IBackgroundCopyJob_Complete\n");
446 hres
= IBackgroundCopyJob_GetState(test_job
, &state
);
447 ok(hres
== S_OK
, "IBackgroundCopyJob_GetState\n");
448 ok(state
== BG_JOB_STATE_ACKNOWLEDGED
, "Bad state: %d\n", state
);
450 compareFiles(test_remotePathA
, test_localPathA
);
451 compareFiles(test_remotePathB
, test_localPathB
);
453 ok(DeleteFileW(test_remotePathA
), "DeleteFile\n");
454 ok(DeleteFileW(test_remotePathB
), "DeleteFile\n");
455 DeleteFileW(test_localPathA
);
456 DeleteFileW(test_localPathB
);
458 HeapFree(GetProcessHeap(), 0, urlA
);
459 HeapFree(GetProcessHeap(), 0, urlB
);
462 static void test_NotifyFlags(void)
467 /* check default flags */
469 hr
= IBackgroundCopyJob_GetNotifyFlags(test_job
, &flags
);
470 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
471 ok(flags
== (BG_NOTIFY_JOB_ERROR
| BG_NOTIFY_JOB_TRANSFERRED
), "flags 0x%08x\n", flags
);
474 static void test_NotifyInterface(void)
479 unk
= (IUnknown
*)0xdeadbeef;
480 hr
= IBackgroundCopyJob_GetNotifyInterface(test_job
, &unk
);
481 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
482 ok(unk
== NULL
, "got %p\n", unk
);
485 static void test_Cancel(void)
490 state
= BG_JOB_STATE_ERROR
;
491 hr
= IBackgroundCopyJob_GetState(test_job
, &state
);
492 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
493 ok(state
!= BG_JOB_STATE_CANCELLED
, "got %u\n", state
);
495 hr
= IBackgroundCopyJob_Cancel(test_job
);
496 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
498 state
= BG_JOB_STATE_ERROR
;
499 hr
= IBackgroundCopyJob_GetState(test_job
, &state
);
500 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
501 ok(state
== BG_JOB_STATE_CANCELLED
, "got %u\n", state
);
503 hr
= IBackgroundCopyJob_Cancel(test_job
);
504 ok(hr
== BG_E_INVALID_STATE
, "got 0x%08x\n", hr
);
507 static void test_HttpOptions(void)
509 static const WCHAR urlW
[] =
510 {'h','t','t','p','s',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/',0};
511 static const WCHAR winetestW
[] =
512 {'W','i','n','e',':',' ','t','e','s','t','\r','\n',0};
513 static const unsigned int timeout
= 30;
515 IBackgroundCopyJobHttpOptions
*options
;
516 IBackgroundCopyError
*error
;
520 ULONG flags
, orig_flags
;
522 DeleteFileW(test_localPathA
);
523 hr
= IBackgroundCopyJob_AddFile(test_job
, urlW
, test_localPathA
);
524 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
526 hr
= IBackgroundCopyJob_QueryInterface(test_job
, &IID_IBackgroundCopyJobHttpOptions
, (void **)&options
);
527 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
531 headers
= (WCHAR
*)0xdeadbeef;
532 hr
= IBackgroundCopyJobHttpOptions_GetCustomHeaders(options
, &headers
);
533 ok(hr
== S_FALSE
, "got 0x%08x\n", hr
);
534 ok(headers
== NULL
, "got %p\n", headers
);
536 hr
= IBackgroundCopyJobHttpOptions_SetCustomHeaders(options
, winetestW
);
537 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
539 headers
= (WCHAR
*)0xdeadbeef;
540 hr
= IBackgroundCopyJobHttpOptions_GetCustomHeaders(options
, &headers
);
541 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
544 ok(!lstrcmpW(headers
, winetestW
), "got %s\n", wine_dbgstr_w(headers
));
545 CoTaskMemFree(headers
);
548 hr
= IBackgroundCopyJobHttpOptions_SetCustomHeaders(options
, NULL
);
549 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
551 headers
= (WCHAR
*)0xdeadbeef;
552 hr
= IBackgroundCopyJobHttpOptions_GetCustomHeaders(options
, &headers
);
553 ok(hr
== S_FALSE
, "got 0x%08x\n", hr
);
554 ok(headers
== NULL
, "got %p\n", headers
);
556 orig_flags
= 0xdeadbeef;
557 hr
= IBackgroundCopyJobHttpOptions_GetSecurityFlags(options
, &orig_flags
);
558 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
559 ok(!orig_flags
, "got 0x%08x\n", orig_flags
);
561 hr
= IBackgroundCopyJobHttpOptions_SetSecurityFlags(options
, 0);
562 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
565 hr
= IBackgroundCopyJobHttpOptions_GetSecurityFlags(options
, &flags
);
566 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
567 ok(!flags
, "got 0x%08x\n", flags
);
570 hr
= IBackgroundCopyJob_Resume(test_job
);
571 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
573 for (i
= 0; i
< timeout
; i
++)
575 hr
= IBackgroundCopyJob_GetState(test_job
, &state
);
576 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
578 ok(state
== BG_JOB_STATE_QUEUED
||
579 state
== BG_JOB_STATE_CONNECTING
||
580 state
== BG_JOB_STATE_TRANSFERRING
||
581 state
== BG_JOB_STATE_TRANSFERRED
, "unexpected state: %u\n", state
);
583 if (state
== BG_JOB_STATE_TRANSFERRED
) break;
586 ok(i
< timeout
, "BITS job timed out\n");
589 hr
= IBackgroundCopyJob_GetError(test_job
, &error
);
590 ok(hr
== BG_E_ERROR_INFORMATION_UNAVAILABLE
, "got 0x%08x\n", hr
);
595 headers
= (WCHAR
*)0xdeadbeef;
596 hr
= IBackgroundCopyJobHttpOptions_GetCustomHeaders(options
, &headers
);
597 ok(hr
== S_FALSE
, "got 0x%08x\n", hr
);
598 ok(headers
== NULL
, "got %p\n", headers
);
600 hr
= IBackgroundCopyJobHttpOptions_SetCustomHeaders(options
, NULL
);
601 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
603 hr
= IBackgroundCopyJobHttpOptions_GetCustomHeaders(options
, &headers
);
604 ok(hr
== S_FALSE
, "got 0x%08x\n", hr
);
607 hr
= IBackgroundCopyJobHttpOptions_GetSecurityFlags(options
, &flags
);
608 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
609 ok(!flags
, "got 0x%08x\n", flags
);
611 hr
= IBackgroundCopyJobHttpOptions_SetSecurityFlags(options
, orig_flags
);
612 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
614 IBackgroundCopyJobHttpOptions_Release(options
);
617 hr
= IBackgroundCopyJob_Complete(test_job
);
618 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
620 hr
= IBackgroundCopyJob_GetState(test_job
, &state
);
621 ok(hr
== S_OK
, "got 0x%08x\n", hr
);
622 ok(state
== BG_JOB_STATE_ACKNOWLEDGED
, "unexpected state: %u\n", state
);
624 hr
= IBackgroundCopyJob_Complete(test_job
);
625 ok(hr
== BG_E_INVALID_STATE
, "got 0x%08x\n", hr
);
627 DeleteFileW(test_localPathA
);
630 typedef void (*test_t
)(void);
634 static const test_t tests
[] = {
638 test_GetProgress_preTransfer
,
642 test_NotifyInterface
,
645 static const test_t tests_bits20
[] = {
650 test_CompleteLocalURL
,
651 test_Cancel
, /* must be last */
654 static const test_t tests_bits25
[] = {
665 if (FAILED(test_create_manager()))
668 win_skip("Failed to create Manager instance, skipping tests\n");
672 for (test
= tests
, i
= 0; *test
; ++test
, ++i
)
674 /* Keep state separate between tests. */
677 ok(0, "tests:%d: Unable to setup test\n", i
);
686 for (test
= tests_bits20
, i
= 0; *test
; ++test
, ++i
)
688 /* Keep state separate between tests. */
691 ok(0, "tests_bits20:%d: Unable to setup test\n", i
);
700 win_skip("Tests need BITS 2.0 or higher\n");
705 for (test
= tests_bits25
, i
= 0; *test
; ++test
, ++i
)
707 /* Keep state separate between tests. */
710 ok(0, "tests_bits25:%d: Unable to setup test\n", i
);
719 win_skip("Tests need BITS 2.5 or higher\n");