Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ed2cf42b
Commit
ed2cf42b
authored
Aug 06, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
Aug 07, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Add tests for synchronous vs asynchronous binding.
parent
97e99956
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
6 deletions
+26
-6
url.c
dlls/urlmon/tests/url.c
+26
-6
No files found.
dlls/urlmon/tests/url.c
View file @
ed2cf42b
...
...
@@ -104,7 +104,8 @@ static const WCHAR MK_URL[] = {'m','k',':','@','M','S','I','T','S','t','o','r','
static
const
WCHAR
wszIndexHtml
[]
=
{
'i'
,
'n'
,
'd'
,
'e'
,
'x'
,
'.'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
static
BOOL
stopped_binding
=
FALSE
,
emulate_protocol
=
FALSE
;
static
BOOL
stopped_binding
=
FALSE
,
emulate_protocol
=
FALSE
,
data_available
=
FALSE
,
http_is_first
=
TRUE
;
static
DWORD
read
=
0
,
bindf
=
0
;
static
const
LPCWSTR
urls
[]
=
{
...
...
@@ -612,6 +613,7 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallback *iface, DWOR
BYTE
buf
[
512
];
CHECK_EXPECT2
(
OnDataAvailable
);
data_available
=
TRUE
;
if
(
0
)
{
...
...
@@ -768,6 +770,8 @@ static void test_BindToStorage(int protocol, BOOL emul)
test_protocol
=
protocol
;
emulate_protocol
=
emul
;
stopped_binding
=
FALSE
;
data_available
=
FALSE
;
SET_EXPECT
(
QueryInterface_IServiceProvider
);
hres
=
CreateAsyncBindCtx
(
0
,
&
bsc
,
NULL
,
&
bctx
);
...
...
@@ -837,20 +841,20 @@ static void test_BindToStorage(int protocol, BOOL emul)
trace
(
"Network unreachable, skipping tests
\n
"
);
return
;
}
ok
(
SUCCEEDED
(
hres
),
"IMoniker_BindToStorage failed: %08x
\n
"
,
hres
);
if
(
!
SUCCEEDED
(
hres
))
return
;
if
(
test_protocol
==
HTTP_TEST
)
{
todo_wine
{
if
(
(
bindf
&
BINDF_ASYNCHRONOUS
)
&&
!
data_available
)
{
ok
(
hres
==
MK_S_ASYNCHRONOUS
,
"IMoniker_BindToStorage failed: %08x
\n
"
,
hres
);
ok
(
unk
==
NULL
,
"istr should be NULL
\n
"
);
}
}
else
{
ok
(
hres
==
S_OK
,
"IMoniker_BindToStorage failed: %08x
\n
"
,
hres
);
ok
(
unk
!=
NULL
,
"unk == NULL
\n
"
);
}
if
(
unk
)
IUnknown_Release
(
unk
);
while
(
!
stopped_binding
&&
GetMessage
(
&
msg
,
NULL
,
0
,
0
))
{
while
((
bindf
&
BINDF_ASYNCHRONOUS
)
&&
!
stopped_binding
&&
GetMessage
(
&
msg
,
NULL
,
0
,
0
))
{
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
...
...
@@ -870,8 +874,13 @@ static void test_BindToStorage(int protocol, BOOL emul)
* called on WinXP but not on Win98 */
CLEAR_CALLED
(
QueryInterface_IHttpNegotiate2
);
CLEAR_CALLED
(
GetRootSecurityId
);
if
(
http_is_first
)
{
CHECK_CALLED
(
OnProgress_FINDINGRESOURCE
);
CHECK_CALLED
(
OnProgress_CONNECTING
);
}
else
todo_wine
{
CHECK_NOT_CALLED
(
OnProgress_FINDINGRESOURCE
);
CHECK_NOT_CALLED
(
OnProgress_CONNECTING
);
}
CHECK_CALLED
(
OnProgress_SENDINGREQUEST
);
todo_wine
CHECK_CALLED
(
OnResponse
);
todo_wine
{
CHECK_CALLED
(
OnProgress_MIMETYPEAVAILABLE
);
}
...
...
@@ -889,6 +898,9 @@ static void test_BindToStorage(int protocol, BOOL emul)
ok
(
IMoniker_Release
(
mon
)
==
0
,
"mon should be destroyed here
\n
"
);
ok
(
IBindCtx_Release
(
bctx
)
==
0
,
"bctx should be destroyed here
\n
"
);
if
(
test_protocol
==
HTTP_TEST
)
http_is_first
=
FALSE
;
}
static
void
set_file_url
(
void
)
...
...
@@ -953,6 +965,14 @@ START_TEST(url)
test_CreateAsyncBindCtx
();
test_CreateAsyncBindCtxEx
();
trace
(
"synchronous http test...
\n
"
);
test_BindToStorage
(
HTTP_TEST
,
FALSE
);
trace
(
"synchronous file test...
\n
"
);
create_file
();
test_BindToStorage
(
FILE_TEST
,
FALSE
);
DeleteFileW
(
wszIndexHtml
);
bindf
=
BINDF_ASYNCHRONOUS
|
BINDF_ASYNCSTORAGE
|
BINDF_PULLDATA
;
trace
(
"http test...
\n
"
);
...
...
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