urlmon: Code clean up.

This commit is contained in:
Jacek Caban 2007-01-12 12:31:04 +01:00 committed by Alexandre Julliard
parent 146fb0de02
commit 243549c5b2
1 changed files with 9 additions and 15 deletions

View File

@ -604,7 +604,7 @@ static void test_CreateAsyncBindCtxEx(void)
IBindCtx_Release(bctx); IBindCtx_Release(bctx);
} }
static void test_BindToStorage(void) static void test_BindToStorage(int protocol, BOOL emul)
{ {
IMoniker *mon; IMoniker *mon;
HRESULT hres; HRESULT hres;
@ -615,6 +615,9 @@ static void test_BindToStorage(void)
IUnknown *unk = (IUnknown*)0x00ff00ff; IUnknown *unk = (IUnknown*)0x00ff00ff;
IBinding *bind; IBinding *bind;
test_protocol = protocol;
emulate_protocol = emul;
hres = CreateAsyncBindCtx(0, &bsc, NULL, &bctx); hres = CreateAsyncBindCtx(0, &bsc, NULL, &bctx);
ok(SUCCEEDED(hres), "CreateAsyncBindCtx failed: %08x\n\n", hres); ok(SUCCEEDED(hres), "CreateAsyncBindCtx failed: %08x\n\n", hres);
if(FAILED(hres)) if(FAILED(hres))
@ -779,33 +782,24 @@ START_TEST(url)
test_CreateAsyncBindCtxEx(); test_CreateAsyncBindCtxEx();
trace("http test...\n"); trace("http test...\n");
emulate_protocol = FALSE; test_BindToStorage(HTTP_TEST, FALSE);
test_protocol = HTTP_TEST;
test_BindToStorage();
trace("about test...\n"); trace("about test...\n");
test_protocol = ABOUT_TEST;
CoInitialize(NULL); CoInitialize(NULL);
test_BindToStorage(); test_BindToStorage(ABOUT_TEST, FALSE);
CoUninitialize(); CoUninitialize();
trace("emulated about test...\n"); trace("emulated about test...\n");
emulate_protocol = TRUE; test_BindToStorage(ABOUT_TEST, TRUE);
test_protocol = ABOUT_TEST;
test_BindToStorage();
trace("file test...\n"); trace("file test...\n");
create_file(); create_file();
emulate_protocol = FALSE; test_BindToStorage(FILE_TEST, FALSE);
test_protocol = FILE_TEST;
test_BindToStorage();
DeleteFileW(wszIndexHtml); DeleteFileW(wszIndexHtml);
trace("emulated file test...\n"); trace("emulated file test...\n");
set_file_url(); set_file_url();
emulate_protocol = TRUE; test_BindToStorage(FILE_TEST, TRUE);
test_protocol = FILE_TEST;
test_BindToStorage();
test_BindToStorage_fail(); test_BindToStorage_fail();
} }