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
74d49757
Commit
74d49757
authored
Mar 01, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Fix FindMimeFromData tests on IE7.
parent
748032e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
misc.c
dlls/urlmon/tests/misc.c
+11
-8
urlmon_main.c
dlls/urlmon/urlmon_main.c
+2
-2
No files found.
dlls/urlmon/tests/misc.c
View file @
74d49757
...
...
@@ -367,14 +367,15 @@ static const WCHAR mimeAppXMSDownload[] =
static
const
struct
{
LPCWSTR
url
;
LPCWSTR
mime
;
HRESULT
hres
;
}
mime_tests
[]
=
{
{
url1
,
mimeTextHtml
},
{
url2
,
mimeTextHtml
},
{
url3
,
mimeTextHtml
},
{
url4
,
NULL
},
{
url5
,
NULL
},
{
url6
,
NULL
},
{
url7
,
NULL
}
{
url1
,
mimeTextHtml
,
S_OK
},
{
url2
,
mimeTextHtml
,
S_OK
},
{
url3
,
mimeTextHtml
,
S_OK
},
{
url4
,
NULL
,
E_FAIL
},
{
url5
,
NULL
,
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)
},
{
url6
,
NULL
,
E_FAIL
},
{
url7
,
NULL
,
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)
}
};
static
BYTE
data1
[]
=
"test data
\n
"
;
...
...
@@ -539,7 +540,9 @@ static void test_FindMimeFromData(void)
ok
(
!
lstrcmpW
(
mime
,
mime_tests
[
i
].
mime
),
"[%d] wrong mime
\n
"
,
i
);
CoTaskMemFree
(
mime
);
}
else
{
ok
(
hres
==
E_FAIL
,
"[%d] FindMimeFromData failed: %08x, expected E_FAIL
\n
"
,
i
,
hres
);
ok
(
hres
==
E_FAIL
||
hres
==
mime_tests
[
i
].
hres
,
"[%d] FindMimeFromData failed: %08x, expected %08x
\n
"
,
i
,
hres
,
mime_tests
[
i
].
hres
);
ok
(
mime
==
(
LPWSTR
)
0xf0f0f0f0
,
"[%d] mime != 0xf0f0f0f0
\n
"
,
i
);
}
...
...
dlls/urlmon/urlmon_main.c
View file @
74d49757
...
...
@@ -647,13 +647,13 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
res
=
RegOpenKeyW
(
HKEY_CLASSES_ROOT
,
ptr
,
&
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
return
E_FAIL
;
return
HRESULT_FROM_WIN32
(
res
)
;
size
=
sizeof
(
mime
);
res
=
RegQueryValueExW
(
hkey
,
wszContentType
,
NULL
,
NULL
,
(
LPBYTE
)
mime
,
&
size
);
RegCloseKey
(
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
return
E_FAIL
;
return
HRESULT_FROM_WIN32
(
res
)
;
*
ppwzMimeOut
=
CoTaskMemAlloc
(
size
);
memcpy
(
*
ppwzMimeOut
,
mime
,
size
);
...
...
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