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
August 2011
----- 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
770 discussions
Start a n
N
ew thread
Thomas Mullaly : msxml3/tests: Added IStream tests for IMXWriter.
by Alexandre Julliard
23 Aug '11
23 Aug '11
Module: wine Branch: master Commit: ae36cd5f35a7cb4cb77d7661b990c3f301d18e78 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ae36cd5f35a7cb4cb77d7661b…
Author: Thomas Mullaly <thomas.mullaly(a)gmail.com> Date: Fri Aug 12 19:11:30 2011 -0400 msxml3/tests: Added IStream tests for IMXWriter. --- dlls/msxml3/tests/saxreader.c | 244 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 244 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c index 4e021c6..ad350db 100644 --- a/dlls/msxml3/tests/saxreader.c +++ b/dlls/msxml3/tests/saxreader.c @@ -2,6 +2,7 @@ * XML test * * Copyright 2008 Piotr Caban + * Copyright 2011 Thomas Mullaly * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -96,6 +97,17 @@ static const WCHAR szCarriageRetTest[] = { '<','/','B','a','n','k','A','c','c','o','u','n','t','>','\0' }; +static const WCHAR szUtf16XML[] = { +'<','?','x','m','l',' ','v','e','r','s','i','o','n','=','"','1','.','0','"',' ', +'e','n','c','o','d','i','n','g','=','"','U','T','F','-','1','6','"',' ', +'s','t','a','n','d','a','l','o','n','e','=','"','n','o','"','?','>','\r','\n' +}; + +static const CHAR szUtf16BOM[] = {0xff, 0xfe}; + +static const CHAR szUtf8XML[] = +"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n"; + static const CHAR szTestXML[] = "<?xml version=\"1.0\" ?>\n" "<BankAccount>\n" @@ -696,6 +708,152 @@ static const ISAXAttributesVtbl SAXAttributesVtbl = static ISAXAttributes saxattributes = { &SAXAttributesVtbl }; +typedef struct mxwriter_write_test_t { + BOOL last; + const BYTE *data; + DWORD cb; + BOOL null_written; +} mxwriter_write_test; + +typedef struct mxwriter_stream_test_t { + VARIANT_BOOL bom; + const char *encoding; + mxwriter_write_test expected_writes[4]; +} mxwriter_stream_test; + +static const mxwriter_write_test *current_write_test; +static DWORD current_stream_test_index; + +static HRESULT WINAPI istream_QueryInterface(IStream *iface, REFIID riid, void **ppvObject) +{ + *ppvObject = NULL; + + if(IsEqualGUID(riid, &IID_IStream) || IsEqualGUID(riid, &IID_IUnknown)) + *ppvObject = iface; + else + return E_NOINTERFACE; + + return S_OK; +} + +static ULONG WINAPI istream_AddRef(IStream *iface) +{ + return 2; +} + +static ULONG WINAPI istream_Release(IStream *iface) +{ + return 1; +} + +static HRESULT WINAPI istream_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI istream_Write(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten) +{ + ok(pv != NULL, "pv == NULL\n"); + + if(current_write_test->last) { + ok(0, "Too many Write calls made on test %d\n", current_stream_test_index); + return E_FAIL; + } + + ok(current_write_test->cb == cb, "Expected %d, but got %d on test %d\n", + current_write_test->cb, cb, current_stream_test_index); + + if(!pcbWritten) + ok(current_write_test->null_written, "pcbWritten was NULL on test %d\n", current_stream_test_index); + else + ok(!memcmp(current_write_test->data, pv, cb), "Unexpected data on test %d\n", current_stream_test_index); + + ++current_write_test; + + if(pcbWritten) + *pcbWritten = cb; + + return S_OK; +} + +static HRESULT WINAPI istream_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, + ULARGE_INTEGER *plibNewPosition) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI istream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI istream_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, + ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *plibWritten) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI istream_Commit(IStream *iface, DWORD grfCommitFlags) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI istream_Revert(IStream *iface) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI istream_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, + ULARGE_INTEGER cb, DWORD dwLockType) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI istream_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, + ULARGE_INTEGER cb, DWORD dwLockType) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI istream_Stat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI istream_Clone(IStream *iface, IStream **ppstm) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static const IStreamVtbl StreamVtbl = { + istream_QueryInterface, + istream_AddRef, + istream_Release, + istream_Read, + istream_Write, + istream_Seek, + istream_SetSize, + istream_CopyTo, + istream_Commit, + istream_Revert, + istream_LockRegion, + istream_UnlockRegion, + istream_Stat, + istream_Clone +}; + +static IStream mxstream = { &StreamVtbl }; + static void test_saxreader(void) { HRESULT hr; @@ -1349,6 +1507,91 @@ static void test_mxwriter_characters(void) free_bstrs(); } +static const mxwriter_stream_test mxwriter_stream_tests[] = { + { + VARIANT_TRUE,"UTF-16", + { + {FALSE,(const BYTE*)szUtf16BOM,sizeof(szUtf16BOM),TRUE}, + {FALSE,(const BYTE*)szUtf16XML,sizeof(szUtf16XML)}, + {TRUE} + } + }, + { + VARIANT_FALSE,"UTF-16", + { + {FALSE,(const BYTE*)szUtf16XML,sizeof(szUtf16XML)}, + {TRUE} + } + }, + { + VARIANT_TRUE,"UTF-8", + { + {FALSE,(const BYTE*)szUtf8XML,sizeof(szUtf8XML)-1}, + /* For some reason Windows makes an empty write call when UTF-8 encoding is used + * and the writer is released. + */ + {FALSE,NULL,0}, + {TRUE} + } + }, + { + VARIANT_TRUE,"UTF-16", + { + {FALSE,(const BYTE*)szUtf16BOM,sizeof(szUtf16BOM),TRUE}, + {FALSE,(const BYTE*)szUtf16XML,sizeof(szUtf16XML)}, + {TRUE} + } + } +}; + +static void test_mxwriter_stream(void) +{ + DWORD test_count = sizeof(mxwriter_stream_tests)/sizeof(mxwriter_stream_tests[0]); + + for(current_stream_test_index = 0; current_stream_test_index < test_count; ++current_stream_test_index) { + const mxwriter_stream_test *test = mxwriter_stream_tests+current_stream_test_index; + IMXWriter *writer; + ISAXContentHandler *content; + HRESULT hr; + VARIANT dest; + + hr = CoCreateInstance(&CLSID_MXXMLWriter, NULL, CLSCTX_INPROC_SERVER, + &IID_IMXWriter, (void**)&writer); + ok(hr == S_OK, "CoCreateInstance failed: %08x\n", hr); + + hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (void**)&content); + ok(hr == S_OK, "QueryInterface(ISAXContentHandler) failed: %08x\n", hr); + + hr = IMXWriter_put_encoding(writer, _bstr_(test->encoding)); + ok(hr == S_OK, "put_encoding failed with %08x on test %d\n", hr, current_stream_test_index); + + V_VT(&dest) = VT_UNKNOWN; + V_UNKNOWN(&dest) = (IUnknown*)&mxstream; + hr = IMXWriter_put_output(writer, dest); + ok(hr == S_OK, "put_output failed with %08x on test %d\n", hr, current_stream_test_index); + VariantClear(&dest); + + hr = IMXWriter_put_byteOrderMark(writer, test->bom); + ok(hr == S_OK, "put_byteOrderMark failed with %08x on test %d\n", hr, current_stream_test_index); + + current_write_test = test->expected_writes; + + hr = ISAXContentHandler_startDocument(content); + ok(hr == S_OK, "startDocument failed with %08x on test %d\n", hr, current_stream_test_index); + + hr = ISAXContentHandler_endDocument(content); + todo_wine ok(hr == S_OK, "endDocument failed with %08x on test %d\n", hr, current_stream_test_index); + + ISAXContentHandler_Release(content); + IMXWriter_Release(writer); + + todo_wine ok(current_write_test->last, "The last %d write calls on test %d were missed\n", + current_write_test-test->expected_writes, current_stream_test_index); + } + + free_bstrs(); +} + START_TEST(saxreader) { ISAXXMLReader *reader; @@ -1384,6 +1627,7 @@ START_TEST(saxreader) test_mxwriter_characters(); test_mxwriter_properties(); test_mxwriter_flush(); + test_mxwriter_stream(); } else win_skip("MXXMLWriter not supported\n");
1
0
0
0
Francois Gouget : advapi32/tests: Test what happens when a service fails to or cannot start.
by Alexandre Julliard
23 Aug '11
23 Aug '11
Module: wine Branch: master Commit: 87035e5274f400e5d7170c9fd93ff89e5a7963d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=87035e5274f400e5d7170c9fd…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Aug 12 17:50:07 2011 +0200 advapi32/tests: Test what happens when a service fails to or cannot start. --- dlls/advapi32/tests/service.c | 132 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 132 insertions(+), 0 deletions(-) diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index e243db0..ee39109 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -33,6 +33,7 @@ #include "wine/test.h" static const CHAR spooler[] = "Spooler"; /* Should be available on all platforms */ +static const CHAR* selfname; static BOOL (WINAPI *pChangeServiceConfig2A)(SC_HANDLE,DWORD,LPVOID); static BOOL (WINAPI *pEnumServicesStatusExA)(SC_HANDLE, SC_ENUM_TYPE, DWORD, @@ -2053,6 +2054,123 @@ cleanup: CloseServiceHandle(scm_handle); } +static DWORD try_start_stop(SC_HANDLE svc_handle, const char* name, int todo) +{ + BOOL ret; + DWORD needed, le1, le2; + SERVICE_STATUS status; + SERVICE_STATUS_PROCESS statusproc; + + ret = StartServiceA(svc_handle, 0, NULL); + le1 = GetLastError(); + ok(!ret, "%s: StartServiceA() should have failed\n", name); + + ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)&statusproc, sizeof(statusproc), &needed); + ok(ret, "%s: QueryServiceStatusEx() failed le=%u\n", name, GetLastError()); + todo_wine ok(statusproc.dwCurrentState == SERVICE_STOPPED, "%s: should be stopped state=%x\n", name, statusproc.dwCurrentState); + todo_wine ok(statusproc.dwProcessId == 0, "%s: ProcessId should be 0 instead of %x\n", name, statusproc.dwProcessId); + + ret = StartServiceA(svc_handle, 0, NULL); + le2 = GetLastError(); + ok(!ret, "%s: StartServiceA() should have failed\n", name); + if (todo) + todo_wine ok(le2 == le1, "%s: the second try should yield the same error: %u != %u\n", name, le1, le2); + else + ok(le2 == le1, "%s: the second try should yield the same error: %u != %u\n", name, le1, le2); + + ret = ControlService(svc_handle, SERVICE_CONTROL_STOP, &status); + le2 = GetLastError(); + ok(!ret, "%s: ControlService() should have failed\n", name); + todo_wine ok(le2 == ERROR_SERVICE_NOT_ACTIVE, "%s: %d != ERROR_SERVICE_NOT_ACTIVE\n", name, le2); + todo_wine ok(status.dwCurrentState == SERVICE_STOPPED, "%s: should be stopped state=%x\n", name, status.dwCurrentState); + + return le1; +} + +static void test_start_stop(void) +{ + BOOL ret; + SC_HANDLE scm_handle, svc_handle; + DWORD le; + static const char servicename[] = "Winetest"; + char cmd[MAX_PATH+20]; + const char* displayname; + + SetLastError(0xdeadbeef); + scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); + if (!scm_handle) + { + if(GetLastError() == ERROR_ACCESS_DENIED) + skip("Not enough rights to get a handle to the manager\n"); + else + ok(FALSE, "Could not get a handle to the manager: %d\n", GetLastError()); + return; + } + + /* Do some cleanup in case a previous run crashed */ + svc_handle = OpenServiceA(scm_handle, servicename, GENERIC_ALL); + if (svc_handle) + { + DeleteService(svc_handle); + CloseServiceHandle(svc_handle); + } + + /* Create a dummy disabled service */ + sprintf(cmd, "\"%s\" service exit", selfname); + displayname = "Winetest Disabled Service"; + svc_handle = CreateServiceA(scm_handle, servicename, displayname, + GENERIC_ALL, SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS, + SERVICE_DISABLED, SERVICE_ERROR_IGNORE, cmd, NULL, + NULL, NULL, NULL, NULL); + if (!svc_handle) + { + if(GetLastError() == ERROR_ACCESS_DENIED) + skip("Not enough rights to create the service\n"); + else + ok(FALSE, "Could not create the service: %d\n", GetLastError()); + goto cleanup; + } + le = try_start_stop(svc_handle, displayname, 1); + todo_wine ok(le == ERROR_SERVICE_DISABLED, "%d != ERROR_SERVICE_DISABLED\n", le); + + /* Then with a process that exits right away */ + displayname = "Winetest Exit Service"; + ret = ChangeServiceConfigA(svc_handle, SERVICE_NO_CHANGE, SERVICE_DEMAND_START, SERVICE_NO_CHANGE, NULL, NULL, NULL, NULL, NULL, NULL, displayname); + ok(ret, "ChangeServiceConfig() failed le=%u\n", GetLastError()); + le = try_start_stop(svc_handle, displayname, 0); + todo_wine ok(le == ERROR_SERVICE_REQUEST_TIMEOUT, "%d != ERROR_SERVICE_REQUEST_TIMEOUT\n", le); + + /* Again with a bad path */ + displayname = "Winetest Bad Path"; + ret = ChangeServiceConfigA(svc_handle, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, "no_such_file.exe", NULL, NULL, NULL, NULL, NULL, displayname); + ok(ret, "ChangeServiceConfig() failed le=%u\n", GetLastError()); + try_start_stop(svc_handle, displayname, 0); + + /* And finally with a service that plays dead, forcing a timeout. + * This time we will put no quotes. That should work too, even if there are + * spaces in the path. + */ + sprintf(cmd, "%s service sleep", selfname); + displayname = "Winetest Sleep Service"; + ret = ChangeServiceConfigA(svc_handle, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, cmd, NULL, NULL, NULL, NULL, NULL, displayname); + ok(ret, "ChangeServiceConfig() failed le=%u\n", GetLastError()); + + le = try_start_stop(svc_handle, displayname, 0); + todo_wine ok(le == ERROR_SERVICE_REQUEST_TIMEOUT, "%d != ERROR_SERVICE_REQUEST_TIMEOUT\n", le); + +cleanup: + if (svc_handle) + { + DeleteService(svc_handle); + CloseServiceHandle(svc_handle); + } + + /* Wait a while. The following test does a CreateService again */ + Sleep(1000); + + CloseServiceHandle(scm_handle); +} + static void test_refcount(void) { SC_HANDLE scm_handle, svc_handle1, svc_handle2, svc_handle3, svc_handle4, svc_handle5; @@ -2156,6 +2274,19 @@ static void test_refcount(void) START_TEST(service) { SC_HANDLE scm_handle; + int myARGC; + char** myARGV; + + myARGC = winetest_get_mainargs(&myARGV); + selfname = myARGV[0]; + if (myARGC >= 3) + { + if (strcmp(myARGV[2], "sleep") == 0) + /* Cause a service startup timeout */ + Sleep(90000); + /* then, or if myARGV[2] == "exit", just exit */ + return; + } /* Bail out if we are on win98 */ SetLastError(0xdeadbeef); @@ -2182,6 +2313,7 @@ START_TEST(service) /* Test the creation, querying and deletion of a service */ test_sequence(); test_queryconfig2(); + test_start_stop(); /* The main reason for this test is to check if any refcounting is used * and what the rules are */
1
0
0
0
André Hentschel : gdi32: Initial gamma setting tests.
by Alexandre Julliard
23 Aug '11
23 Aug '11
Module: wine Branch: master Commit: c36b392a72737ca74cd9931728cd93f789ccac74 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c36b392a72737ca74cd993172…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Aug 11 20:37:26 2011 +0200 gdi32: Initial gamma setting tests. --- dlls/gdi32/tests/dc.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c index c173cef..0bc218c 100644 --- a/dlls/gdi32/tests/dc.c +++ b/dlls/gdi32/tests/dc.c @@ -605,6 +605,53 @@ static void test_desktop_colorres(void) ReleaseDC(NULL, hdc); } +static void test_gamma(void) +{ + BOOL ret; + HDC hdc = GetDC(NULL); + WORD oldramp[3][256], ramp[3][256]; + INT i; + + ret = GetDeviceGammaRamp(hdc, &oldramp); + if (!ret) + { + win_skip("GetDeviceGammaRamp failed, skipping tests\n"); + goto done; + } + + /* try to set back old ramp */ + ret = SetDeviceGammaRamp(hdc, &oldramp); + if (!ret) + { + win_skip("SetDeviceGammaRamp failed, skipping tests\n"); + goto done; + } + + memcpy(ramp, oldramp, sizeof(ramp)); + + /* set one color ramp to zeros */ + memset(ramp[0], 0, sizeof(ramp[0])); + ret = SetDeviceGammaRamp(hdc, &ramp); + ok(!ret, "SetDeviceGammaRamp succeeded\n"); + + /* set one color ramp to a flat straight rising line */ + for (i = 0; i < 256; i++) ramp[0][i] = i; + ret = SetDeviceGammaRamp(hdc, &ramp); + todo_wine ok(!ret, "SetDeviceGammaRamp succeeded\n"); + + /* set one color ramp to a steep straight rising line */ + for (i = 0; i < 256; i++) ramp[0][i] = i * 256; + ret = SetDeviceGammaRamp(hdc, &ramp); + ok(ret, "SetDeviceGammaRamp failed\n"); + + /* cleanup: set old ramp again */ + ret = SetDeviceGammaRamp(hdc, &oldramp); + ok(ret, "SetDeviceGammaRamp failed\n"); + +done: + ReleaseDC(NULL, hdc); +} + START_TEST(dc) { test_savedc(); @@ -615,4 +662,5 @@ START_TEST(dc) test_DeleteDC(); test_boundsrect_invalid(); test_desktop_colorres(); + test_gamma(); }
1
0
0
0
André Hentschel : winex11: Validate the ramps also when not converting them to single values.
by Alexandre Julliard
23 Aug '11
23 Aug '11
Module: wine Branch: master Commit: 4b538567e8e16b1c10a07176d750bafcacc3b543 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b538567e8e16b1c10a07176d…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Aug 11 20:35:11 2011 +0200 winex11: Validate the ramps also when not converting them to single values. --- dlls/winex11.drv/xvidmode.c | 30 ++++++++++-------------------- 1 files changed, 10 insertions(+), 20 deletions(-) diff --git a/dlls/winex11.drv/xvidmode.c b/dlls/winex11.drv/xvidmode.c index c09fe39..732a2d7 100644 --- a/dlls/winex11.drv/xvidmode.c +++ b/dlls/winex11.drv/xvidmode.c @@ -386,35 +386,25 @@ static BOOL X11DRV_XF86VM_GetGammaRamp(LPDDGAMMARAMP ramp) static BOOL X11DRV_XF86VM_SetGammaRamp(LPDDGAMMARAMP ramp) { + Bool ret = FALSE; #ifdef X_XF86VidModeSetGamma XF86VidModeGamma gamma; if (xf86vm_major < 2 || !usexvidmode) return FALSE; /* no gamma control */ + if (!ComputeGammaFromRamp(ramp->red, &gamma.red) || /* ramp validation */ + !ComputeGammaFromRamp(ramp->green, &gamma.green) || + !ComputeGammaFromRamp(ramp->blue, &gamma.blue)) return FALSE; + wine_tsx11_lock(); #ifdef X_XF86VidModeSetGammaRamp - else if (xf86vm_use_gammaramp) - { - Bool ret; - wine_tsx11_lock(); + if (xf86vm_use_gammaramp) ret = pXF86VidModeSetGammaRamp(gdi_display, DefaultScreen(gdi_display), 256, ramp->red, ramp->green, ramp->blue); - wine_tsx11_unlock(); - return ret; - } -#endif else - { - if (ComputeGammaFromRamp(ramp->red, &gamma.red) && - ComputeGammaFromRamp(ramp->green, &gamma.green) && - ComputeGammaFromRamp(ramp->blue, &gamma.blue)) { - Bool ret; - wine_tsx11_lock(); - ret = pXF86VidModeSetGamma(gdi_display, DefaultScreen(gdi_display), &gamma); - wine_tsx11_unlock(); - return ret; - } - } +#endif + ret = pXF86VidModeSetGamma(gdi_display, DefaultScreen(gdi_display), &gamma); + wine_tsx11_unlock(); #endif /* X_XF86VidModeSetGamma */ - return FALSE; + return ret; } #endif /* SONAME_LIBXXF86VM */
1
0
0
0
André Hentschel : ieframe: Only print the FIXMEs once for progress bar handling.
by Alexandre Julliard
23 Aug '11
23 Aug '11
Module: wine Branch: master Commit: 72c121e797fb697efe6827411a94e1ffe383a15f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72c121e797fb697efe6827411…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed Aug 10 23:00:52 2011 +0200 ieframe: Only print the FIXMEs once for progress bar handling. --- dlls/ieframe/taskbarlist.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/ieframe/taskbarlist.c b/dlls/ieframe/taskbarlist.c index 5055d80..72ae4df 100644 --- a/dlls/ieframe/taskbarlist.c +++ b/dlls/ieframe/taskbarlist.c @@ -139,8 +139,9 @@ static HRESULT STDMETHODCALLTYPE taskbar_list_SetProgressValue(ITaskbarList4 *if ULONGLONG ullCompleted, ULONGLONG ullTotal) { - FIXME("iface %p, hwnd %p, ullCompleted %s, ullTotal %s stub!\n", iface, hwnd, - wine_dbgstr_longlong(ullCompleted), wine_dbgstr_longlong(ullTotal)); + static BOOL fixme_once; + if(!fixme_once++) FIXME("iface %p, hwnd %p, ullCompleted %s, ullTotal %s stub!\n", iface, hwnd, + wine_dbgstr_longlong(ullCompleted), wine_dbgstr_longlong(ullTotal)); return S_OK; } @@ -149,7 +150,8 @@ static HRESULT STDMETHODCALLTYPE taskbar_list_SetProgressState(ITaskbarList4 *if HWND hwnd, TBPFLAG tbpFlags) { - FIXME("iface %p, hwnd %p, flags %x stub!\n", iface, hwnd, tbpFlags); + static BOOL fixme_once; + if(!fixme_once++) FIXME("iface %p, hwnd %p, flags %x stub!\n", iface, hwnd, tbpFlags); return S_OK; }
1
0
0
0
Francois Gouget : user32: When destroying a window, preserve the first WM_QUIT message that was posted to it.
by Alexandre Julliard
23 Aug '11
23 Aug '11
Module: wine Branch: master Commit: ff8f6e8662a5f603b1fe1b087989f238bca0c4ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff8f6e8662a5f603b1fe1b087…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Aug 5 20:29:52 2011 +0200 user32: When destroying a window, preserve the first WM_QUIT message that was posted to it. --- dlls/user32/tests/msg.c | 2 +- server/queue.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index c7361dc..9aaf149 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -10241,7 +10241,7 @@ static void test_quit_message(void) add_message(&rmsg); DispatchMessage(&msg); } - ok_sequence(WmStopQuitSeq, "WmStopQuitSeq", TRUE); + ok_sequence(WmStopQuitSeq, "WmStopQuitSeq", FALSE); } static const struct message WmMouseHoverSeq[] = { diff --git a/server/queue.c b/server/queue.c index 03b0e92..3fa546e 100644 --- a/server/queue.c +++ b/server/queue.c @@ -1918,7 +1918,15 @@ void queue_cleanup_window( struct thread *thread, user_handle_t win ) LIST_FOR_EACH_SAFE( ptr, next, &queue->msg_list[i] ) { struct message *msg = LIST_ENTRY( ptr, struct message, entry ); - if (msg->win == win) remove_queue_message( queue, msg, i ); + if (msg->win == win) + { + if (msg->msg == WM_QUIT && !queue->quit_message) + { + queue->quit_message = 1; + queue->exit_code = msg->wparam; + } + remove_queue_message( queue, msg, i ); + } } }
1
0
0
0
Francois Gouget : user32/tests: Test what happens to a WM_QUIT posted to a window that gets destroyed.
by Alexandre Julliard
23 Aug '11
23 Aug '11
Module: wine Branch: master Commit: 30f2c6610df25af50f50f4866a5f9ea127dfc393 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=30f2c6610df25af50f50f4866…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Aug 5 20:27:42 2011 +0200 user32/tests: Test what happens to a WM_QUIT posted to a window that gets destroyed. --- dlls/user32/tests/msg.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index ef35665..c7361dc 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -7608,6 +7608,21 @@ static LRESULT WINAPI ParentMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam return ret; } +static INT_PTR CALLBACK StopQuitMsgCheckProcA(HWND hwnd, UINT message, WPARAM wp, LPARAM lp) +{ + if (message == WM_CREATE) + PostMessage(hwnd, WM_CLOSE, 0, 0); + else if (message == WM_CLOSE) + { + /* Only the first WM_QUIT will survive the window destruction */ + PostMessage(hwnd, WM_USER, 0x1234, 0x5678); + PostMessage(hwnd, WM_QUIT, 0x1234, 0x5678); + PostMessage(hwnd, WM_QUIT, 0x4321, 0x8765); + } + + return DefWindowProcA(hwnd, message, wp, lp); +} + static LRESULT WINAPI TestDlgProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static LONG defwndproc_counter = 0; @@ -7790,6 +7805,10 @@ static BOOL RegisterWindowClasses(void) cls.lpszClassName = "TestParentClass"; if(!RegisterClassA(&cls)) return FALSE; + cls.lpfnWndProc = StopQuitMsgCheckProcA; + cls.lpszClassName = "StopQuitClass"; + if(!RegisterClassA(&cls)) return FALSE; + cls.lpfnWndProc = DefWindowProcA; cls.lpszClassName = "SimpleWindowClass"; if(!RegisterClassA(&cls)) return FALSE; @@ -10131,6 +10150,13 @@ static const struct message WmQuitDialogSeq[] = { { 0 } }; +static const struct message WmStopQuitSeq[] = { + { WM_DWMNCRENDERINGCHANGED, posted|optional }, + { WM_CLOSE, posted }, + { WM_QUIT, posted|wparam|lparam, 0x1234, 0 }, + { 0 } +}; + static void test_quit_message(void) { MSG msg; @@ -10193,6 +10219,29 @@ static void test_quit_message(void) ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message); ok(msg.wParam == 0x1234, "wParam was 0x%lx instead of 0x1234\n", msg.wParam); ok(msg.lParam == 0, "lParam was 0x%lx instead of 0\n", msg.lParam); + + /* Check what happens to a WM_QUIT message posted to a window that gets + * destroyed. + */ + CreateWindowExA(0, "StopQuitClass", "Stop Quit Test", WS_OVERLAPPEDWINDOW, + 0, 0, 100, 100, NULL, NULL, NULL, NULL); + flush_sequence(); + while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) + { + struct recvd_message rmsg; + rmsg.hwnd = msg.hwnd; + rmsg.message = msg.message; + rmsg.flags = posted|wparam|lparam; + rmsg.wParam = msg.wParam; + rmsg.lParam = msg.lParam; + rmsg.descr = "stop/quit"; + if (msg.message == WM_QUIT) + /* The hwnd can only be checked here */ + ok(!msg.hwnd, "The WM_QUIT hwnd was %p instead of NULL\n", msg.hwnd); + add_message(&rmsg); + DispatchMessage(&msg); + } + ok_sequence(WmStopQuitSeq, "WmStopQuitSeq", TRUE); } static const struct message WmMouseHoverSeq[] = {
1
0
0
0
Mariusz Pluciński : shell32: Replace call of RegDeleteKeyW by SHDeleteKeyW.
by Alexandre Julliard
23 Aug '11
23 Aug '11
Module: wine Branch: master Commit: 4505b4b07c98768b273ccc0d614c549357af4dc6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4505b4b07c98768b273ccc0d6…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Fri Aug 5 18:26:08 2011 +0200 shell32: Replace call of RegDeleteKeyW by SHDeleteKeyW. --- dlls/shell32/shellpath.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 9898bc2..1c723a2 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -3875,7 +3875,7 @@ static HRESULT WINAPI foldermanager_UnregisterFolder( hr = get_known_folder_registry_path(rfid, NULL, ®istryPath); if(SUCCEEDED(hr)) - hr = HRESULT_FROM_WIN32(RegDeleteKeyW(HKEY_LOCAL_MACHINE, registryPath)); + hr = HRESULT_FROM_WIN32(SHDeleteKeyW(HKEY_LOCAL_MACHINE, registryPath)); HeapFree(GetProcessHeap(), 0, registryPath); return hr;
1
0
0
0
Jacek Caban : winegecko: Added 1.3 release.
by Alexandre Julliard
23 Aug '11
23 Aug '11
Module: tools Branch: master Commit: 76fa8dd928e4e9dc53b82faaffcdacdf024c97b4 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=76fa8dd928e4e9dc53b82faa…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 23 14:06:41 2011 +0200 winegecko: Added 1.3 release. --- winegecko.php | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/winegecko.php b/winegecko.php index 8709a72..5be7585 100644 --- a/winegecko.php +++ b/winegecko.php @@ -58,7 +58,9 @@ $aFileSizes = array( '1.1.0-x86'=>8868851, '1.1.0-x86_64'=>8940997, '1.2.0-x86'=>12604928, - '1.2.0-x86_64'=>12841472 + '1.2.0-x86_64'=>12841472, + '1.3-x86'=>13609984, + '1.3-x86_64'=>13835776 ); // Exact size of the file:
1
0
0
0
Aurimas Fišeras : po: Fix some errors in Lithuanian translation.
by Alexandre Julliard
22 Aug '11
22 Aug '11
Module: wine Branch: master Commit: 84da6aeeed354a9ee9d8c6c4c881f715fb191da9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=84da6aeeed354a9ee9d8c6c4c…
Author: Aurimas Fišeras <aurimas(a)gmail.com> Date: Mon Aug 22 17:22:47 2011 +0300 po: Fix some errors in Lithuanian translation. Detected by Francois Gouget --- po/lt.po | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/po/lt.po b/po/lt.po index ce7d13d..44436b5 100644 --- a/po/lt.po +++ b/po/lt.po @@ -1426,7 +1426,7 @@ msgstr "Liudijimo politika" #: cryptdlg.rc:28 msgid "Policy Identifier: " -msgstr "Politiko identifikatorius:" +msgstr "Politikos identifikatorius: " #: cryptdlg.rc:29 msgid "Policy Qualifier Info" @@ -2281,7 +2281,7 @@ msgstr "Konfigūruokite Wine interneto naršyklės ir susijusias nuostatas" #: inetcpl.rc:30 msgid "Security settings for zone: " -msgstr "Saugumo nuostatos zonai:" +msgstr "Saugumo nuostatos zonai: " #: inetcpl.rc:31 msgid "Custom" @@ -11110,7 +11110,7 @@ msgstr "&Visada viršuje" #: winhlp32.rc:56 msgid "&About Wine Help" -msgstr "&Informacija..." +msgstr "&Apie Wine žinyną..." #: winhlp32.rc:64 msgid "Annotation..." @@ -11262,7 +11262,7 @@ msgstr "&Apie Wine Wordpad" #: wordpad.rc:130 msgid "Automatic" -msgstr "Automatic" +msgstr "Automatinė" #: wordpad.rc:136 msgid "All documents (*.*)"
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
77
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
Results per page:
10
25
50
100
200