[WINDOWSCODECS_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 11 May 2015 12:50:02 +0000 (12:50 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 11 May 2015 12:50:02 +0000 (12:50 +0000)
svn path=/trunk/; revision=67656

rostests/winetests/windowscodecs/info.c
rostests/winetests/windowscodecs/metadata.c

index ec5c7c9..d5bfcc2 100644 (file)
@@ -420,9 +420,7 @@ static void test_reader_info(void)
 
     count = 0xdeadbeef;
     hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, &count);
 
     count = 0xdeadbeef;
     hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, &count);
-todo_wine
     ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr);
     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,
     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);
     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(hr == WINCODEC_ERR_COMPONENTNOTFOUND || broken(hr == S_OK) /* Windows XP */,
         "GetPatterns failed, hr=%x\n", hr);
     ok(count == 0xdeadbeef, "unexpected count %d\n", count);
index 5757003..7ae2943 100644 (file)
@@ -845,18 +845,25 @@ static void test_create_reader(void)
 
     stream = create_stream(metadata_tEXt, sizeof(metadata_tEXt));
 
 
     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);
     hr = IWICComponentFactory_CreateMetadataReaderFromContainer(factory,
         &GUID_ContainerFormatPng, NULL, WICPersistOptionsDefault,
         stream, &reader);
-todo_wine
     ok(hr == S_OK, "CreateMetadataReaderFromContainer failed, hr=%x\n", hr);
     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))
     {
 
     if (SUCCEEDED(hr))
     {
@@ -912,7 +919,7 @@ static void test_metadata_png(void)
     IWICMetadataReader *reader;
     GUID containerformat;
     HRESULT hr;
     IWICMetadataReader *reader;
     GUID containerformat;
     HRESULT hr;
-    UINT count;
+    UINT count=0xdeadbeef;
 
     hr = CoCreateInstance(&CLSID_WICPngDecoder, NULL, CLSCTX_INPROC_SERVER,
         &IID_IWICBitmapDecoder, (void**)&decoder);
 
     hr = CoCreateInstance(&CLSID_WICPngDecoder, NULL, CLSCTX_INPROC_SERVER,
         &IID_IWICBitmapDecoder, (void**)&decoder);