mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[URLMON_WINETEST] Sync with Wine 10.0. CORE-20596
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
|
||||
include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/wine)
|
||||
|
||||
add_definitions(-DUSE_WINE_TODOS)
|
||||
|
||||
list(APPEND SOURCE
|
||||
generated.c
|
||||
misc.c
|
||||
@@ -10,11 +6,12 @@ list(APPEND SOURCE
|
||||
sec_mgr.c
|
||||
stream.c
|
||||
uri.c
|
||||
url.c
|
||||
testlist.c)
|
||||
url.c)
|
||||
|
||||
add_executable(urlmon_winetest ${SOURCE})
|
||||
target_link_libraries(urlmon_winetest uuid)
|
||||
target_compile_definitions(urlmon_winetest PRIVATE USE_WINE_TODOS)
|
||||
target_link_libraries(urlmon_winetest uuid winetestlib)
|
||||
target_include_directories(urlmon_winetest BEFORE PRIVATE ${REACTOS_SOURCE_DIR}/sdk/include/wine)
|
||||
set_module_type(urlmon_winetest win32cui)
|
||||
add_importlibs(urlmon_winetest urlmon wininet ole32 oleaut32 shlwapi user32 advapi32 msvcrt kernel32)
|
||||
add_rostests_file(TARGET urlmon_winetest)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
|
||||
# define _TYPE_ALIGNMENT(type) __alignof(type)
|
||||
#elif defined(__GNUC__)
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
# define _TYPE_ALIGNMENT(type) __alignof__(type)
|
||||
#else
|
||||
/*
|
||||
@@ -50,23 +50,23 @@
|
||||
* Test helper macros
|
||||
*/
|
||||
|
||||
#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size);
|
||||
#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size);
|
||||
|
||||
#ifdef TYPE_ALIGNMENT
|
||||
# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
|
||||
# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
|
||||
#else
|
||||
# define TEST_TYPE_ALIGN(type, align)
|
||||
#endif
|
||||
|
||||
#ifdef _TYPE_ALIGNMENT
|
||||
# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
|
||||
# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
|
||||
# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
|
||||
# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
|
||||
#else
|
||||
# define TEST_TARGET_ALIGN(type, align)
|
||||
# define TEST_FIELD_ALIGN(type, field, align)
|
||||
#endif
|
||||
|
||||
#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
|
||||
#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
|
||||
|
||||
#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size)
|
||||
#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size)
|
||||
@@ -92,81 +92,41 @@ static void test_pack_IBindHost(void)
|
||||
/* IBindHost */
|
||||
}
|
||||
|
||||
static void test_pack_IBindHostVtbl(void)
|
||||
{
|
||||
/* IBindHostVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IBindStatusCallback(void)
|
||||
{
|
||||
/* IBindStatusCallback */
|
||||
}
|
||||
|
||||
static void test_pack_IBindStatusCallbackVtbl(void)
|
||||
{
|
||||
/* IBindStatusCallbackVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IBinding(void)
|
||||
{
|
||||
/* IBinding */
|
||||
}
|
||||
|
||||
static void test_pack_IBindingVtbl(void)
|
||||
{
|
||||
/* IBindingVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IInternetProtocolInfo(void)
|
||||
{
|
||||
/* IInternetProtocolInfo */
|
||||
}
|
||||
|
||||
static void test_pack_IInternetProtocolInfoVtbl(void)
|
||||
{
|
||||
/* IInternetProtocolInfoVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IInternetSession(void)
|
||||
{
|
||||
/* IInternetSession */
|
||||
}
|
||||
|
||||
static void test_pack_IInternetSessionVtbl(void)
|
||||
{
|
||||
/* IInternetSessionVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IPersistMoniker(void)
|
||||
{
|
||||
/* IPersistMoniker */
|
||||
}
|
||||
|
||||
static void test_pack_IPersistMonikerVtbl(void)
|
||||
{
|
||||
/* IPersistMonikerVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IWinInetHttpInfo(void)
|
||||
{
|
||||
/* IWinInetHttpInfo */
|
||||
}
|
||||
|
||||
static void test_pack_IWinInetHttpInfoVtbl(void)
|
||||
{
|
||||
/* IWinInetHttpInfoVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IWinInetInfo(void)
|
||||
{
|
||||
/* IWinInetInfo */
|
||||
}
|
||||
|
||||
static void test_pack_IWinInetInfoVtbl(void)
|
||||
{
|
||||
/* IWinInetInfoVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_LPBINDHOST(void)
|
||||
{
|
||||
/* LPBINDHOST */
|
||||
@@ -346,81 +306,41 @@ static void test_pack_IBindHost(void)
|
||||
/* IBindHost */
|
||||
}
|
||||
|
||||
static void test_pack_IBindHostVtbl(void)
|
||||
{
|
||||
/* IBindHostVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IBindStatusCallback(void)
|
||||
{
|
||||
/* IBindStatusCallback */
|
||||
}
|
||||
|
||||
static void test_pack_IBindStatusCallbackVtbl(void)
|
||||
{
|
||||
/* IBindStatusCallbackVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IBinding(void)
|
||||
{
|
||||
/* IBinding */
|
||||
}
|
||||
|
||||
static void test_pack_IBindingVtbl(void)
|
||||
{
|
||||
/* IBindingVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IInternetProtocolInfo(void)
|
||||
{
|
||||
/* IInternetProtocolInfo */
|
||||
}
|
||||
|
||||
static void test_pack_IInternetProtocolInfoVtbl(void)
|
||||
{
|
||||
/* IInternetProtocolInfoVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IInternetSession(void)
|
||||
{
|
||||
/* IInternetSession */
|
||||
}
|
||||
|
||||
static void test_pack_IInternetSessionVtbl(void)
|
||||
{
|
||||
/* IInternetSessionVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IPersistMoniker(void)
|
||||
{
|
||||
/* IPersistMoniker */
|
||||
}
|
||||
|
||||
static void test_pack_IPersistMonikerVtbl(void)
|
||||
{
|
||||
/* IPersistMonikerVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IWinInetHttpInfo(void)
|
||||
{
|
||||
/* IWinInetHttpInfo */
|
||||
}
|
||||
|
||||
static void test_pack_IWinInetHttpInfoVtbl(void)
|
||||
{
|
||||
/* IWinInetHttpInfoVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_IWinInetInfo(void)
|
||||
{
|
||||
/* IWinInetInfo */
|
||||
}
|
||||
|
||||
static void test_pack_IWinInetInfoVtbl(void)
|
||||
{
|
||||
/* IWinInetInfoVtbl */
|
||||
}
|
||||
|
||||
static void test_pack_LPBINDHOST(void)
|
||||
{
|
||||
/* LPBINDHOST */
|
||||
@@ -588,21 +508,13 @@ static void test_pack(void)
|
||||
{
|
||||
test_pack_BINDINFO();
|
||||
test_pack_IBindHost();
|
||||
test_pack_IBindHostVtbl();
|
||||
test_pack_IBindStatusCallback();
|
||||
test_pack_IBindStatusCallbackVtbl();
|
||||
test_pack_IBinding();
|
||||
test_pack_IBindingVtbl();
|
||||
test_pack_IInternetProtocolInfo();
|
||||
test_pack_IInternetProtocolInfoVtbl();
|
||||
test_pack_IInternetSession();
|
||||
test_pack_IInternetSessionVtbl();
|
||||
test_pack_IPersistMoniker();
|
||||
test_pack_IPersistMonikerVtbl();
|
||||
test_pack_IWinInetHttpInfo();
|
||||
test_pack_IWinInetHttpInfoVtbl();
|
||||
test_pack_IWinInetInfo();
|
||||
test_pack_IWinInetInfoVtbl();
|
||||
test_pack_LPBINDHOST();
|
||||
test_pack_LPBINDING();
|
||||
test_pack_LPBINDSTATUSCALLBACK();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -167,7 +167,7 @@ static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallback *iface, ULONG ulP
|
||||
ok(szStatusText != NULL, "szStatusText == NULL\n");
|
||||
break;
|
||||
default:
|
||||
todo_wine { ok(0, "unexpected code %d\n", ulStatusCode); }
|
||||
todo_wine { ok(0, "unexpected code %ld\n", ulStatusCode); }
|
||||
};
|
||||
return S_OK;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallback *iface, HRESUL
|
||||
/* ignore DNS failure */
|
||||
if (hresult != HRESULT_FROM_WIN32(ERROR_INTERNET_NAME_NOT_RESOLVED))
|
||||
{
|
||||
ok(SUCCEEDED(hresult), "Download failed: %08x\n", hresult);
|
||||
ok(SUCCEEDED(hresult), "Download failed: %08lx\n", hresult);
|
||||
ok(szError == NULL, "szError should be NULL\n");
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallback *iface, DWOR
|
||||
DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed)
|
||||
{
|
||||
HRESULT hres;
|
||||
DWORD readed;
|
||||
DWORD read;
|
||||
BYTE buf[512];
|
||||
|
||||
CHECK_EXPECT2(OnDataAvailable);
|
||||
@@ -212,27 +212,27 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallback *iface, DWOR
|
||||
if (0)
|
||||
{
|
||||
/* FIXME: Uncomment after removing BindToStorage hack. */
|
||||
ok(pformatetc != NULL, "pformatetx == NULL\n");
|
||||
ok(pformatetc != NULL, "pformatetc == NULL\n");
|
||||
if(pformatetc) {
|
||||
ok(pformatetc->cfFormat == 0xc02d, "clipformat=%x\n", pformatetc->cfFormat);
|
||||
ok(pformatetc->ptd == NULL, "ptd = %p\n", pformatetc->ptd);
|
||||
ok(pformatetc->dwAspect == 1, "dwAspect=%u\n", pformatetc->dwAspect);
|
||||
ok(pformatetc->lindex == -1, "lindex=%d\n", pformatetc->lindex);
|
||||
ok(pformatetc->tymed == TYMED_ISTREAM, "tymed=%u\n", pformatetc->tymed);
|
||||
ok(pformatetc->dwAspect == 1, "dwAspect=%lu\n", pformatetc->dwAspect);
|
||||
ok(pformatetc->lindex == -1, "lindex=%ld\n", pformatetc->lindex);
|
||||
ok(pformatetc->tymed == TYMED_ISTREAM, "tymed=%lu\n", pformatetc->tymed);
|
||||
}
|
||||
|
||||
ok(pstgmed != NULL, "stgmeg == NULL\n");
|
||||
if(pstgmed) {
|
||||
ok(pstgmed->tymed == TYMED_ISTREAM, "tymed=%u\n", pstgmed->tymed);
|
||||
ok(U(*pstgmed).pstm != NULL, "pstm == NULL\n");
|
||||
ok(pstgmed->tymed == TYMED_ISTREAM, "tymed=%lu\n", pstgmed->tymed);
|
||||
ok(pstgmed->pstm != NULL, "pstm == NULL\n");
|
||||
ok(pstgmed->pUnkForRelease != NULL, "pUnkForRelease == NULL\n");
|
||||
}
|
||||
}
|
||||
|
||||
if(U(*pstgmed).pstm) {
|
||||
do hres = IStream_Read(U(*pstgmed).pstm, buf, 512, &readed);
|
||||
if(pstgmed->pstm) {
|
||||
do hres = IStream_Read(pstgmed->pstm, buf, 512, &read);
|
||||
while(hres == S_OK);
|
||||
ok(hres == S_FALSE || hres == E_PENDING, "IStream_Read returned %08x\n", hres);
|
||||
ok(hres == S_FALSE || hres == E_PENDING, "IStream_Read returned %08lx\n", hres);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
@@ -297,11 +297,11 @@ static void test_URLOpenBlockingStreamW(void)
|
||||
char buffer[256];
|
||||
|
||||
hr = URLOpenBlockingStreamW(NULL, NULL, &pStream, 0, &BindStatusCallback);
|
||||
ok(hr == E_INVALIDARG, "URLOpenBlockingStreamW should have failed with E_INVALIDARG instead of 0x%08x\n", hr);
|
||||
ok(hr == E_INVALIDARG, "URLOpenBlockingStreamW should have failed with E_INVALIDARG instead of 0x%08lx\n", hr);
|
||||
if (0) /* crashes on Win2k */
|
||||
{
|
||||
hr = URLOpenBlockingStreamW(NULL, INDEX_HTML, NULL, 0, &BindStatusCallback);
|
||||
ok(hr == E_INVALIDARG, "URLOpenBlockingStreamW should have failed with E_INVALIDARG instead of 0x%08x\n", hr);
|
||||
ok(hr == E_INVALIDARG, "URLOpenBlockingStreamW should have failed with E_INVALIDARG instead of 0x%08lx\n", hr);
|
||||
}
|
||||
|
||||
SET_EXPECT(GetBindInfo);
|
||||
@@ -314,7 +314,7 @@ static void test_URLOpenBlockingStreamW(void)
|
||||
SET_EXPECT(OnStopBinding);
|
||||
|
||||
hr = URLOpenBlockingStreamW(NULL, INDEX_HTML, &pStream, 0, &BindStatusCallback);
|
||||
ok(hr == S_OK, "URLOpenBlockingStreamW failed with error 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "URLOpenBlockingStreamW failed with error 0x%08lx\n", hr);
|
||||
|
||||
CHECK_CALLED(GetBindInfo);
|
||||
todo_wine CHECK_CALLED(QueryInterface_IServiceProvider);
|
||||
@@ -330,21 +330,21 @@ static void test_URLOpenBlockingStreamW(void)
|
||||
{
|
||||
buffer[0] = 0;
|
||||
hr = IStream_Read(pStream, buffer, sizeof(buffer), NULL);
|
||||
ok(hr == S_OK, "IStream_Read failed with error 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "IStream_Read failed with error 0x%08lx\n", hr);
|
||||
ok(!memcmp(buffer, szHtmlDoc, sizeof(szHtmlDoc)-1), "read data differs from file\n");
|
||||
|
||||
IStream_Release(pStream);
|
||||
}
|
||||
|
||||
hr = URLOpenBlockingStreamW(NULL, INDEX_HTML, &pStream, 0, NULL);
|
||||
ok(hr == S_OK, "URLOpenBlockingStreamW failed with error 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "URLOpenBlockingStreamW failed with error 0x%08lx\n", hr);
|
||||
|
||||
ok(pStream != NULL, "pStream is NULL\n");
|
||||
if(pStream)
|
||||
{
|
||||
buffer[0] = 0;
|
||||
hr = IStream_Read(pStream, buffer, sizeof(buffer), NULL);
|
||||
ok(hr == S_OK, "IStream_Read failed with error 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "IStream_Read failed with error 0x%08lx\n", hr);
|
||||
ok(!memcmp(buffer, szHtmlDoc, sizeof(szHtmlDoc)-1), "read data differs from file\n");
|
||||
|
||||
IStream_Release(pStream);
|
||||
@@ -356,7 +356,7 @@ static void test_URLOpenStreamW(void)
|
||||
HRESULT hr;
|
||||
|
||||
hr = URLOpenStreamW(NULL, NULL, 0, &BindStatusCallback);
|
||||
ok(hr == E_INVALIDARG, "URLOpenStreamW should have failed with E_INVALIDARG instead of 0x%08x\n", hr);
|
||||
ok(hr == E_INVALIDARG, "URLOpenStreamW should have failed with E_INVALIDARG instead of 0x%08lx\n", hr);
|
||||
|
||||
SET_EXPECT(GetBindInfo);
|
||||
SET_EXPECT(QueryInterface_IServiceProvider);
|
||||
@@ -369,7 +369,7 @@ static void test_URLOpenStreamW(void)
|
||||
SET_EXPECT(OnStopBinding);
|
||||
|
||||
hr = URLOpenStreamW(NULL, INDEX_HTML, 0, &BindStatusCallback);
|
||||
ok(hr == S_OK, "URLOpenStreamW failed with error 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "URLOpenStreamW failed with error 0x%08lx\n", hr);
|
||||
|
||||
CHECK_CALLED(GetBindInfo);
|
||||
todo_wine CHECK_CALLED(QueryInterface_IServiceProvider);
|
||||
@@ -382,7 +382,7 @@ static void test_URLOpenStreamW(void)
|
||||
CHECK_CALLED(OnStopBinding);
|
||||
|
||||
hr = URLOpenStreamW(NULL, INDEX_HTML, 0, NULL);
|
||||
ok(hr == S_OK, "URLOpenStreamW failed with error 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "URLOpenStreamW failed with error 0x%08lx\n", hr);
|
||||
}
|
||||
|
||||
START_TEST(stream)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/* Automatically generated file; DO NOT EDIT!! */
|
||||
|
||||
#define STANDALONE
|
||||
#include <wine/test.h>
|
||||
|
||||
extern void func_generated(void);
|
||||
extern void func_misc(void);
|
||||
extern void func_protocol(void);
|
||||
extern void func_sec_mgr(void);
|
||||
extern void func_stream(void);
|
||||
extern void func_uri(void);
|
||||
extern void func_url(void);
|
||||
|
||||
const struct test winetest_testlist[] =
|
||||
{
|
||||
{ "generated", func_generated },
|
||||
{ "misc", func_misc },
|
||||
{ "protocol", func_protocol },
|
||||
{ "sec_mgr", func_sec_mgr },
|
||||
{ "stream", func_stream },
|
||||
{ "uri", func_uri },
|
||||
{ "url", func_url },
|
||||
{ 0, 0 }
|
||||
};
|
||||
+1262
-791
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user