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
e3441490
Commit
e3441490
authored
Feb 28, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
itss/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0c25cf0a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
66 deletions
+65
-66
Makefile.in
dlls/itss/tests/Makefile.in
+0
-1
protocol.c
dlls/itss/tests/protocol.c
+65
-65
No files found.
dlls/itss/tests/Makefile.in
View file @
e3441490
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
itss.dll
TESTDLL
=
itss.dll
IMPORTS
=
ole32
IMPORTS
=
ole32
...
...
dlls/itss/tests/protocol.c
View file @
e3441490
...
@@ -139,7 +139,7 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
...
@@ -139,7 +139,7 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
ok
(
!
szStatusText
,
"szStatusText != NULL
\n
"
);
ok
(
!
szStatusText
,
"szStatusText != NULL
\n
"
);
break
;
break
;
default:
default:
ok
(
0
,
"unexpected ulStatusCode %d
\n
"
,
ulStatusCode
);
ok
(
0
,
"unexpected ulStatusCode %
l
d
\n
"
,
ulStatusCode
);
break
;
break
;
}
}
...
@@ -153,9 +153,9 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR
...
@@ -153,9 +153,9 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR
ok
(
ulProgress
==
ulProgressMax
,
"ulProgress != ulProgressMax
\n
"
);
ok
(
ulProgress
==
ulProgressMax
,
"ulProgress != ulProgressMax
\n
"
);
if
(
test_protocol
==
ITS_PROTOCOL
)
if
(
test_protocol
==
ITS_PROTOCOL
)
ok
(
grfBSCF
==
(
BSCF_FIRSTDATANOTIFICATION
|
BSCF_DATAFULLYAVAILABLE
),
"grcf = %08x
\n
"
,
grfBSCF
);
ok
(
grfBSCF
==
(
BSCF_FIRSTDATANOTIFICATION
|
BSCF_DATAFULLYAVAILABLE
),
"grcf = %08
l
x
\n
"
,
grfBSCF
);
else
else
ok
(
grfBSCF
==
(
BSCF_FIRSTDATANOTIFICATION
|
BSCF_LASTDATANOTIFICATION
),
"grcf = %08x
\n
"
,
grfBSCF
);
ok
(
grfBSCF
==
(
BSCF_FIRSTDATANOTIFICATION
|
BSCF_LASTDATANOTIFICATION
),
"grcf = %08
l
x
\n
"
,
grfBSCF
);
if
(
read_protocol
)
{
if
(
read_protocol
)
{
BYTE
buf
[
100
];
BYTE
buf
[
100
];
...
@@ -163,8 +163,8 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR
...
@@ -163,8 +163,8 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR
HRESULT
hres
;
HRESULT
hres
;
hres
=
IInternetProtocol_Read
(
read_protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
hres
=
IInternetProtocol_Read
(
read_protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
ok
(
hres
==
S_OK
,
"Read failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Read failed: %08
l
x
\n
"
,
hres
);
ok
(
cb
==
13
,
"cb=%u expected 13
\n
"
,
cb
);
ok
(
cb
==
13
,
"cb=%
l
u expected 13
\n
"
,
cb
);
ok
(
!
memcmp
(
buf
,
"<html></html>"
,
13
),
"unexpected data
\n
"
);
ok
(
!
memcmp
(
buf
,
"<html></html>"
,
13
),
"unexpected data
\n
"
);
}
}
...
@@ -176,8 +176,8 @@ static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HR
...
@@ -176,8 +176,8 @@ static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HR
{
{
CHECK_EXPECT
(
ReportResult
);
CHECK_EXPECT
(
ReportResult
);
ok
(
hrResult
==
expect_hrResult
,
"expected: %08
x got: %08
x
\n
"
,
expect_hrResult
,
hrResult
);
ok
(
hrResult
==
expect_hrResult
,
"expected: %08
lx got: %08l
x
\n
"
,
expect_hrResult
,
hrResult
);
ok
(
dwError
==
0
,
"dwError = %d
\n
"
,
dwError
);
ok
(
dwError
==
0
,
"dwError = %
l
d
\n
"
,
dwError
);
ok
(
!
szResult
,
"szResult != NULL
\n
"
);
ok
(
!
szResult
,
"szResult != NULL
\n
"
);
return
S_OK
;
return
S_OK
;
...
@@ -224,7 +224,7 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfB
...
@@ -224,7 +224,7 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfB
if
(
grfBINDF
)
if
(
grfBINDF
)
ok
(
!*
grfBINDF
,
"*grfBINDF != 0
\n
"
);
ok
(
!*
grfBINDF
,
"*grfBINDF != 0
\n
"
);
ok
(
pbindinfo
!=
NULL
,
"pbindinfo == NULL
\n
"
);
ok
(
pbindinfo
!=
NULL
,
"pbindinfo == NULL
\n
"
);
ok
(
pbindinfo
->
cbSize
==
sizeof
(
BINDINFO
),
"wrong size of pbindinfo: %d
\n
"
,
pbindinfo
->
cbSize
);
ok
(
pbindinfo
->
cbSize
==
sizeof
(
BINDINFO
),
"wrong size of pbindinfo: %
l
d
\n
"
,
pbindinfo
->
cbSize
);
*
grfBINDF
=
bindf
;
*
grfBINDF
=
bindf
;
return
S_OK
;
return
S_OK
;
...
@@ -258,7 +258,7 @@ static void test_protocol_fail(IInternetProtocol *protocol, LPCWSTR url, HRESULT
...
@@ -258,7 +258,7 @@ static void test_protocol_fail(IInternetProtocol *protocol, LPCWSTR url, HRESULT
expect_hrResult
=
expected_hres
;
expect_hrResult
=
expected_hres
;
hres
=
IInternetProtocol_Start
(
protocol
,
url
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
hres
=
IInternetProtocol_Start
(
protocol
,
url
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
ok
(
hres
==
expected_hres
,
"expected: %08
x got: %08
x
\n
"
,
expected_hres
,
hres
);
ok
(
hres
==
expected_hres
,
"expected: %08
lx got: %08l
x
\n
"
,
expected_hres
,
hres
);
CHECK_CALLED
(
GetBindInfo
);
CHECK_CALLED
(
GetBindInfo
);
CHECK_CALLED
(
ReportResult
);
CHECK_CALLED
(
ReportResult
);
...
@@ -324,7 +324,7 @@ static void test_protocol_url(IClassFactory *factory, LPCWSTR url, BOOL expect_m
...
@@ -324,7 +324,7 @@ static void test_protocol_url(IClassFactory *factory, LPCWSTR url, BOOL expect_m
HRESULT
hres
;
HRESULT
hres
;
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08
l
x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
;
return
;
...
@@ -335,90 +335,90 @@ static void test_protocol_url(IClassFactory *factory, LPCWSTR url, BOOL expect_m
...
@@ -335,90 +335,90 @@ static void test_protocol_url(IClassFactory *factory, LPCWSTR url, BOOL expect_m
}
}
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
ok
(
hres
==
S_OK
,
"Read failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Read failed: %08
l
x
\n
"
,
hres
);
ok
(
cb
==
13
,
"cb=%u expected 13
\n
"
,
cb
);
ok
(
cb
==
13
,
"cb=%
l
u expected 13
\n
"
,
cb
);
ok
(
!
memcmp
(
buf
,
"<html></html>"
,
13
),
"unexpected data
\n
"
);
ok
(
!
memcmp
(
buf
,
"<html></html>"
,
13
),
"unexpected data
\n
"
);
ref
=
IInternetProtocol_Release
(
protocol
);
ref
=
IInternetProtocol_Release
(
protocol
);
ok
(
!
ref
,
"protocol ref=%d
\n
"
,
ref
);
ok
(
!
ref
,
"protocol ref=%
l
d
\n
"
,
ref
);
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08
l
x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
;
return
;
cb
=
0xdeadbeef
;
cb
=
0xdeadbeef
;
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
ok
(
hres
==
(
test_protocol
==
ITS_PROTOCOL
?
INET_E_DATA_NOT_AVAILABLE
:
E_FAIL
),
ok
(
hres
==
(
test_protocol
==
ITS_PROTOCOL
?
INET_E_DATA_NOT_AVAILABLE
:
E_FAIL
),
"Read returned %08x
\n
"
,
hres
);
"Read returned %08
l
x
\n
"
,
hres
);
ok
(
cb
==
0xdeadbeef
,
"cb=%u expected 0xdeadbeef
\n
"
,
cb
);
ok
(
cb
==
0xdeadbeef
,
"cb=%
l
u expected 0xdeadbeef
\n
"
,
cb
);
protocol_start
(
protocol
,
url
,
expect_mime
);
protocol_start
(
protocol
,
url
,
expect_mime
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
2
,
&
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
2
,
&
cb
);
ok
(
hres
==
S_OK
,
"Read failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Read failed: %08
l
x
\n
"
,
hres
);
ok
(
cb
==
2
,
"cb=%u expected 2
\n
"
,
cb
);
ok
(
cb
==
2
,
"cb=%
l
u expected 2
\n
"
,
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
ok
(
hres
==
S_OK
,
"Read failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Read failed: %08
l
x
\n
"
,
hres
);
ok
(
cb
==
11
,
"cb=%u, expected 11
\n
"
,
cb
);
ok
(
cb
==
11
,
"cb=%
l
u, expected 11
\n
"
,
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
ok
(
hres
==
S_FALSE
,
"Read failed: %08x expected S_FALSE
\n
"
,
hres
);
ok
(
hres
==
S_FALSE
,
"Read failed: %08
l
x expected S_FALSE
\n
"
,
hres
);
ok
(
cb
==
0
,
"cb=%u expected 0
\n
"
,
cb
);
ok
(
cb
==
0
,
"cb=%
l
u expected 0
\n
"
,
cb
);
hres
=
IInternetProtocol_UnlockRequest
(
protocol
);
hres
=
IInternetProtocol_UnlockRequest
(
protocol
);
ok
(
hres
==
S_OK
,
"UnlockRequest failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"UnlockRequest failed: %08
l
x
\n
"
,
hres
);
ref
=
IInternetProtocol_Release
(
protocol
);
ref
=
IInternetProtocol_Release
(
protocol
);
ok
(
!
ref
,
"protocol ref=%d
\n
"
,
ref
);
ok
(
!
ref
,
"protocol ref=%
l
d
\n
"
,
ref
);
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08
l
x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
;
return
;
protocol_start
(
protocol
,
url
,
expect_mime
);
protocol_start
(
protocol
,
url
,
expect_mime
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
2
,
&
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
2
,
&
cb
);
ok
(
hres
==
S_OK
,
"Read failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Read failed: %08
l
x
\n
"
,
hres
);
hres
=
IInternetProtocol_LockRequest
(
protocol
,
0
);
hres
=
IInternetProtocol_LockRequest
(
protocol
,
0
);
ok
(
hres
==
S_OK
,
"LockRequest failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"LockRequest failed: %08
l
x
\n
"
,
hres
);
hres
=
IInternetProtocol_UnlockRequest
(
protocol
);
hres
=
IInternetProtocol_UnlockRequest
(
protocol
);
ok
(
hres
==
S_OK
,
"UnlockRequest failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"UnlockRequest failed: %08
l
x
\n
"
,
hres
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
sizeof
(
buf
),
&
cb
);
ok
(
hres
==
S_OK
,
"Read failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Read failed: %08
l
x
\n
"
,
hres
);
ok
(
cb
==
11
,
"cb=%u, expected 11
\n
"
,
cb
);
ok
(
cb
==
11
,
"cb=%
l
u, expected 11
\n
"
,
cb
);
ref
=
IInternetProtocol_Release
(
protocol
);
ref
=
IInternetProtocol_Release
(
protocol
);
ok
(
!
ref
,
"protocol ref=%d
\n
"
,
ref
);
ok
(
!
ref
,
"protocol ref=%
l
d
\n
"
,
ref
);
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08
l
x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
;
return
;
protocol_start
(
protocol
,
url
,
expect_mime
);
protocol_start
(
protocol
,
url
,
expect_mime
);
hres
=
IInternetProtocol_LockRequest
(
protocol
,
0
);
hres
=
IInternetProtocol_LockRequest
(
protocol
,
0
);
ok
(
hres
==
S_OK
,
"LockRequest failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"LockRequest failed: %08
l
x
\n
"
,
hres
);
hres
=
IInternetProtocol_Terminate
(
protocol
,
0
);
hres
=
IInternetProtocol_Terminate
(
protocol
,
0
);
ok
(
hres
==
S_OK
,
"Terminate failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Terminate failed: %08
l
x
\n
"
,
hres
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
2
,
&
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
2
,
&
cb
);
ok
(
hres
==
S_OK
,
"Read failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Read failed: %08
l
x
\n
"
,
hres
);
ok
(
cb
==
2
,
"cb=%u, expected 2
\n
"
,
cb
);
ok
(
cb
==
2
,
"cb=%
l
u, expected 2
\n
"
,
cb
);
hres
=
IInternetProtocol_UnlockRequest
(
protocol
);
hres
=
IInternetProtocol_UnlockRequest
(
protocol
);
ok
(
hres
==
S_OK
,
"UnlockRequest failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"UnlockRequest failed: %08
l
x
\n
"
,
hres
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
2
,
&
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
2
,
&
cb
);
ok
(
hres
==
S_OK
,
"Read failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Read failed: %08
l
x
\n
"
,
hres
);
ok
(
cb
==
2
,
"cb=%u, expected 2
\n
"
,
cb
);
ok
(
cb
==
2
,
"cb=%
l
u, expected 2
\n
"
,
cb
);
hres
=
IInternetProtocol_Terminate
(
protocol
,
0
);
hres
=
IInternetProtocol_Terminate
(
protocol
,
0
);
ok
(
hres
==
S_OK
,
"Terminate failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Terminate failed: %08
l
x
\n
"
,
hres
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
2
,
&
cb
);
hres
=
IInternetProtocol_Read
(
protocol
,
buf
,
2
,
&
cb
);
ok
(
hres
==
S_OK
,
"Read failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Read failed: %08
l
x
\n
"
,
hres
);
ok
(
cb
==
2
,
"cb=%u expected 2
\n
"
,
cb
);
ok
(
cb
==
2
,
"cb=%
l
u expected 2
\n
"
,
cb
);
ref
=
IInternetProtocol_Release
(
protocol
);
ref
=
IInternetProtocol_Release
(
protocol
);
ok
(
!
ref
,
"protocol ref=%d
\n
"
,
ref
);
ok
(
!
ref
,
"protocol ref=%
l
d
\n
"
,
ref
);
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
read_protocol
);
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
read_protocol
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08
l
x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
;
return
;
protocol_start
(
read_protocol
,
url
,
expect_mime
);
protocol_start
(
read_protocol
,
url
,
expect_mime
);
ref
=
IInternetProtocol_Release
(
read_protocol
);
ref
=
IInternetProtocol_Release
(
read_protocol
);
ok
(
!
ref
,
"protocol ref=%d
\n
"
,
ref
);
ok
(
!
ref
,
"protocol ref=%
l
d
\n
"
,
ref
);
read_protocol
=
NULL
;
read_protocol
=
NULL
;
}
}
...
@@ -461,7 +461,7 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
...
@@ -461,7 +461,7 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
HRESULT
hres
;
HRESULT
hres
;
hres
=
IInternetProtocol_QueryInterface
(
protocol
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
info
);
hres
=
IInternetProtocol_QueryInterface
(
protocol
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
info
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocolInfo interface: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocolInfo interface: %08
l
x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
;
return
;
...
@@ -470,7 +470,7 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
...
@@ -470,7 +470,7 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
hres
=
IInternetProtocolInfo_ParseUrl
(
info
,
blank_url1
,
i
,
0
,
buf
,
hres
=
IInternetProtocolInfo_ParseUrl
(
info
,
blank_url1
,
i
,
0
,
buf
,
ARRAY_SIZE
(
buf
),
&
size
,
0
);
ARRAY_SIZE
(
buf
),
&
size
,
0
);
ok
(
hres
==
INET_E_DEFAULT_ACTION
,
ok
(
hres
==
INET_E_DEFAULT_ACTION
,
"[%
d] failed: %08
x, expected INET_E_DEFAULT_ACTION
\n
"
,
i
,
hres
);
"[%
ld] failed: %08l
x, expected INET_E_DEFAULT_ACTION
\n
"
,
i
,
hres
);
}
}
}
}
...
@@ -479,12 +479,12 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
...
@@ -479,12 +479,12 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
memset
(
buf
,
0xfe
,
sizeof
(
buf
));
memset
(
buf
,
0xfe
,
sizeof
(
buf
));
hres
=
IInternetProtocolInfo_CombineUrl
(
info
,
combine_tests
[
i
].
base_url
,
hres
=
IInternetProtocolInfo_CombineUrl
(
info
,
combine_tests
[
i
].
base_url
,
combine_tests
[
i
].
rel_url
,
combine_tests
[
i
].
flags
,
buf
,
ARRAY_SIZE
(
buf
),
&
size
,
0
);
combine_tests
[
i
].
rel_url
,
combine_tests
[
i
].
flags
,
buf
,
ARRAY_SIZE
(
buf
),
&
size
,
0
);
ok
(
hres
==
combine_tests
[
i
].
hres
,
"[%
d] CombineUrl returned %08x, expected %08
x
\n
"
,
ok
(
hres
==
combine_tests
[
i
].
hres
,
"[%
ld] CombineUrl returned %08lx, expected %08l
x
\n
"
,
i
,
hres
,
combine_tests
[
i
].
hres
);
i
,
hres
,
combine_tests
[
i
].
hres
);
ok
(
size
==
(
combine_tests
[
i
].
combined_url
?
lstrlenW
(
combine_tests
[
i
].
combined_url
)
+
1
ok
(
size
==
(
combine_tests
[
i
].
combined_url
?
lstrlenW
(
combine_tests
[
i
].
combined_url
)
+
1
:
0xdeadbeef
),
"[%
d] unexpected size=%
d
\n
"
,
i
,
size
);
:
0xdeadbeef
),
"[%
ld] unexpected size=%l
d
\n
"
,
i
,
size
);
if
(
combine_tests
[
i
].
combined_url
)
if
(
combine_tests
[
i
].
combined_url
)
ok
(
!
lstrcmpW
(
buf
,
combine_tests
[
i
].
combined_url
),
"[%d] unexpected result: %s
\n
"
,
i
,
wine_dbgstr_w
(
buf
));
ok
(
!
lstrcmpW
(
buf
,
combine_tests
[
i
].
combined_url
),
"[%
l
d] unexpected result: %s
\n
"
,
i
,
wine_dbgstr_w
(
buf
));
else
else
ok
(
buf
[
0
]
==
0xfefe
,
"buf changed
\n
"
);
ok
(
buf
[
0
]
==
0xfefe
,
"buf changed
\n
"
);
}
}
...
@@ -493,8 +493,8 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
...
@@ -493,8 +493,8 @@ static void test_its_protocol_info(IInternetProtocol *protocol)
memset
(
buf
,
0xfe
,
sizeof
(
buf
));
memset
(
buf
,
0xfe
,
sizeof
(
buf
));
hres
=
IInternetProtocolInfo_CombineUrl
(
info
,
L"its:test.chm::/blank.html"
,
L"test.html"
,
0
,
buf
,
hres
=
IInternetProtocolInfo_CombineUrl
(
info
,
L"its:test.chm::/blank.html"
,
L"test.html"
,
0
,
buf
,
1
,
&
size
,
0
);
1
,
&
size
,
0
);
ok
(
hres
==
E_OUTOFMEMORY
,
"CombineUrl failed: %08x
\n
"
,
hres
);
ok
(
hres
==
E_OUTOFMEMORY
,
"CombineUrl failed: %08
l
x
\n
"
,
hres
);
ok
(
size
==
25
,
"size=%d
\n
"
,
size
);
ok
(
size
==
25
,
"size=%
l
d
\n
"
,
size
);
ok
(
buf
[
0
]
==
0xfefe
,
"buf changed
\n
"
);
ok
(
buf
[
0
]
==
0xfefe
,
"buf changed
\n
"
);
IInternetProtocolInfo_Release
(
info
);
IInternetProtocolInfo_Release
(
info
);
...
@@ -519,12 +519,12 @@ static void test_its_protocol(void)
...
@@ -519,12 +519,12 @@ static void test_its_protocol(void)
hres
=
CoGetClassObject
(
&
CLSID_ITSProtocol
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
hres
=
CoGetClassObject
(
&
CLSID_ITSProtocol
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hres
==
S_OK
||
ok
(
hres
==
S_OK
||
broken
(
hres
==
REGDB_E_CLASSNOTREG
),
/* Some W95 and NT4 */
broken
(
hres
==
REGDB_E_CLASSNOTREG
),
/* Some W95 and NT4 */
"CoGetClassObject failed: %08x
\n
"
,
hres
);
"CoGetClassObject failed: %08
l
x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
;
return
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
info
);
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
info
);
ok
(
hres
==
E_NOINTERFACE
,
"Could not get IInternetProtocolInfo: %08x
\n
"
,
hres
);
ok
(
hres
==
E_NOINTERFACE
,
"Could not get IInternetProtocolInfo: %08
l
x
\n
"
,
hres
);
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IClassFactory
,
(
void
**
)
&
factory
);
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IClassFactory
,
(
void
**
)
&
factory
);
ok
(
hres
==
S_OK
,
"Could not get IClassFactory interface
\n
"
);
ok
(
hres
==
S_OK
,
"Could not get IClassFactory interface
\n
"
);
...
@@ -532,7 +532,7 @@ static void test_its_protocol(void)
...
@@ -532,7 +532,7 @@ static void test_its_protocol(void)
IInternetProtocol
*
protocol
;
IInternetProtocol
*
protocol
;
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08
l
x
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
test_its_protocol_info
(
protocol
);
test_its_protocol_info
(
protocol
);
...
@@ -542,14 +542,14 @@ static void test_its_protocol(void)
...
@@ -542,14 +542,14 @@ static void test_its_protocol(void)
hres
=
IInternetProtocol_Start
(
protocol
,
wrong_url4
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
hres
=
IInternetProtocol_Start
(
protocol
,
wrong_url4
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
ok
(
hres
==
INET_E_USE_DEFAULT_PROTOCOLHANDLER
,
ok
(
hres
==
INET_E_USE_DEFAULT_PROTOCOLHANDLER
,
"Start failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER
\n
"
,
hres
);
"Start failed: %08
l
x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER
\n
"
,
hres
);
hres
=
IInternetProtocol_Start
(
protocol
,
wrong_url5
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
hres
=
IInternetProtocol_Start
(
protocol
,
wrong_url5
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
ok
(
hres
==
INET_E_USE_DEFAULT_PROTOCOLHANDLER
,
ok
(
hres
==
INET_E_USE_DEFAULT_PROTOCOLHANDLER
,
"Start failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER
\n
"
,
hres
);
"Start failed: %08
l
x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER
\n
"
,
hres
);
ref
=
IInternetProtocol_Release
(
protocol
);
ref
=
IInternetProtocol_Release
(
protocol
);
ok
(
!
ref
,
"protocol ref=%d
\n
"
,
ref
);
ok
(
!
ref
,
"protocol ref=%
l
d
\n
"
,
ref
);
test_protocol_url
(
factory
,
blank_url1
,
TRUE
);
test_protocol_url
(
factory
,
blank_url1
,
TRUE
);
test_protocol_url
(
factory
,
blank_url2
,
TRUE
);
test_protocol_url
(
factory
,
blank_url2
,
TRUE
);
...
@@ -580,7 +580,7 @@ static void test_mk_protocol(void)
...
@@ -580,7 +580,7 @@ static void test_mk_protocol(void)
(
void
**
)
&
cf
);
(
void
**
)
&
cf
);
ok
(
hres
==
S_OK
||
ok
(
hres
==
S_OK
||
broken
(
hres
==
REGDB_E_CLASSNOTREG
),
/* Some W95 and NT4 */
broken
(
hres
==
REGDB_E_CLASSNOTREG
),
/* Some W95 and NT4 */
"CoGetClassObject failed: %08x
\n
"
,
hres
);
"CoGetClassObject failed: %08
l
x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
;
return
;
...
@@ -619,7 +619,7 @@ static void delete_chm(void)
...
@@ -619,7 +619,7 @@ static void delete_chm(void)
BOOL
ret
;
BOOL
ret
;
ret
=
DeleteFileA
(
"test.chm"
);
ret
=
DeleteFileA
(
"test.chm"
);
ok
(
ret
,
"DeleteFileA failed: %d
\n
"
,
GetLastError
());
ok
(
ret
,
"DeleteFileA failed: %
l
d
\n
"
,
GetLastError
());
}
}
static
const
IID
outer_test_iid
=
{
0xabcabc00
,
0
,
0
,{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0x66
}};
static
const
IID
outer_test_iid
=
{
0xabcabc00
,
0
,
0
,{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0x66
}};
...
@@ -659,18 +659,18 @@ static void test_com_aggregation(const CLSID *clsid)
...
@@ -659,18 +659,18 @@ static void test_com_aggregation(const CLSID *clsid)
HRESULT
hres
;
HRESULT
hres
;
hres
=
CoGetClassObject
(
clsid
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IClassFactory
,
(
void
**
)
&
class_factory
);
hres
=
CoGetClassObject
(
clsid
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IClassFactory
,
(
void
**
)
&
class_factory
);
ok
(
hres
==
S_OK
,
"CoGetClassObject failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"CoGetClassObject failed: %08
l
x
\n
"
,
hres
);
hres
=
IClassFactory_CreateInstance
(
class_factory
,
&
outer
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
hres
=
IClassFactory_CreateInstance
(
class_factory
,
&
outer
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hres
==
S_OK
,
"CreateInstance returned: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"CreateInstance returned: %08
l
x
\n
"
,
hres
);
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IInternetProtocol
,
(
void
**
)
&
unk2
);
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IInternetProtocol
,
(
void
**
)
&
unk2
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol iface: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol iface: %08
l
x
\n
"
,
hres
);
SET_EXPECT
(
outer_QI_test
);
SET_EXPECT
(
outer_QI_test
);
hres
=
IUnknown_QueryInterface
(
unk2
,
&
outer_test_iid
,
(
void
**
)
&
unk3
);
hres
=
IUnknown_QueryInterface
(
unk2
,
&
outer_test_iid
,
(
void
**
)
&
unk3
);
CHECK_CALLED
(
outer_QI_test
);
CHECK_CALLED
(
outer_QI_test
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol iface: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol iface: %08
l
x
\n
"
,
hres
);
ok
(
unk3
==
(
IUnknown
*
)
0xdeadbeef
,
"unexpected unk2
\n
"
);
ok
(
unk3
==
(
IUnknown
*
)
0xdeadbeef
,
"unexpected unk2
\n
"
);
IUnknown_Release
(
unk2
);
IUnknown_Release
(
unk2
);
...
@@ -678,7 +678,7 @@ static void test_com_aggregation(const CLSID *clsid)
...
@@ -678,7 +678,7 @@ static void test_com_aggregation(const CLSID *clsid)
unk
=
(
void
*
)
0xdeadbeef
;
unk
=
(
void
*
)
0xdeadbeef
;
hres
=
IClassFactory_CreateInstance
(
class_factory
,
&
outer
,
&
IID_IInternetProtocol
,
(
void
**
)
&
unk
);
hres
=
IClassFactory_CreateInstance
(
class_factory
,
&
outer
,
&
IID_IInternetProtocol
,
(
void
**
)
&
unk
);
ok
(
hres
==
CLASS_E_NOAGGREGATION
,
"CreateInstance returned: %08x
\n
"
,
hres
);
ok
(
hres
==
CLASS_E_NOAGGREGATION
,
"CreateInstance returned: %08
l
x
\n
"
,
hres
);
ok
(
!
unk
,
"unk = %p
\n
"
,
unk
);
ok
(
!
unk
,
"unk = %p
\n
"
,
unk
);
IClassFactory_Release
(
class_factory
);
IClassFactory_Release
(
class_factory
);
...
...
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