[PATCH 2/2] mshtml v2: non-HTML resources accessed through the res:// protocol have resource type 2110

Jacek Caban jacek at codeweavers.com
Mon Apr 13 12:18:58 CDT 2020


Hi Damjan,

On 10.04.2020 13:30, Damjan Jovanovic wrote:
> +    test_res_url_fail("/image-bitmap.gif", HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), TRUE, image_gif);
> +    test_res_url_fail("/image-data.gif", HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), TRUE, image_gif);
> +    test_res_url_fail("/image-html.gif", S_OK, FALSE, image_gif);
> +    test_res_url_fail("/image-2110.gif", S_OK, FALSE, image_gif);
> +
>       if(GetProcAddress(GetModuleHandleA("urlmon.dll"), "CreateUri")) {
>           test_res_url("/test/dir/dir2/res.html?query_part");
>           test_res_url("/test/dir/dir2/res.html#hash_part");
> diff --git a/dlls/mshtml/tests/rsrc.rc b/dlls/mshtml/tests/rsrc.rc
> index 05bc836ac6..928791f515 100644
> --- a/dlls/mshtml/tests/rsrc.rc
> +++ b/dlls/mshtml/tests/rsrc.rc
> @@ -80,3 +80,15 @@ res.html test "jstest.html"
>   
>   /* @makedep: jstest.html */
>   dir/dir2/res.html test "jstest.html"
> +
> +/* @makedep: image.gif */
> +image-bitmap.gif RCDATA "image.gif"
> +
> +/* @makedep: image.gif */
> +image-data.gif RCDATA "image.gif"
> +
> +/* @makedep: image.gif */
> +image-html.gif HTML "image.gif"
> +
> +/* @makedep: image.gif */
> +image-2110.gif 2110 "image.gif"


Do you really need a new .gif file for those tests? If you meant to test 
non-HTML MIME type, maybe you could use one of existing .js files? It's 
not related to the thing you're fixing, so I'd suggest that as a 
separated patch.


For the main part, you could just add jstest.html to resource once more, 
with a different type and name. Then you could just use something like 
test_res_url("res2120.html").


Thanks,

Jacek




More information about the wine-devel mailing list