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
f79ffe47
Commit
f79ffe47
authored
Jan 22, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Fixed protocol tests on IE7.
parent
6e58579e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
protocol.c
dlls/mshtml/protocol.c
+4
-4
protocol.c
dlls/mshtml/tests/protocol.c
+11
-5
No files found.
dlls/mshtml/protocol.c
View file @
f79ffe47
...
...
@@ -584,9 +584,9 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
if
(
len
<
sizeof
(
wszRes
)
/
sizeof
(
wszRes
[
0
])
||
memcmp
(
url
,
wszRes
,
sizeof
(
wszRes
)))
{
WARN
(
"Wrong protocol of url: %s
\n
"
,
debugstr_w
(
url
));
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
MK_E_SYNTAX
,
0
,
NULL
);
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
E_INVALIDARG
,
0
,
NULL
);
mshtml_free
(
url
);
return
MK_E_SYNTAX
;
return
E_INVALIDARG
;
}
url_dll
=
url
+
sizeof
(
wszRes
)
/
sizeof
(
wszRes
[
0
]);
...
...
@@ -803,11 +803,11 @@ static HRESULT WINAPI ResProtocolInfo_ParseUrl(IInternetProtocolInfo *iface, LPC
static
const
WCHAR
wszRes
[]
=
{
'r'
,
'e'
,
's'
,
':'
,
'/'
,
'/'
};
if
(
strlenW
(
pwzUrl
)
<=
sizeof
(
wszRes
)
/
sizeof
(
WCHAR
)
||
memcmp
(
pwzUrl
,
wszRes
,
sizeof
(
wszRes
)))
return
MK_E_SYNTAX
;
return
E_INVALIDARG
;
ptr
=
strchrW
(
pwzUrl
+
sizeof
(
wszRes
)
/
sizeof
(
WCHAR
),
'/'
);
if
(
!
ptr
)
return
MK_E_SYNTAX
;
return
E_INVALIDARG
;
size
=
ptr
-
pwzUrl
+
sizeof
(
wszFile
)
/
sizeof
(
WCHAR
)
-
sizeof
(
wszRes
)
/
sizeof
(
WCHAR
);
if
(
size
>=
cchResult
)
...
...
dlls/mshtml/tests/protocol.c
View file @
f79ffe47
...
...
@@ -126,7 +126,9 @@ static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HR
ok
((
hrResult
&
0xffff0000
)
==
((
FACILITY_WIN32
<<
16
)
|
0x80000000
)
||
expect_hrResult
,
"expected win32 err or %08x got: %08x
\n
"
,
expect_hrResult
,
hrResult
);
else
ok
(
hrResult
==
expect_hrResult
,
"expected: %08x got: %08x
\n
"
,
expect_hrResult
,
hrResult
);
ok
(
hrResult
==
expect_hrResult
||
((
expect_hrResult
==
E_INVALIDARG
||
expect_hrResult
==
HRESULT_FROM_WIN32
(
ERROR_RESOURCE_TYPE_NOT_FOUND
))
&&
hrResult
==
MK_E_SYNTAX
),
"expected: %08x got: %08x
\n
"
,
expect_hrResult
,
hrResult
);
ok
(
dwError
==
0
,
"dwError = %d
\n
"
,
dwError
);
ok
(
!
szResult
,
"szResult != NULL
\n
"
);
...
...
@@ -213,7 +215,9 @@ static void test_protocol_fail(IInternetProtocol *protocol, LPCWSTR url, HRESULT
ok
((
hres
&
0xffff0000
)
==
((
FACILITY_WIN32
<<
16
)
|
0x80000000
)
||
hres
==
expect_hrResult
,
"expected win32 err or %08x got: %08x
\n
"
,
expected_hres
,
hres
);
else
ok
(
hres
==
expected_hres
,
"expected: %08x got: %08x
\n
"
,
expected_hres
,
hres
);
ok
(
hres
==
expected_hres
||
((
expected_hres
==
E_INVALIDARG
||
expected_hres
==
HRESULT_FROM_WIN32
(
ERROR_RESOURCE_TYPE_NOT_FOUND
))
&&
hres
==
MK_E_SYNTAX
),
"expected: %08x got: %08x
\n
"
,
expected_hres
,
hres
);
CHECK_CALLED
(
GetBindInfo
);
CHECK_CALLED
(
ReportResult
);
...
...
@@ -290,7 +294,8 @@ static void test_res_protocol(void)
hres
=
IInternetProtocolInfo_ParseUrl
(
protocol_info
,
wrong_url1
,
PARSE_SECURITY_URL
,
0
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]),
&
size
,
0
);
ok
(
hres
==
MK_E_SYNTAX
,
"ParseUrl failed: %08x, expected MK_E_SYNTAX
\n
"
,
hres
);
ok
(
hres
==
MK_E_SYNTAX
||
hres
==
E_INVALIDARG
,
"ParseUrl failed: %08x, expected MK_E_SYNTAX
\n
"
,
hres
);
size
=
0xdeadbeef
;
buf
[
0
]
=
'?'
;
...
...
@@ -375,8 +380,9 @@ static void test_res_protocol(void)
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocol: %08x
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
{
test_protocol_fail
(
protocol
,
wrong_url1
,
MK_E_SYNTAX
,
FALSE
);
test_protocol_fail
(
protocol
,
wrong_url2
,
MK_E_SYNTAX
,
FALSE
);
test_protocol_fail
(
protocol
,
wrong_url1
,
E_INVALIDARG
,
FALSE
);
test_protocol_fail
(
protocol
,
wrong_url2
,
HRESULT_FROM_WIN32
(
ERROR_RESOURCE_TYPE_NOT_FOUND
),
FALSE
);
test_protocol_fail
(
protocol
,
wrong_url3
,
E_FAIL
,
TRUE
);
test_protocol_fail
(
protocol
,
wrong_url4
,
E_FAIL
,
TRUE
);
...
...
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