Author: akhaldi Date: Mon May 11 12:50:02 2015 New Revision: 67656
URL: http://svn.reactos.org/svn/reactos?rev=67656&view=rev Log: [WINDOWSCODECS_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246
Modified: trunk/rostests/winetests/windowscodecs/info.c trunk/rostests/winetests/windowscodecs/metadata.c
Modified: trunk/rostests/winetests/windowscodecs/info.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/in... ============================================================================== --- trunk/rostests/winetests/windowscodecs/info.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/info.c [iso-8859-1] Mon May 11 12:50:02 2015 @@ -420,69 +420,12 @@
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, 0, NULL, NULL, NULL); ok(hr == E_INVALIDARG, "GetPatterns failed, hr=%x\n", hr); - - 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); - ok(size == 0xdeadbeef, "unexpected size %d\n", size); - - IWICMetadataReaderInfo_Release(reader_info); - - IWICComponentInfo_Release(info); - - hr = IWICImagingFactory_CreateComponentInfo(factory, &CLSID_WICXMPStructMetadataReader, &info); -todo_wine - ok(hr == S_OK, "CreateComponentInfo failed, hr=%x\n", hr); - - if (FAILED(hr)) - { - IWICImagingFactory_Release(factory); - return; - } - - hr = IWICComponentInfo_QueryInterface(info, &IID_IWICMetadataReaderInfo, (void**)&reader_info); - ok(hr == S_OK, "QueryInterface failed, hr=%x\n", hr); - - hr = IWICMetadataReaderInfo_GetCLSID(reader_info, NULL); - ok(hr == E_INVALIDARG, "GetCLSID failed, hr=%x\n", hr); - - hr = IWICMetadataReaderInfo_GetCLSID(reader_info, &clsid); - ok(hr == S_OK, "GetCLSID failed, hr=%x\n", hr); - ok(IsEqualGUID(&CLSID_WICXMPStructMetadataReader, &clsid), "GetCLSID returned wrong result\n"); - - hr = IWICMetadataReaderInfo_GetMetadataFormat(reader_info, &clsid); - ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr); - ok(IsEqualGUID(&GUID_MetadataFormatXMPStruct, &clsid), "GetMetadataFormat returned wrong result\n"); - - hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "GetContainerFormats failed, hr=%x\n", hr); - - count = 0xdeadbeef; - hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, &count); - ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); - ok(count >= 2, "unexpected count %d\n", count); - - count = 0xdeadbeef; - hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 1, container_formats, &count); - ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); - ok(count == 1, "unexpected count %d\n", count); - - count = 0xdeadbeef; - hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 10, container_formats, &count); - ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); - ok(count == min(count, 10), "unexpected count %d\n", count);
count = size = 0xdeadbeef; hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_ContainerFormatPng, @@ -492,6 +435,60 @@ ok(count == 0xdeadbeef, "unexpected count %d\n", count); ok(size == 0xdeadbeef, "unexpected size %d\n", size);
+ IWICMetadataReaderInfo_Release(reader_info); + + IWICComponentInfo_Release(info); + + hr = IWICImagingFactory_CreateComponentInfo(factory, &CLSID_WICXMPStructMetadataReader, &info); +todo_wine + ok(hr == S_OK, "CreateComponentInfo failed, hr=%x\n", hr); + + if (FAILED(hr)) + { + IWICImagingFactory_Release(factory); + return; + } + + hr = IWICComponentInfo_QueryInterface(info, &IID_IWICMetadataReaderInfo, (void**)&reader_info); + ok(hr == S_OK, "QueryInterface failed, hr=%x\n", hr); + + hr = IWICMetadataReaderInfo_GetCLSID(reader_info, NULL); + ok(hr == E_INVALIDARG, "GetCLSID failed, hr=%x\n", hr); + + hr = IWICMetadataReaderInfo_GetCLSID(reader_info, &clsid); + ok(hr == S_OK, "GetCLSID failed, hr=%x\n", hr); + ok(IsEqualGUID(&CLSID_WICXMPStructMetadataReader, &clsid), "GetCLSID returned wrong result\n"); + + hr = IWICMetadataReaderInfo_GetMetadataFormat(reader_info, &clsid); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr); + ok(IsEqualGUID(&GUID_MetadataFormatXMPStruct, &clsid), "GetMetadataFormat returned wrong result\n"); + + hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, NULL); + ok(hr == E_INVALIDARG, "GetContainerFormats failed, hr=%x\n", hr); + + count = 0xdeadbeef; + hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, &count); + ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); + ok(count >= 2, "unexpected count %d\n", count); + + count = 0xdeadbeef; + hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 1, container_formats, &count); + ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); + ok(count == 1, "unexpected count %d\n", count); + + count = 0xdeadbeef; + hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 10, container_formats, &count); + ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); + ok(count == min(count, 10), "unexpected count %d\n", count); + + count = size = 0xdeadbeef; + hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_ContainerFormatPng, + 0, NULL, &count, &size); + 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); + ok(size == 0xdeadbeef, "unexpected size %d\n", size); + count = size = 0xdeadbeef; hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_MetadataFormatXMP, 0, NULL, &count, &size);
Modified: trunk/rostests/winetests/windowscodecs/metadata.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/me... ============================================================================== --- trunk/rostests/winetests/windowscodecs/metadata.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/metadata.c [iso-8859-1] Mon May 11 12:50:02 2015 @@ -846,17 +846,24 @@ 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 @@ IWICMetadataReader *reader; GUID containerformat; HRESULT hr; - UINT count; + UINT count=0xdeadbeef;
hr = CoCreateInstance(&CLSID_WICPngDecoder, NULL, CLSCTX_INPROC_SERVER, &IID_IWICBitmapDecoder, (void**)&decoder);