Forgot to commit urlmon.dll tests synced with Wine HEAD

svn path=/trunk/; revision=33564
This commit is contained in:
Pierre Schweitzer 2008-05-17 22:29:12 +00:00
parent 0cbcee9d20
commit 8fdd4d9b2a
2 changed files with 21 additions and 8 deletions

View file

@ -27,6 +27,7 @@
#include "winbase.h"
#include "ole2.h"
#include "urlmon.h"
#include "wininet.h"
#include "initguid.h"
@ -1383,11 +1384,21 @@ static void test_file_protocol_fail(void)
CHECK_CALLED(ReportProgress_SENDINGREQUEST);
CHECK_CALLED(ReportResult);
SET_EXPECT(GetBindInfo);
hres = IInternetProtocol_Start(protocol, NULL, &protocol_sink, &bind_info, 0, 0);
ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres);
CHECK_CALLED(GetBindInfo);
SET_EXPECT(GetBindInfo);
hres = IInternetProtocol_Start(protocol, emptyW, &protocol_sink, &bind_info, 0, 0);
ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres);
CHECK_CALLED(GetBindInfo);
IInternetProtocol_Release(protocol);
}
static void test_file_protocol(void) {
WCHAR buf[MAX_PATH];
WCHAR buf[INTERNET_MAX_URL_LENGTH], file_name_buf[MAX_PATH];
DWORD size;
ULONG len;
HANDLE file;
@ -1429,17 +1440,19 @@ static void test_file_protocol(void) {
test_file_protocol_url(buf);
memcpy(buf, wszFile2, sizeof(wszFile2));
len = sizeof(wszFile2)/sizeof(WCHAR)-1;
len += GetCurrentDirectoryW(sizeof(buf)/sizeof(WCHAR)-len, buf+len);
buf[len++] = '\\';
memcpy(buf+len, wszIndexHtml, sizeof(wszIndexHtml));
file_name = buf + sizeof(wszFile2)/sizeof(WCHAR)-1;
len = GetCurrentDirectoryW(sizeof(file_name_buf)/sizeof(WCHAR), file_name_buf);
file_name_buf[len++] = '\\';
memcpy(file_name_buf+len, wszIndexHtml, sizeof(wszIndexHtml));
lstrcpyW(buf+sizeof(wszFile2)/sizeof(WCHAR)-1, file_name_buf);
file_name = file_name_buf;
bindf = 0;
test_file_protocol_url(buf);
bindf = BINDF_FROMURLMON;
test_file_protocol_url(buf);
buf[sizeof(wszFile2)/sizeof(WCHAR)] = '|';
test_file_protocol_url(buf);
memcpy(buf, wszFile3, sizeof(wszFile3));
len = sizeof(wszFile3)/sizeof(WCHAR)-1;
len += GetCurrentDirectoryW(sizeof(buf)/sizeof(WCHAR)-len, buf+len);

View file

@ -12,12 +12,12 @@
<file>url.c</file>
<file>testlist.c</file>
<library>wine</library>
<library>uuid</library>
<library>urlmon</library>
<library>ole32</library>
<library>user32</library>
<library>advapi32</library>
<library>kernel32</library>
<library>uuid</library>
<library>ntdll</library>
</module>
</group>