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
eb68aa73
Commit
eb68aa73
authored
Oct 29, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report BINDSTATUS_SENDINGREQUEST in FileProtocol::Start.
parent
481bccc8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
file.c
dlls/urlmon/file.c
+3
-0
protocol.c
dlls/urlmon/tests/protocol.c
+16
-0
No files found.
dlls/urlmon/file.c
View file @
eb68aa73
...
...
@@ -104,6 +104,7 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
LARGE_INTEGER
size
;
DWORD
len
;
LPWSTR
url
,
mime
=
NULL
;
WCHAR
null_char
=
0
;
HRESULT
hres
;
static
const
WCHAR
wszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
};
...
...
@@ -132,6 +133,8 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
IInternetProtocolSink_ReportProgress
(
pOIProtSink
,
BINDSTATUS_DIRECTBIND
,
mime
);
if
(
!
This
->
file
)
{
IInternetProtocolSink_ReportProgress
(
pOIProtSink
,
BINDSTATUS_SENDINGREQUEST
,
&
null_char
);
This
->
file
=
CreateFileW
(
url
+
sizeof
(
wszFile
)
/
sizeof
(
WCHAR
),
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
...
...
dlls/urlmon/tests/protocol.c
View file @
eb68aa73
...
...
@@ -50,6 +50,7 @@
DEFINE_EXPECT
(
GetBindInfo
);
DEFINE_EXPECT
(
ReportProgress_MIMETYPEAVAILABLE
);
DEFINE_EXPECT
(
ReportProgress_DIRECTBIND
);
DEFINE_EXPECT
(
ReportProgress_SENDINGREQUEST
);
DEFINE_EXPECT
(
ReportProgress_CACHEFILENAMEAVAILABLE
);
DEFINE_EXPECT
(
ReportData
);
DEFINE_EXPECT
(
ReportResult
);
...
...
@@ -102,6 +103,14 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
if
(
szStatusText
)
ok
(
!
lstrcmpW
(
szStatusText
,
file_name
),
"szStatusText != file_name
\n
"
);
break
;
case
BINDSTATUS_SENDINGREQUEST
:
CHECK_EXPECT
(
ReportProgress_SENDINGREQUEST
);
ok
(
szStatusText
!=
NULL
,
"szStatusText == NULL
\n
"
);
if
(
szStatusText
)
ok
(
!*
szStatusText
,
"wrong szStatusText
\n
"
);
break
;
default:
ok
(
0
,
"Unexpected call %ld
\n
"
,
ulStatusCode
);
};
return
S_OK
;
...
...
@@ -204,11 +213,13 @@ static void file_protocol_start(IInternetProtocol *protocol, LPCWSTR url, BOOL i
SET_EXPECT
(
GetBindInfo
);
SET_EXPECT
(
ReportProgress_DIRECTBIND
);
if
(
is_first
)
{
SET_EXPECT
(
ReportProgress_SENDINGREQUEST
);
SET_EXPECT
(
ReportProgress_CACHEFILENAMEAVAILABLE
);
SET_EXPECT
(
ReportProgress_MIMETYPEAVAILABLE
);
SET_EXPECT
(
ReportResult
);
}
SET_EXPECT
(
ReportData
);
expect_hrResult
=
S_OK
;
hres
=
IInternetProtocol_Start
(
protocol
,
url
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
...
...
@@ -217,6 +228,7 @@ static void file_protocol_start(IInternetProtocol *protocol, LPCWSTR url, BOOL i
CHECK_CALLED
(
GetBindInfo
);
CHECK_CALLED
(
ReportProgress_DIRECTBIND
);
if
(
is_first
)
{
CHECK_CALLED
(
ReportProgress_SENDINGREQUEST
);
CHECK_CALLED
(
ReportProgress_CACHEFILENAMEAVAILABLE
);
CHECK_CALLED
(
ReportProgress_MIMETYPEAVAILABLE
);
CHECK_CALLED
(
ReportResult
);
...
...
@@ -367,6 +379,7 @@ static void test_file_protocol(void) {
SET_EXPECT
(
GetBindInfo
);
SET_EXPECT
(
ReportProgress_DIRECTBIND
);
SET_EXPECT
(
ReportProgress_SENDINGREQUEST
);
SET_EXPECT
(
ReportResult
);
expect_hrResult
=
INET_E_RESOURCE_NOT_FOUND
;
hres
=
IInternetProtocol_Start
(
protocol
,
index_url
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
...
...
@@ -374,6 +387,7 @@ static void test_file_protocol(void) {
"Start failed: %08lx expected INET_E_RESOURCE_NOT_FOUND
\n
"
,
hres
);
CHECK_CALLED
(
GetBindInfo
);
CHECK_CALLED
(
ReportProgress_DIRECTBIND
);
CHECK_CALLED
(
ReportProgress_SENDINGREQUEST
);
CHECK_CALLED
(
ReportResult
);
IInternetProtocol_Release
(
protocol
);
...
...
@@ -386,6 +400,7 @@ static void test_file_protocol(void) {
SET_EXPECT
(
GetBindInfo
);
SET_EXPECT
(
ReportProgress_DIRECTBIND
);
SET_EXPECT
(
ReportProgress_SENDINGREQUEST
);
SET_EXPECT
(
ReportResult
);
expect_hrResult
=
INET_E_RESOURCE_NOT_FOUND
;
hres
=
IInternetProtocol_Start
(
protocol
,
index_url2
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
...
...
@@ -393,6 +408,7 @@ static void test_file_protocol(void) {
"Start failed: %08lx, expected INET_E_RESOURCE_NOT_FOUND
\n
"
,
hres
);
CHECK_CALLED
(
GetBindInfo
);
CHECK_CALLED
(
ReportProgress_DIRECTBIND
);
CHECK_CALLED
(
ReportProgress_SENDINGREQUEST
);
CHECK_CALLED
(
ReportResult
);
IInternetProtocol_Release
(
protocol
);
...
...
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