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
210854ed
Commit
210854ed
authored
Jan 31, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added more protocol tests.
parent
f2aef4cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
protocol.c
dlls/urlmon/tests/protocol.c
+19
-8
No files found.
dlls/urlmon/tests/protocol.c
View file @
210854ed
...
...
@@ -36,17 +36,16 @@
#define SET_EXPECT(func) \
expect_ ## func = TRUE
#define CHECK_EXPECT(func) \
#define CHECK_EXPECT
2
(func) \
do { \
ok(expect_ ##func, "unexpected call " #func "\n"); \
expect_ ## func = FALSE; \
ok(expect_ ##func, "unexpected call " #func "\n"); \
called_ ## func = TRUE; \
}while(0)
#define CHECK_EXPECT
2
(func) \
#define CHECK_EXPECT(func) \
do { \
ok(expect_ ##func, "unexpected call " #func "\n");
\
called_ ## func = TRU
E; \
CHECK_EXPECT2(func);
\
expect_ ## func = FALS
E; \
}while(0)
#define CHECK_CALLED(func) \
...
...
@@ -357,6 +356,8 @@ static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOL
CHECK_CALLED
(
ReportProgress_SENDINGREQUEST
);
SET_EXPECT
(
OnResponse
);
SET_EXPECT
(
ReportProgress_MIMETYPEAVAILABLE
);
if
(
bindf
&
BINDF_NEEDFILE
)
SET_EXPECT
(
ReportProgress_CACHEFILENAMEAVAILABLE
);
}
SET_EXPECT
(
ReportData
);
...
...
@@ -368,6 +369,8 @@ static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOL
state
=
1
;
CHECK_CALLED
(
OnResponse
);
CHECK_CALLED
(
ReportProgress_MIMETYPEAVAILABLE
);
if
(
bindf
&
BINDF_NEEDFILE
)
CHECK_CALLED
(
ReportProgress_CACHEFILENAMEAVAILABLE
);
}
SetEvent
(
event_complete
);
...
...
@@ -423,8 +426,10 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
if
(
szStatusText
)
{
if
(
binding_test
)
ok
(
szStatusText
==
expect_wsz
,
"unexpected szStatusText
\n
"
);
else
if
(
tested_protocol
==
FILE_TEST
)
ok
(
!
lstrcmpW
(
szStatusText
,
file_name
),
"szStatusText =
\"
%s
\"\n
"
,
debugstr_w
(
szStatusText
));
else
ok
(
!
lstrcmpW
(
szStatusText
,
file_name
),
"szStatusText != file_name
\n
"
);
ok
(
szStatusText
!=
NULL
,
"szStatusText == NULL
\n
"
);
}
break
;
case
BINDSTATUS_FINDINGRESOURCE
:
...
...
@@ -1408,6 +1413,8 @@ static void test_file_protocol(void) {
test_file_protocol_url
(
index_url
);
bindf
=
BINDF_FROMURLMON
;
test_file_protocol_url
(
index_url
);
bindf
=
BINDF_FROMURLMON
|
BINDF_NEEDFILE
;
test_file_protocol_url
(
index_url
);
memcpy
(
buf
,
wszFile
,
sizeof
(
wszFile
));
len
=
sizeof
(
wszFile
)
/
sizeof
(
WCHAR
)
-
1
;
...
...
@@ -1639,11 +1646,15 @@ static void test_http_protocol(void)
bindf
=
BINDF_ASYNCHRONOUS
|
BINDF_ASYNCSTORAGE
|
BINDF_PULLDATA
|
BINDF_FROMURLMON
;
test_http_protocol_url
(
winehq_url
,
FALSE
);
trace
(
"Testing http protocol (to file)...
\n
"
);
bindf
=
BINDF_ASYNCHRONOUS
|
BINDF_ASYNCSTORAGE
|
BINDF_PULLDATA
|
BINDF_FROMURLMON
|
BINDF_NEEDFILE
;
test_http_protocol_url
(
winehq_url
,
FALSE
);
trace
(
"Testing http protocol (post data)...
\n
"
);
http_post_test
=
TRUE
;
/* Without this flag we get a ReportProgress_CACHEFILENAMEAVAILABLE
* notification with BINDVERB_POST */
bindf
|=
BINDF_NOWRITECACHE
;
bindf
=
BINDF_ASYNCHRONOUS
|
BINDF_ASYNCSTORAGE
|
BINDF_PULLDATA
|
BINDF_FROMURLMON
|
BINDF_NOWRITECACHE
;
test_http_protocol_url
(
posttest_url
,
TRUE
);
http_post_test
=
FALSE
;
}
...
...
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