winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2012
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
828 discussions
Start a n
N
ew thread
Dmitry Timoshkov : windowscodecs: Add a bunch of tests for Image Descriptor metadata reader.
by Alexandre Julliard
10 Sep '12
10 Sep '12
Module: wine Branch: master Commit: 7f93e0a6d2b3618b27c25ba36f323c21d32b0cde URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f93e0a6d2b3618b27c25ba36…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Sep 10 16:28:39 2012 +0900 windowscodecs: Add a bunch of tests for Image Descriptor metadata reader. --- dlls/windowscodecs/tests/metadata.c | 80 +++++++++++++++++++++++++++++++++++ include/wincodecsdk.idl | 2 + 2 files changed, 82 insertions(+), 0 deletions(-) diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 6ebeb3e..fec283e 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1338,6 +1338,85 @@ todo_wine IStream_Release(stream); } +static void test_metadata_IMD(void) +{ + static const WCHAR IMD_name[] = {'I','m','a','g','e',' ','D','e','s','c','r','i','p','t','o','r',' ','R','e','a','d','e','r',0}; + static const char IMD_data[] = "hello world!\x1\x2\x3\x4\x5\x6\x7\x8\xed\xa\xb\xc\xd\xe\xf"; + static const struct test_data td[8] = + { + { VT_UI2, 0, 0, { 0x201 }, NULL, { 'L','e','f','t',0 } }, + { VT_UI2, 0, 0, { 0x403 }, NULL, { 'T','o','p',0 } }, + { VT_UI2, 0, 0, { 0x605 }, NULL, { 'W','i','d','t','h',0 } }, + { VT_UI2, 0, 0, { 0x807 }, NULL, { 'H','e','i','g','h','t',0 } }, + { VT_BOOL, 0, 0, { 1 }, NULL, { 'L','o','c','a','l','C','o','l','o','r','T','a','b','l','e','F','l','a','g',0 } }, + { VT_BOOL, 0, 0, { 1 }, NULL, { 'I','n','t','e','r','l','a','c','e','F','l','a','g',0 } }, + { VT_BOOL, 0, 0, { 1 }, NULL, { 'S','o','r','t','F','l','a','g',0 } }, + { VT_UI1, 0, 0, { 5 }, NULL, { 'L','o','c','a','l','C','o','l','o','r','T','a','b','l','e','S','i','z','e',0 } } + }; + LARGE_INTEGER pos; + HRESULT hr; + IStream *stream; + IWICPersistStream *persist; + IWICMetadataReader *reader; + IWICMetadataHandlerInfo *info; + WCHAR name[64]; + UINT count, dummy; + GUID format; + CLSID id; + + hr = CoCreateInstance(&CLSID_WICIMDMetadataReader, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICMetadataReader, (void **)&reader); +todo_wine + ok(hr == S_OK || broken(hr == E_NOINTERFACE || hr == REGDB_E_CLASSNOTREG) /* before Win7 */, + "CoCreateInstance error %#x\n", hr); + + stream = create_stream(IMD_data, sizeof(IMD_data)); + + if (SUCCEEDED(hr)) + { + pos.QuadPart = 12; + hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + ok(hr == S_OK, "IStream_Seek error %#x\n", hr); + + hr = IUnknown_QueryInterface(reader, &IID_IWICPersistStream, (void **)&persist); + ok(hr == S_OK, "QueryInterface error %#x\n", hr); + + hr = IWICPersistStream_Load(persist, stream); + ok(hr == S_OK, "Load error %#x\n", hr); + + IWICPersistStream_Release(persist); + } + + if (SUCCEEDED(hr)) + { + hr = IWICMetadataReader_GetCount(reader, &count); + ok(hr == S_OK, "GetCount error %#x\n", hr); + ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count); + + compare_metadata(reader, td, count); + + hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr); + ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), "wrong format %s\n", debugstr_guid(&format)); + + hr = IWICMetadataReader_GetMetadataHandlerInfo(reader, &info); + ok(hr == S_OK, "GetMetadataHandlerInfo error %#x\n", hr); + + hr = IWICMetadataHandlerInfo_GetCLSID(info, &id); + ok(hr == S_OK, "GetCLSID error %#x\n", hr); + ok(IsEqualGUID(&id, &CLSID_WICIMDMetadataReader), "wrong CLSID %s\n", debugstr_guid(&id)); + + hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy); + ok(hr == S_OK, "GetFriendlyName error %#x\n", hr); + ok(lstrcmpW(name, IMD_name) == 0, "wrong IMD reader name %s\n", wine_dbgstr_w(name)); + + IWICMetadataHandlerInfo_Release(info); + IWICMetadataReader_Release(reader); + } + + IStream_Release(stream); +} + START_TEST(metadata) { CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); @@ -1350,6 +1429,7 @@ START_TEST(metadata) test_metadata_png(); test_metadata_gif(); test_metadata_LSD(); + test_metadata_IMD(); CoUninitialize(); } diff --git a/include/wincodecsdk.idl b/include/wincodecsdk.idl index 222ae64..ce7cf9f 100644 --- a/include/wincodecsdk.idl +++ b/include/wincodecsdk.idl @@ -59,6 +59,8 @@ cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataReader, 0x01b90d9a,0x8209,0x47f cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataWriter, 0x22c21f93,0x7ddb,0x411c,0x9b,0x17,0xc5,0xb7,0xbd,0x06,0x4a,0xbc);") cpp_quote("DEFINE_GUID(CLSID_WICLSDMetadataReader, 0x41070793,0x59e4,0x479a,0xa1,0xf7,0x95,0x4a,0xdc,0x2e,0xf5,0xfc);") cpp_quote("DEFINE_GUID(CLSID_WICLSDMetadataWriter, 0x73c037e7,0xe5d9,0x4954,0x87,0x6a,0x6d,0xa8,0x1d,0x6e,0x57,0x68);") +cpp_quote("DEFINE_GUID(CLSID_WICIMDMetadataReader, 0x7447a267,0x0015,0x42c8,0xa8,0xf1,0xfb,0x3b,0x94,0xc6,0x83,0x61);") +cpp_quote("DEFINE_GUID(CLSID_WICIMDMetadataWriter, 0x8c89071f,0x452e,0x4e95,0x96,0x82,0x9d,0x10,0x24,0x62,0x71,0x72);") typedef struct WICMetadataPattern { ULARGE_INTEGER Position;
1
0
0
0
Dmitry Timoshkov : windowscodecs: Add a bunch of tests for Logical Screen Descriptor metadata reader.
by Alexandre Julliard
10 Sep '12
10 Sep '12
Module: wine Branch: master Commit: 0b0bf572c1e59f95bd8e8a49d32f67ad1ad01b38 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0b0bf572c1e59f95bd8e8a49d…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Sep 10 16:27:48 2012 +0900 windowscodecs: Add a bunch of tests for Logical Screen Descriptor metadata reader. --- dlls/windowscodecs/tests/metadata.c | 81 +++++++++++++++++++++++++++++++++++ include/wincodecsdk.idl | 2 + 2 files changed, 83 insertions(+), 0 deletions(-) diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 94a3d3e..6ebeb3e 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -1258,6 +1258,86 @@ todo_wine IWICBitmapDecoder_Release(decoder); } +static void test_metadata_LSD(void) +{ + static const WCHAR LSD_name[] = {'L','o','g','i','c','a','l',' ','S','c','r','e','e','n',' ','D','e','s','c','r','i','p','t','o','r',' ','R','e','a','d','e','r',0}; + static const char LSD_data[] = "hello world!\x1\x2\x3\x4\xab\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf"; + static const struct test_data td[9] = + { + { VT_UI1|VT_VECTOR, 0, 6, {'w','o','r','l','d','!'}, NULL, { 'S','i','g','n','a','t','u','r','e',0 } }, + { VT_UI2, 0, 0, { 0x201 }, NULL, { 'W','i','d','t','h',0 } }, + { VT_UI2, 0, 0, { 0x403 }, NULL, { 'H','e','i','g','h','t',0 } }, + { VT_BOOL, 0, 0, { 1 }, NULL, { 'G','l','o','b','a','l','C','o','l','o','r','T','a','b','l','e','F','l','a','g',0 } }, + { VT_UI1, 0, 0, { 2 }, NULL, { 'C','o','l','o','r','R','e','s','o','l','u','t','i','o','n',0 } }, + { VT_BOOL, 0, 0, { 1 }, NULL, { 'S','o','r','t','F','l','a','g',0 } }, + { VT_UI1, 0, 0, { 3 }, NULL, { 'G','l','o','b','a','l','C','o','l','o','r','T','a','b','l','e','S','i','z','e',0 } }, + { VT_UI1, 0, 0, { 6 }, NULL, { 'B','a','c','k','g','r','o','u','n','d','C','o','l','o','r','I','n','d','e','x',0 } }, + { VT_UI1, 0, 0, { 7 }, NULL, { 'P','i','x','e','l','A','s','p','e','c','t','R','a','t','i','o',0 } } + }; + LARGE_INTEGER pos; + HRESULT hr; + IStream *stream; + IWICPersistStream *persist; + IWICMetadataReader *reader; + IWICMetadataHandlerInfo *info; + WCHAR name[64]; + UINT count, dummy; + GUID format; + CLSID id; + + hr = CoCreateInstance(&CLSID_WICLSDMetadataReader, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICMetadataReader, (void **)&reader); +todo_wine + ok(hr == S_OK || broken(hr == E_NOINTERFACE || hr == REGDB_E_CLASSNOTREG) /* before Win7 */, + "CoCreateInstance error %#x\n", hr); + + stream = create_stream(LSD_data, sizeof(LSD_data)); + + if (SUCCEEDED(hr)) + { + pos.QuadPart = 6; + hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + ok(hr == S_OK, "IStream_Seek error %#x\n", hr); + + hr = IUnknown_QueryInterface(reader, &IID_IWICPersistStream, (void **)&persist); + ok(hr == S_OK, "QueryInterface error %#x\n", hr); + + hr = IWICPersistStream_Load(persist, stream); + ok(hr == S_OK, "Load error %#x\n", hr); + + IWICPersistStream_Release(persist); + } + + if (SUCCEEDED(hr)) + { + hr = IWICMetadataReader_GetCount(reader, &count); + ok(hr == S_OK, "GetCount error %#x\n", hr); + ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count); + + compare_metadata(reader, td, count); + + hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr); + ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), "wrong format %s\n", debugstr_guid(&format)); + + hr = IWICMetadataReader_GetMetadataHandlerInfo(reader, &info); + ok(hr == S_OK, "GetMetadataHandlerInfo error %#x\n", hr); + + hr = IWICMetadataHandlerInfo_GetCLSID(info, &id); + ok(hr == S_OK, "GetCLSID error %#x\n", hr); + ok(IsEqualGUID(&id, &CLSID_WICLSDMetadataReader), "wrong CLSID %s\n", debugstr_guid(&id)); + + hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy); + ok(hr == S_OK, "GetFriendlyName error %#x\n", hr); + ok(lstrcmpW(name, LSD_name) == 0, "wrong LSD reader name %s\n", wine_dbgstr_w(name)); + + IWICMetadataHandlerInfo_Release(info); + IWICMetadataReader_Release(reader); + } + + IStream_Release(stream); +} + START_TEST(metadata) { CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); @@ -1269,6 +1349,7 @@ START_TEST(metadata) test_create_reader(); test_metadata_png(); test_metadata_gif(); + test_metadata_LSD(); CoUninitialize(); } diff --git a/include/wincodecsdk.idl b/include/wincodecsdk.idl index fcf05b6..222ae64 100644 --- a/include/wincodecsdk.idl +++ b/include/wincodecsdk.idl @@ -57,6 +57,8 @@ cpp_quote("DEFINE_GUID(CLSID_WICExifMetadataReader, 0xd9403860,0x297f,0x4a49,0xb cpp_quote("DEFINE_GUID(CLSID_WICExifMetadataWriter, 0xc9a14cda,0xc339,0x460b,0x90,0x78,0xd4,0xde,0xbc,0xfa,0xbe,0x91);") cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataReader, 0x01b90d9a,0x8209,0x47f7,0x9c,0x52,0xe1,0x24,0x4b,0xf5,0x0c,0xed);") cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataWriter, 0x22c21f93,0x7ddb,0x411c,0x9b,0x17,0xc5,0xb7,0xbd,0x06,0x4a,0xbc);") +cpp_quote("DEFINE_GUID(CLSID_WICLSDMetadataReader, 0x41070793,0x59e4,0x479a,0xa1,0xf7,0x95,0x4a,0xdc,0x2e,0xf5,0xfc);") +cpp_quote("DEFINE_GUID(CLSID_WICLSDMetadataWriter, 0x73c037e7,0xe5d9,0x4954,0x87,0x6a,0x6d,0xa8,0x1d,0x6e,0x57,0x68);") typedef struct WICMetadataPattern { ULARGE_INTEGER Position;
1
0
0
0
Dmitry Timoshkov : include/wincodecsdk.idl: Add some missing metadata writer UIDs.
by Alexandre Julliard
10 Sep '12
10 Sep '12
Module: wine Branch: master Commit: 847cdf3fd0fe7229ccf2c13d8f98ffb7d826a2d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=847cdf3fd0fe7229ccf2c13d8…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Sep 10 16:26:57 2012 +0900 include/wincodecsdk.idl: Add some missing metadata writer UIDs. --- include/wincodecsdk.idl | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/wincodecsdk.idl b/include/wincodecsdk.idl index e681c64..fcf05b6 100644 --- a/include/wincodecsdk.idl +++ b/include/wincodecsdk.idl @@ -52,8 +52,11 @@ cpp_quote("DEFINE_GUID(CLSID_WICUnknownMetadataWriter, 0xa09cca86,0x27ba,0x4f39, cpp_quote("DEFINE_GUID(CLSID_WICPngTextMetadataReader, 0x4b59afcc,0xb8c3,0x408a,0xb6,0x70,0x89,0xe5,0xfa,0xb6,0xfd,0xa7);") cpp_quote("DEFINE_GUID(CLSID_WICPngTextMetadataWriter, 0xb5ebafb9,0x253e,0x4a72,0xa7,0x44,0x07,0x62,0xd2,0x68,0x56,0x83);") cpp_quote("DEFINE_GUID(CLSID_WICIfdMetadataReader, 0x8f914656,0x9d0a,0x4eb2,0x90,0x19,0x0b,0xf9,0x6d,0x8a,0x9e,0xe6);") +cpp_quote("DEFINE_GUID(CLSID_WICIfdMetadataWriter, 0xb1ebfc28,0xc9bd,0x47a2,0x8d,0x33,0xb9,0x48,0x76,0x97,0x77,0xa7);") cpp_quote("DEFINE_GUID(CLSID_WICExifMetadataReader, 0xd9403860,0x297f,0x4a49,0xbf,0x9b,0x77,0x89,0x81,0x50,0xa4,0x42);") +cpp_quote("DEFINE_GUID(CLSID_WICExifMetadataWriter, 0xc9a14cda,0xc339,0x460b,0x90,0x78,0xd4,0xde,0xbc,0xfa,0xbe,0x91);") cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataReader, 0x01b90d9a,0x8209,0x47f7,0x9c,0x52,0xe1,0x24,0x4b,0xf5,0x0c,0xed);") +cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataWriter, 0x22c21f93,0x7ddb,0x411c,0x9b,0x17,0xc5,0xb7,0xbd,0x06,0x4a,0xbc);") typedef struct WICMetadataPattern { ULARGE_INTEGER Position;
1
0
0
0
Dmitry Timoshkov : include/wincodecsdk.idl: Fix a typo.
by Alexandre Julliard
10 Sep '12
10 Sep '12
Module: wine Branch: master Commit: 3ea74413c68e0b7e4f720121a2a704ae4f33335e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3ea74413c68e0b7e4f720121a…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Sep 10 16:26:31 2012 +0900 include/wincodecsdk.idl: Fix a typo. --- dlls/windowscodecs/tests/info.c | 4 ++-- include/wincodecsdk.idl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/windowscodecs/tests/info.c b/dlls/windowscodecs/tests/info.c index 6eb20cb..6c393d7 100644 --- a/dlls/windowscodecs/tests/info.c +++ b/dlls/windowscodecs/tests/info.c @@ -422,7 +422,7 @@ todo_wine IWICComponentInfo_Release(info); - hr = IWICImagingFactory_CreateComponentInfo(factory, &CLSID_WICXMBStructMetadataReader, &info); + hr = IWICImagingFactory_CreateComponentInfo(factory, &CLSID_WICXMPStructMetadataReader, &info); todo_wine ok(hr == S_OK, "CreateComponentInfo failed, hr=%x\n", hr); @@ -440,7 +440,7 @@ todo_wine hr = IWICMetadataReaderInfo_GetCLSID(reader_info, &clsid); ok(hr == S_OK, "GetCLSID failed, hr=%x\n", hr); - ok(IsEqualGUID(&CLSID_WICXMBStructMetadataReader, &clsid), "GetCLSID returned wrong result\n"); + 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); diff --git a/include/wincodecsdk.idl b/include/wincodecsdk.idl index db5162a..e681c64 100644 --- a/include/wincodecsdk.idl +++ b/include/wincodecsdk.idl @@ -53,7 +53,7 @@ cpp_quote("DEFINE_GUID(CLSID_WICPngTextMetadataReader, 0x4b59afcc,0xb8c3,0x408a, cpp_quote("DEFINE_GUID(CLSID_WICPngTextMetadataWriter, 0xb5ebafb9,0x253e,0x4a72,0xa7,0x44,0x07,0x62,0xd2,0x68,0x56,0x83);") cpp_quote("DEFINE_GUID(CLSID_WICIfdMetadataReader, 0x8f914656,0x9d0a,0x4eb2,0x90,0x19,0x0b,0xf9,0x6d,0x8a,0x9e,0xe6);") cpp_quote("DEFINE_GUID(CLSID_WICExifMetadataReader, 0xd9403860,0x297f,0x4a49,0xbf,0x9b,0x77,0x89,0x81,0x50,0xa4,0x42);") -cpp_quote("DEFINE_GUID(CLSID_WICXMBStructMetadataReader, 0x01b90d9a,0x8209,0x47f7,0x9c,0x52,0xe1,0x24,0x4b,0xf5,0x0c,0xed);") +cpp_quote("DEFINE_GUID(CLSID_WICXMPStructMetadataReader, 0x01b90d9a,0x8209,0x47f7,0x9c,0x52,0xe1,0x24,0x4b,0xf5,0x0c,0xed);") typedef struct WICMetadataPattern { ULARGE_INTEGER Position;
1
0
0
0
Dmitry Timoshkov : windowscodecs: Add a bunch of GIF metadata tests.
by Alexandre Julliard
10 Sep '12
10 Sep '12
Module: wine Branch: master Commit: 248e9ef7c96c4e8af6f917c8678943cbe2eb8a3a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=248e9ef7c96c4e8af6f917c86…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Sep 10 16:25:47 2012 +0900 windowscodecs: Add a bunch of GIF metadata tests. --- dlls/windowscodecs/tests/metadata.c | 296 +++++++++++++++++++++++++++++++++++ include/wincodecsdk.idl | 3 + 2 files changed, 299 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=248e9ef7c96c4e8af6f91…
1
0
0
0
Dmitry Timoshkov : windowscodecs: Add more tests for PNG metadata.
by Alexandre Julliard
10 Sep '12
10 Sep '12
Module: wine Branch: master Commit: 44e6a494d9d4e225e94b3dca67c9ef3d108d2f34 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44e6a494d9d4e225e94b3dca6…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Sep 10 16:25:00 2012 +0900 windowscodecs: Add more tests for PNG metadata. --- dlls/windowscodecs/tests/metadata.c | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-) diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index acd9255..807e00a 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -504,9 +504,10 @@ struct test_data int count; /* if VT_VECTOR */ LONGLONG value[13]; const char *string; + const WCHAR id_string[32]; }; -static void compare_ifd_metadata(IWICMetadataReader *reader, const struct test_data *td, ULONG count) +static void compare_metadata(IWICMetadataReader *reader, const struct test_data *td, ULONG count) { HRESULT hr; IWICEnumMetadataItem *enumerator; @@ -530,8 +531,13 @@ static void compare_ifd_metadata(IWICMetadataReader *reader, const struct test_d ok(items_returned == 1, "unexpected item count %u\n", items_returned); ok(schema.vt == VT_EMPTY, "%u: unexpected vt: %u\n", i, schema.vt); - ok(id.vt == VT_UI2, "%u: unexpected vt: %u\n", i, id.vt); - ok(U(id).uiVal == td[i].id, "%u: expected id %#x, got %#x\n", i, td[i].id, U(id).uiVal); + ok(id.vt == VT_UI2 || id.vt == VT_LPWSTR, "%u: unexpected vt: %u\n", i, id.vt); + if (id.vt == VT_UI2) + ok(U(id).uiVal == td[i].id, "%u: expected id %#x, got %#x\n", i, td[i].id, U(id).uiVal); + else if (id.vt == VT_LPWSTR) + ok(!lstrcmpW(td[i].id_string, U(id).pwszVal), + "%u: expected %s, got %s\n", i, wine_dbgstr_w(td[i].id_string), wine_dbgstr_w(U(id).pwszVal)); + ok(value.vt == td[i].type, "%u: expected vt %#x, got %#x\n", i, td[i].type, value.vt); if (value.vt & VT_VECTOR) { @@ -670,7 +676,7 @@ static void test_metadata_IFD(void) ok(hr == S_OK, "GetCount error %#x\n", hr); ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count); - compare_ifd_metadata(reader, td, count); + compare_metadata(reader, td, count); /* test IFD data with different endianness */ if (persist_options == WICPersistOptionsLittleEndian) @@ -685,7 +691,7 @@ static void test_metadata_IFD(void) hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); ok(count == sizeof(td)/sizeof(td[0]), "unexpected count %u\n", count); - compare_ifd_metadata(reader, td, count); + compare_metadata(reader, td, count); HeapFree(GetProcessHeap(), 0, IFD_data_swapped); hr = IWICMetadataReader_GetMetadataFormat(reader, &format); @@ -864,6 +870,15 @@ todo_wine static void test_metadata_png(void) { + static const struct test_data td[6] = + { + { VT_UI2, 0, 0, { 2005 }, NULL, { 'Y','e','a','r',0 } }, + { VT_UI1, 0, 0, { 6 }, NULL, { 'M','o','n','t','h',0 } }, + { VT_UI1, 0, 0, { 3 }, NULL, { 'D','a','y',0 } }, + { VT_UI1, 0, 0, { 15 }, NULL, { 'H','o','u','r',0 } }, + { VT_UI1, 0, 0, { 7 }, NULL, { 'M','i','n','u','t','e',0 } }, + { VT_UI1, 0, 0, { 45 }, NULL, { 'S','e','c','o','n','d',0 } } + }; IStream *stream; IWICBitmapDecoder *decoder; IWICBitmapFrameDecode *frame; @@ -926,6 +941,12 @@ static void test_metadata_png(void) broken(IsEqualGUID(&containerformat, &GUID_MetadataFormatUnknown)) /* Windows XP */, "unexpected container format\n"); + hr = IWICMetadataReader_GetCount(reader, &count); + ok(hr == S_OK, "GetCount error %#x\n", hr); + ok(count == 6 || broken(count == 1) /* XP */, "expected 6, got %u\n", count); + if (count == 6) + compare_metadata(reader, td, count); + IWICMetadataReader_Release(reader); }
1
0
0
0
Jacek Caban : vbscript: Added support for VT_NULL in stack_pop_bool.
by Alexandre Julliard
10 Sep '12
10 Sep '12
Module: wine Branch: master Commit: 81766a740e1c1816ba3869bf41832a3532ffa819 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81766a740e1c1816ba3869bf4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Sep 10 10:35:29 2012 +0200 vbscript: Added support for VT_NULL in stack_pop_bool. --- dlls/vbscript/interp.c | 3 +++ dlls/vbscript/tests/lang.vbs | 6 ++++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 3a078b5..3a5d9b2 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -373,6 +373,9 @@ static int stack_pop_bool(exec_ctx_t *ctx, BOOL *b) case VT_BOOL: *b = V_BOOL(val.v); break; + case VT_NULL: + *b = FALSE; + break; case VT_I2: *b = V_I2(val.v); break; diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 3e105b6..90d5304 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -434,6 +434,12 @@ do while true next loop +if null then call ok(false, "if null evaluated") + +while null + call ok(false, "while null evaluated") +wend + Call collectionObj.reset() y = 0 x = 10
1
0
0
0
Jacek Caban : vbscript: Added support for comparing to null.
by Alexandre Julliard
10 Sep '12
10 Sep '12
Module: wine Branch: master Commit: 167174d88b69c8b10c27d08a240c91db9d5088b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=167174d88b69c8b10c27d08a2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Sep 10 10:35:17 2012 +0200 vbscript: Added support for comparing to null. --- dlls/vbscript/interp.c | 30 ++++++++++++++++++++---------- dlls/vbscript/tests/lang.vbs | 13 +++++++++++++ 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 28c1b14..3a078b5 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -279,6 +279,13 @@ static HRESULT stack_push(exec_ctx_t *ctx, VARIANT *v) return S_OK; } +static inline HRESULT stack_push_null(exec_ctx_t *ctx) +{ + VARIANT v; + V_VT(&v) = VT_NULL; + return stack_push(ctx, &v); +} + static void stack_popn(exec_ctx_t *ctx, unsigned n) { while(n--) @@ -1143,12 +1150,8 @@ static HRESULT interp_empty(exec_ctx_t *ctx) static HRESULT interp_null(exec_ctx_t *ctx) { - VARIANT v; - TRACE("\n"); - - V_VT(&v) = VT_NULL; - return stack_push(ctx, &v); + return stack_push_null(ctx); } static HRESULT interp_nothing(exec_ctx_t *ctx) @@ -1306,11 +1309,6 @@ static HRESULT var_cmp(exec_ctx_t *ctx, VARIANT *l, VARIANT *r) { TRACE("%s %s\n", debugstr_variant(l), debugstr_variant(r)); - if(V_VT(l) == VT_NULL || V_VT(r) == VT_NULL) { - FIXME("comparing nulls is not implemented\n"); - return E_NOTIMPL; - } - /* FIXME: Fix comparing string to number */ return VarCmp(l, r, ctx->script->lcid, 0); @@ -1345,6 +1343,8 @@ static HRESULT interp_equal(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres == VARCMP_EQ ? VARIANT_TRUE : VARIANT_FALSE; @@ -1361,6 +1361,8 @@ static HRESULT interp_nequal(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres != VARCMP_EQ ? VARIANT_TRUE : VARIANT_FALSE; @@ -1377,6 +1379,8 @@ static HRESULT interp_gt(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres == VARCMP_GT ? VARIANT_TRUE : VARIANT_FALSE; @@ -1393,6 +1397,8 @@ static HRESULT interp_gteq(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres == VARCMP_GT || hres == VARCMP_EQ ? VARIANT_TRUE : VARIANT_FALSE; @@ -1409,6 +1415,8 @@ static HRESULT interp_lt(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres == VARCMP_LT ? VARIANT_TRUE : VARIANT_FALSE; @@ -1425,6 +1433,8 @@ static HRESULT interp_lteq(exec_ctx_t *ctx) hres = cmp_oper(ctx); if(FAILED(hres)) return hres; + if(hres == VARCMP_NULL) + return stack_push_null(ctx); V_VT(&v) = VT_BOOL; V_BOOL(&v) = hres == VARCMP_LT || hres == VARCMP_EQ ? VARIANT_TRUE : VARIANT_FALSE; diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 2ba3e5a..3e105b6 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -144,6 +144,19 @@ Call ok(1 = 1 < 0, "! 1 = 1 < 0") Call ok(1 <= 2, "! 1 <= 2") Call ok(2 <= 2, "! 2 <= 2") +Call ok(isNull(0 = null), "'(0 = null)' is not null") +Call ok(isNull(null = 1), "'(null = 1)' is not null") +Call ok(isNull(0 > null), "'(0 > null)' is not null") +Call ok(isNull(null > 1), "'(null > 1)' is not null") +Call ok(isNull(0 < null), "'(0 < null)' is not null") +Call ok(isNull(null < 1), "'(null < 1)' is not null") +Call ok(isNull(0 <> null), "'(0 <> null)' is not null") +Call ok(isNull(null <> 1), "'(null <> 1)' is not null") +Call ok(isNull(0 >= null), "'(0 >= null)' is not null") +Call ok(isNull(null >= 1), "'(null >= 1)' is not null") +Call ok(isNull(0 <= null), "'(0 <= null)' is not null") +Call ok(isNull(null <= 1), "'(null <= 1)' is not null") + x = 3 Call ok(2+2 = 4, "2+2 = " & (2+2)) Call ok(false + 6 + true = 5, "false + 6 + true <> 5")
1
0
0
0
Jacek Caban : mshtml: Check if value is function only when it needs to be in invoke_builtin_prop .
by Alexandre Julliard
10 Sep '12
10 Sep '12
Module: wine Branch: master Commit: a4869de7fa5e72fe2daed6bdae11b934f4350aa3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a4869de7fa5e72fe2daed6bda…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Sep 10 10:35:05 2012 +0200 mshtml: Check if value is function only when it needs to be in invoke_builtin_prop. --- dlls/mshtml/dispex.c | 12 ++++++------ dlls/mshtml/tests/vbtest.html | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index a3ac623..eca45a6 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -979,13 +979,13 @@ static HRESULT invoke_builtin_prop(DispatchEx *This, DISPID id, LCID lcid, WORD if(FAILED(hres)) return hres; - if(V_VT(&v) != VT_DISPATCH) { - FIXME("Not a function %s\n", debugstr_variant(&v)); - VariantClear(&v); - return E_FAIL; - } - if(flags != (DISPATCH_PROPERTYGET|DISPATCH_METHOD)) { + if(V_VT(&v) != VT_DISPATCH) { + FIXME("Not a function %s\n", debugstr_variant(&v)); + VariantClear(&v); + return E_FAIL; + } + hres = invoke_disp_value(This, V_DISPATCH(&v), lcid, flags, dp, res, ei, caller); IDispatch_Release(V_DISPATCH(&v)); }else if(res) { diff --git a/dlls/mshtml/tests/vbtest.html b/dlls/mshtml/tests/vbtest.html index b864abc..f424b38 100644 --- a/dlls/mshtml/tests/vbtest.html +++ b/dlls/mshtml/tests/vbtest.html @@ -31,6 +31,7 @@ If true then counter = counter+1 Sub runTest() Call ok(counter = 6, "counter = " & counter) + Call ok(isNull(document.onkeyup), "document.onkeyup is not null") Call external.reportSuccess() End Sub </script>
1
0
0
0
Jacek Caban : mshtml: Use first script host's GUID as default script guid.
by Alexandre Julliard
10 Sep '12
10 Sep '12
Module: wine Branch: master Commit: 156e94429d8bbcf73c194e82864cc9ed2bee1771 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=156e94429d8bbcf73c194e828…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Sep 10 10:34:52 2012 +0200 mshtml: Use first script host's GUID as default script guid. --- dlls/mshtml/htmlwindow.c | 1 - dlls/mshtml/mshtml_private.h | 1 - dlls/mshtml/script.c | 18 ++++++++++-------- dlls/mshtml/tests/vbtest.html | 15 +++++++++++++-- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index bdec9b9..ed1fa2b 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -2721,7 +2721,6 @@ static HRESULT create_inner_window(HTMLOuterWindow *outer_window, IMoniker *mon, init_dispex(&window->dispex, (IUnknown*)&window->base.IHTMLWindow2_iface, &HTMLWindow_dispex); window->task_magic = get_task_target_magic(); - window->current_script_guid = CLSID_JScript; if(mon) { IMoniker_AddRef(mon); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 18496aa..fa4e073 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -388,7 +388,6 @@ struct HTMLInnerWindow { HTMLDocumentNode *doc; struct list script_hosts; - GUID current_script_guid; IHTMLEventObj *event; diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c index 0fe4f5a..9aa875a 100644 --- a/dlls/mshtml/script.c +++ b/dlls/mshtml/script.c @@ -641,8 +641,6 @@ static void parse_text(ScriptHost *script_host, LPCWSTR text) TRACE("%s\n", debugstr_w(text)); - script_host->window->current_script_guid = script_host->guid; - VariantInit(&var); memset(&excepinfo, 0, sizeof(excepinfo)); TRACE(">>>\n"); @@ -722,6 +720,14 @@ static void parse_script_elem(ScriptHost *script_host, nsIDOMHTMLScriptElement * nsAString_Finish(&src_str); } +static GUID get_default_script_guid(HTMLInnerWindow *window) +{ + /* If not specified, we should use very first script host that was created for the page (or JScript if none) */ + return list_empty(&window->script_hosts) + ? CLSID_JScript + : LIST_ENTRY(list_head(&window->script_hosts), ScriptHost, entry)->guid; +} + static BOOL get_guid_from_type(LPCWSTR type, GUID *guid) { const WCHAR text_javascriptW[] = @@ -790,7 +796,7 @@ static BOOL get_script_guid(HTMLInnerWindow *window, nsIDOMHTMLScriptElement *ns if(*language) { ret = get_guid_from_language(language, guid); }else { - *guid = window->current_script_guid; + *guid = get_default_script_guid(window); ret = TRUE; } }else { @@ -871,7 +877,7 @@ IDispatch *script_parse_event(HTMLInnerWindow *window, LPCWSTR text) ptr++; }else { ptr = text; - guid = window->current_script_guid; + guid = get_default_script_guid(window); } if(IsEqualGUID(&CLSID_JScript, &guid) @@ -880,8 +886,6 @@ IDispatch *script_parse_event(HTMLInnerWindow *window, LPCWSTR text) return NULL; } - window->current_script_guid = guid; - script_host = get_script_host(window, &guid); if(!script_host || !script_host->parse_proc) return NULL; @@ -923,8 +927,6 @@ HRESULT exec_script(HTMLInnerWindow *window, const WCHAR *code, const WCHAR *lan return E_FAIL; } - window->current_script_guid = guid; - memset(&ei, 0, sizeof(ei)); TRACE(">>>\n"); hres = IActiveScriptParse_ParseScriptText(script_host->parse, code, NULL, NULL, delimW, 0, 0, SCRIPTTEXT_ISVISIBLE, ret, &ei); diff --git a/dlls/mshtml/tests/vbtest.html b/dlls/mshtml/tests/vbtest.html index 7b8cebc..b864abc 100644 --- a/dlls/mshtml/tests/vbtest.html +++ b/dlls/mshtml/tests/vbtest.html @@ -12,19 +12,30 @@ End Sub <script> ' Verifies that we're in VBScript although there is no type specified If true then counter = counter+1 +function inccounter(x) + counter = counter+x +end function </script> <script type="text/javascript"> // We're in javascript +try { + counter++; + incCounter(2); +}catch(e) { + ok(false, "got an exception"); +} </script> -<script type="text/vbscript"> +<script> ' And back to VBScript If true then counter = counter+1 Sub runTest() - Call ok(counter = 3, "counter = " & counter) + Call ok(counter = 6, "counter = " & counter) Call external.reportSuccess() End Sub </script> +<script type="text/javascript"> +// We're in javascript </script> <body onload="If true then runTest()"> </body>
1
0
0
0
← Newer
1
...
60
61
62
63
64
65
66
...
83
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Results per page:
10
25
50
100
200