Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
eef8be36
Commit
eef8be36
authored
Apr 22, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Apr 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Skip more tests on IE 4.0.
CoInternetQueryInfo, CopyStgMedium and FindMimeFromData missing on IE 4.0 (winetestbot W95B).
parent
cb620908
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
24 deletions
+44
-24
misc.c
dlls/urlmon/tests/misc.c
+44
-24
No files found.
dlls/urlmon/tests/misc.c
View file @
eef8be36
...
...
@@ -67,6 +67,10 @@ static HRESULT (WINAPI *pCoInternetCompareUrl)(LPCWSTR, LPCWSTR, DWORD);
static
HRESULT
(
WINAPI
*
pCoInternetGetSecurityUrl
)(
LPCWSTR
,
LPWSTR
*
,
PSUACTION
,
DWORD
);
static
HRESULT
(
WINAPI
*
pCoInternetGetSession
)(
DWORD
,
IInternetSession
**
,
DWORD
);
static
HRESULT
(
WINAPI
*
pCoInternetParseUrl
)(
LPCWSTR
,
PARSEACTION
,
DWORD
,
LPWSTR
,
DWORD
,
DWORD
*
,
DWORD
);
static
HRESULT
(
WINAPI
*
pCoInternetQueryInfo
)(
LPCWSTR
,
QUERYOPTION
,
DWORD
,
LPVOID
,
DWORD
,
DWORD
*
,
DWORD
);
static
HRESULT
(
WINAPI
*
pCopyStgMedium
)(
const
STGMEDIUM
*
,
STGMEDIUM
*
);
static
HRESULT
(
WINAPI
*
pFindMimeFromData
)(
LPBC
,
LPCWSTR
,
LPVOID
,
DWORD
,
LPCWSTR
,
DWORD
,
LPWSTR
*
,
DWORD
);
static
void
test_CreateFormatEnum
(
void
)
{
...
...
@@ -406,22 +410,26 @@ static void test_CoInternetQueryInfo(void)
DWORD
cb
,
i
;
HRESULT
hres
;
if
(
!
pCoInternetQueryInfo
)
{
return
;
}
for
(
i
=
0
;
i
<
sizeof
(
query_info_tests
)
/
sizeof
(
query_info_tests
[
0
]);
i
++
)
{
cb
=
0xdeadbeef
;
memset
(
buf
,
'?'
,
sizeof
(
buf
));
hres
=
CoInternetQueryInfo
(
query_info_tests
[
0
].
url
,
QUERY_USES_NETWORK
,
0
,
buf
,
sizeof
(
buf
),
&
cb
,
0
);
hres
=
p
CoInternetQueryInfo
(
query_info_tests
[
0
].
url
,
QUERY_USES_NETWORK
,
0
,
buf
,
sizeof
(
buf
),
&
cb
,
0
);
ok
(
hres
==
S_OK
,
"[%d] CoInternetQueryInfo failed: %08x
\n
"
,
i
,
hres
);
ok
(
cb
==
sizeof
(
DWORD
),
"[%d] cb = %d
\n
"
,
i
,
cb
);
ok
(
*
(
DWORD
*
)
buf
==
query_info_tests
[
i
].
uses_net
,
"[%d] ret %x, expected %x
\n
"
,
i
,
*
(
DWORD
*
)
buf
,
query_info_tests
[
i
].
uses_net
);
hres
=
CoInternetQueryInfo
(
query_info_tests
[
0
].
url
,
QUERY_USES_NETWORK
,
0
,
buf
,
3
,
&
cb
,
0
);
hres
=
p
CoInternetQueryInfo
(
query_info_tests
[
0
].
url
,
QUERY_USES_NETWORK
,
0
,
buf
,
3
,
&
cb
,
0
);
ok
(
hres
==
E_FAIL
,
"[%d] CoInternetQueryInfo failed: %08x, expected E_FAIL
\n
"
,
i
,
hres
);
hres
=
CoInternetQueryInfo
(
query_info_tests
[
0
].
url
,
QUERY_USES_NETWORK
,
0
,
NULL
,
sizeof
(
buf
),
&
cb
,
0
);
hres
=
p
CoInternetQueryInfo
(
query_info_tests
[
0
].
url
,
QUERY_USES_NETWORK
,
0
,
NULL
,
sizeof
(
buf
),
&
cb
,
0
);
ok
(
hres
==
E_FAIL
,
"[%d] CoInternetQueryInfo failed: %08x, expected E_FAIL
\n
"
,
i
,
hres
);
memset
(
buf
,
'?'
,
sizeof
(
buf
));
hres
=
CoInternetQueryInfo
(
query_info_tests
[
0
].
url
,
QUERY_USES_NETWORK
,
0
,
buf
,
sizeof
(
buf
),
NULL
,
0
);
hres
=
p
CoInternetQueryInfo
(
query_info_tests
[
0
].
url
,
QUERY_USES_NETWORK
,
0
,
buf
,
sizeof
(
buf
),
NULL
,
0
);
ok
(
hres
==
S_OK
,
"[%d] CoInternetQueryInfo failed: %08x
\n
"
,
i
,
hres
);
ok
(
*
(
DWORD
*
)
buf
==
query_info_tests
[
i
].
uses_net
,
"[%d] ret %x, expected %x
\n
"
,
i
,
*
(
DWORD
*
)
buf
,
query_info_tests
[
i
].
uses_net
);
...
...
@@ -653,9 +661,13 @@ static void test_FindMimeFromData(void)
LPWSTR
mime
;
int
i
;
if
(
!
pFindMimeFromData
)
{
return
;
}
for
(
i
=
0
;
i
<
sizeof
(
mime_tests
)
/
sizeof
(
mime_tests
[
0
]);
i
++
)
{
mime
=
(
LPWSTR
)
0xf0f0f0f0
;
hres
=
FindMimeFromData
(
NULL
,
mime_tests
[
i
].
url
,
NULL
,
0
,
NULL
,
0
,
&
mime
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
mime_tests
[
i
].
url
,
NULL
,
0
,
NULL
,
0
,
&
mime
,
0
);
if
(
mime_tests
[
i
].
mime
)
{
ok
(
hres
==
S_OK
,
"[%d] FindMimeFromData failed: %08x
\n
"
,
i
,
hres
);
ok
(
!
lstrcmpW
(
mime
,
mime_tests
[
i
].
mime
),
"[%d] wrong mime
\n
"
,
i
);
...
...
@@ -668,26 +680,26 @@ static void test_FindMimeFromData(void)
}
mime
=
(
LPWSTR
)
0xf0f0f0f0
;
hres
=
FindMimeFromData
(
NULL
,
mime_tests
[
i
].
url
,
NULL
,
0
,
mimeTextPlain
,
0
,
&
mime
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
mime_tests
[
i
].
url
,
NULL
,
0
,
mimeTextPlain
,
0
,
&
mime
,
0
);
ok
(
hres
==
S_OK
,
"[%d] FindMimeFromData failed: %08x
\n
"
,
i
,
hres
);
ok
(
!
lstrcmpW
(
mime
,
mimeTextPlain
),
"[%d] wrong mime
\n
"
,
i
);
CoTaskMemFree
(
mime
);
mime
=
(
LPWSTR
)
0xf0f0f0f0
;
hres
=
FindMimeFromData
(
NULL
,
mime_tests
[
i
].
url
,
NULL
,
0
,
mimeAppOctetStream
,
0
,
&
mime
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
mime_tests
[
i
].
url
,
NULL
,
0
,
mimeAppOctetStream
,
0
,
&
mime
,
0
);
ok
(
hres
==
S_OK
,
"[%d] FindMimeFromData failed: %08x
\n
"
,
i
,
hres
);
ok
(
!
lstrcmpW
(
mime
,
mimeAppOctetStream
),
"[%d] wrong mime
\n
"
,
i
);
CoTaskMemFree
(
mime
);
}
for
(
i
=
0
;
i
<
sizeof
(
mime_tests2
)
/
sizeof
(
mime_tests2
[
0
]);
i
++
)
{
hres
=
FindMimeFromData
(
NULL
,
NULL
,
mime_tests2
[
i
].
data
,
mime_tests2
[
i
].
size
,
hres
=
p
FindMimeFromData
(
NULL
,
NULL
,
mime_tests2
[
i
].
data
,
mime_tests2
[
i
].
size
,
NULL
,
0
,
&
mime
,
0
);
ok
(
hres
==
S_OK
,
"[%d] FindMimeFromData failed: %08x
\n
"
,
i
,
hres
);
ok
(
!
lstrcmpW
(
mime
,
mime_tests2
[
i
].
mime
),
"[%d] wrong mime: %s
\n
"
,
i
,
wine_dbgstr_w
(
mime
));
CoTaskMemFree
(
mime
);
hres
=
FindMimeFromData
(
NULL
,
NULL
,
mime_tests2
[
i
].
data
,
mime_tests2
[
i
].
size
,
hres
=
p
FindMimeFromData
(
NULL
,
NULL
,
mime_tests2
[
i
].
data
,
mime_tests2
[
i
].
size
,
mimeTextHtml
,
0
,
&
mime
,
0
);
ok
(
hres
==
S_OK
,
"[%d] FindMimeFromData failed: %08x
\n
"
,
i
,
hres
);
if
(
!
lstrcmpW
(
mimeAppOctetStream
,
mime_tests2
[
i
].
mime
)
...
...
@@ -697,7 +709,7 @@ static void test_FindMimeFromData(void)
ok
(
!
lstrcmpW
(
mime
,
mime_tests2
[
i
].
mime
),
"[%d] wrong mime
\n
"
,
i
);
CoTaskMemFree
(
mime
);
hres
=
FindMimeFromData
(
NULL
,
NULL
,
mime_tests2
[
i
].
data
,
mime_tests2
[
i
].
size
,
hres
=
p
FindMimeFromData
(
NULL
,
NULL
,
mime_tests2
[
i
].
data
,
mime_tests2
[
i
].
size
,
mimeImagePjpeg
,
0
,
&
mime
,
0
);
ok
(
hres
==
S_OK
,
"[%d] FindMimeFromData failed: %08x
\n
"
,
i
,
hres
);
if
(
!
lstrcmpW
(
mimeAppOctetStream
,
mime_tests2
[
i
].
mime
)
||
i
==
17
)
...
...
@@ -710,39 +722,39 @@ static void test_FindMimeFromData(void)
CoTaskMemFree
(
mime
);
}
hres
=
FindMimeFromData
(
NULL
,
url1
,
data1
,
sizeof
(
data1
),
NULL
,
0
,
&
mime
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
url1
,
data1
,
sizeof
(
data1
),
NULL
,
0
,
&
mime
,
0
);
ok
(
hres
==
S_OK
,
"FindMimeFromData failed: %08x
\n
"
,
hres
);
ok
(
!
lstrcmpW
(
mime
,
mimeTextPlain
),
"wrong mime
\n
"
);
CoTaskMemFree
(
mime
);
hres
=
FindMimeFromData
(
NULL
,
url1
,
data1
,
sizeof
(
data1
),
mimeAppOctetStream
,
0
,
&
mime
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
url1
,
data1
,
sizeof
(
data1
),
mimeAppOctetStream
,
0
,
&
mime
,
0
);
ok
(
hres
==
S_OK
,
"FindMimeFromData failed: %08x
\n
"
,
hres
);
ok
(
!
lstrcmpW
(
mime
,
mimeTextPlain
),
"wrong mime
\n
"
);
CoTaskMemFree
(
mime
);
hres
=
FindMimeFromData
(
NULL
,
url4
,
data1
,
sizeof
(
data1
),
mimeAppOctetStream
,
0
,
&
mime
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
url4
,
data1
,
sizeof
(
data1
),
mimeAppOctetStream
,
0
,
&
mime
,
0
);
ok
(
hres
==
S_OK
,
"FindMimeFromData failed: %08x
\n
"
,
hres
);
ok
(
!
lstrcmpW
(
mime
,
mimeTextPlain
),
"wrong mime
\n
"
);
CoTaskMemFree
(
mime
);
hres
=
FindMimeFromData
(
NULL
,
NULL
,
NULL
,
0
,
NULL
,
0
,
&
mime
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
NULL
,
NULL
,
0
,
NULL
,
0
,
&
mime
,
0
);
ok
(
hres
==
E_INVALIDARG
,
"FindMimeFromData failed: %08x, excepted E_INVALIDARG
\n
"
,
hres
);
hres
=
FindMimeFromData
(
NULL
,
NULL
,
NULL
,
0
,
mimeTextPlain
,
0
,
&
mime
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
NULL
,
NULL
,
0
,
mimeTextPlain
,
0
,
&
mime
,
0
);
ok
(
hres
==
E_INVALIDARG
,
"FindMimeFromData failed: %08x, expected E_INVALIDARG
\n
"
,
hres
);
hres
=
FindMimeFromData
(
NULL
,
NULL
,
data1
,
0
,
NULL
,
0
,
&
mime
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
NULL
,
data1
,
0
,
NULL
,
0
,
&
mime
,
0
);
ok
(
hres
==
E_FAIL
,
"FindMimeFromData failed: %08x, expected E_FAIL
\n
"
,
hres
);
hres
=
FindMimeFromData
(
NULL
,
url1
,
data1
,
0
,
NULL
,
0
,
&
mime
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
url1
,
data1
,
0
,
NULL
,
0
,
&
mime
,
0
);
ok
(
hres
==
E_FAIL
,
"FindMimeFromData failed: %08x, expected E_FAIL
\n
"
,
hres
);
hres
=
FindMimeFromData
(
NULL
,
NULL
,
data1
,
0
,
mimeTextPlain
,
0
,
&
mime
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
NULL
,
data1
,
0
,
mimeTextPlain
,
0
,
&
mime
,
0
);
ok
(
hres
==
S_OK
,
"FindMimeFromData failed: %08x
\n
"
,
hres
);
ok
(
!
lstrcmpW
(
mime
,
mimeTextPlain
),
"wrong mime
\n
"
);
CoTaskMemFree
(
mime
);
hres
=
FindMimeFromData
(
NULL
,
NULL
,
data1
,
0
,
mimeTextPlain
,
0
,
NULL
,
0
);
hres
=
p
FindMimeFromData
(
NULL
,
NULL
,
data1
,
0
,
mimeTextPlain
,
0
,
NULL
,
0
);
ok
(
hres
==
E_INVALIDARG
,
"FindMimeFromData failed: %08x, expected E_INVALIDARG
\n
"
,
hres
);
}
...
...
@@ -1163,12 +1175,17 @@ static void test_CopyStgMedium(void)
static
WCHAR
fileW
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
0
};
if
(
!
pCopyStgMedium
)
{
return
;
}
memset
(
&
src
,
0xf0
,
sizeof
(
src
));
memset
(
&
dst
,
0xe0
,
sizeof
(
dst
));
memset
(
&
empty
,
0xf0
,
sizeof
(
empty
));
src
.
tymed
=
TYMED_NULL
;
src
.
pUnkForRelease
=
NULL
;
hres
=
CopyStgMedium
(
&
src
,
&
dst
);
hres
=
p
CopyStgMedium
(
&
src
,
&
dst
);
ok
(
hres
==
S_OK
,
"CopyStgMedium failed: %08x
\n
"
,
hres
);
ok
(
dst
.
tymed
==
TYMED_NULL
,
"tymed=%d
\n
"
,
dst
.
tymed
);
ok
(
dst
.
u
.
hGlobal
==
empty
,
"u=%p
\n
"
,
dst
.
u
.
hGlobal
);
...
...
@@ -1178,7 +1195,7 @@ static void test_CopyStgMedium(void)
src
.
tymed
=
TYMED_ISTREAM
;
src
.
u
.
pstm
=
NULL
;
src
.
pUnkForRelease
=
NULL
;
hres
=
CopyStgMedium
(
&
src
,
&
dst
);
hres
=
p
CopyStgMedium
(
&
src
,
&
dst
);
ok
(
hres
==
S_OK
,
"CopyStgMedium failed: %08x
\n
"
,
hres
);
ok
(
dst
.
tymed
==
TYMED_ISTREAM
,
"tymed=%d
\n
"
,
dst
.
tymed
);
ok
(
!
dst
.
u
.
pstm
,
"pstm=%p
\n
"
,
dst
.
u
.
pstm
);
...
...
@@ -1188,16 +1205,16 @@ static void test_CopyStgMedium(void)
src
.
tymed
=
TYMED_FILE
;
src
.
u
.
lpszFileName
=
fileW
;
src
.
pUnkForRelease
=
NULL
;
hres
=
CopyStgMedium
(
&
src
,
&
dst
);
hres
=
p
CopyStgMedium
(
&
src
,
&
dst
);
ok
(
hres
==
S_OK
,
"CopyStgMedium failed: %08x
\n
"
,
hres
);
ok
(
dst
.
tymed
==
TYMED_FILE
,
"tymed=%d
\n
"
,
dst
.
tymed
);
ok
(
dst
.
u
.
lpszFileName
&&
dst
.
u
.
lpszFileName
!=
fileW
,
"lpszFileName=%p
\n
"
,
dst
.
u
.
lpszFileName
);
ok
(
!
lstrcmpW
(
dst
.
u
.
lpszFileName
,
fileW
),
"wrong file name
\n
"
);
ok
(
!
dst
.
pUnkForRelease
,
"pUnkForRelease=%p, expected NULL
\n
"
,
dst
.
pUnkForRelease
);
hres
=
CopyStgMedium
(
&
src
,
NULL
);
hres
=
p
CopyStgMedium
(
&
src
,
NULL
);
ok
(
hres
==
E_POINTER
,
"CopyStgMedium failed: %08x, expected E_POINTER
\n
"
,
hres
);
hres
=
CopyStgMedium
(
NULL
,
&
dst
);
hres
=
p
CopyStgMedium
(
NULL
,
&
dst
);
ok
(
hres
==
E_POINTER
,
"CopyStgMedium failed: %08x, expected E_POINTER
\n
"
,
hres
);
}
...
...
@@ -1438,6 +1455,9 @@ START_TEST(misc)
pCoInternetGetSecurityUrl
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CoInternetGetSecurityUrl"
);
pCoInternetGetSession
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CoInternetGetSession"
);
pCoInternetParseUrl
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CoInternetParseUrl"
);
pCoInternetQueryInfo
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CoInternetQueryInfo"
);
pCopyStgMedium
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CopyStgMedium"
);
pFindMimeFromData
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"FindMimeFromData"
);
if
(
!
pCoInternetCompareUrl
||
!
pCoInternetGetSecurityUrl
||
!
pCoInternetGetSession
||
!
pCoInternetParseUrl
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment