From f3b6069ebd59acefb13d1733e68b85312fdcc1ca Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 11 May 2015 12:50:02 +0000 Subject: [PATCH] [WINDOWSCODECS_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246 svn path=/trunk/; revision=67656 --- rostests/winetests/windowscodecs/info.c | 3 --- rostests/winetests/windowscodecs/metadata.c | 25 +++++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/rostests/winetests/windowscodecs/info.c b/rostests/winetests/windowscodecs/info.c index ec5c7c96d66..d5bfcc251bf 100644 --- a/rostests/winetests/windowscodecs/info.c +++ b/rostests/winetests/windowscodecs/info.c @@ -420,9 +420,7 @@ static void test_reader_info(void) count = 0xdeadbeef; hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, &count); -todo_wine ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); -todo_wine ok(count == 0, "unexpected count %d\n", count); hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_ContainerFormatPng, @@ -432,7 +430,6 @@ todo_wine count = size = 0xdeadbeef; hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_ContainerFormatPng, 0, NULL, &count, &size); -todo_wine ok(hr == WINCODEC_ERR_COMPONENTNOTFOUND || broken(hr == S_OK) /* Windows XP */, "GetPatterns failed, hr=%x\n", hr); ok(count == 0xdeadbeef, "unexpected count %d\n", count); diff --git a/rostests/winetests/windowscodecs/metadata.c b/rostests/winetests/windowscodecs/metadata.c index 5757003e1e6..7ae29430ff9 100644 --- a/rostests/winetests/windowscodecs/metadata.c +++ b/rostests/winetests/windowscodecs/metadata.c @@ -845,18 +845,25 @@ static void test_create_reader(void) stream = create_stream(metadata_tEXt, sizeof(metadata_tEXt)); + hr = IWICComponentFactory_CreateMetadataReaderFromContainer(factory, + NULL, NULL, WICPersistOptionsDefault, + stream, &reader); + ok(hr == E_INVALIDARG, "CreateMetadataReaderFromContainer failed, hr=%x\n", hr); + + hr = IWICComponentFactory_CreateMetadataReaderFromContainer(factory, + &GUID_ContainerFormatPng, NULL, WICPersistOptionsDefault, + NULL, &reader); + ok(hr == E_INVALIDARG, "CreateMetadataReaderFromContainer failed, hr=%x\n", hr); + + hr = IWICComponentFactory_CreateMetadataReaderFromContainer(factory, + &GUID_ContainerFormatPng, NULL, WICPersistOptionsDefault, + stream, NULL); + ok(hr == E_INVALIDARG, "CreateMetadataReaderFromContainer failed, hr=%x\n", hr); + hr = IWICComponentFactory_CreateMetadataReaderFromContainer(factory, &GUID_ContainerFormatPng, NULL, WICPersistOptionsDefault, stream, &reader); -todo_wine ok(hr == S_OK, "CreateMetadataReaderFromContainer failed, hr=%x\n", hr); - /* NOTE: removed once Wine is fixed */ - if (FAILED(hr)) - { - IStream_Release(stream); - IWICComponentFactory_Release(factory); - return; - } if (SUCCEEDED(hr)) { @@ -912,7 +919,7 @@ static void test_metadata_png(void) IWICMetadataReader *reader; GUID containerformat; HRESULT hr; - UINT count; + UINT count=0xdeadbeef; hr = CoCreateInstance(&CLSID_WICPngDecoder, NULL, CLSCTX_INPROC_SERVER, &IID_IWICBitmapDecoder, (void**)&decoder);