From 60505b44a7b5b980d882670cefe867afea096b4f Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 23 Nov 2015 09:03:09 +0000 Subject: [PATCH] [MSCMS_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 svn path=/trunk/; revision=70048 --- rostests/winetests/mscms/profile.c | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/rostests/winetests/mscms/profile.c b/rostests/winetests/mscms/profile.c index 012a7dcccd9..f3ebe03778a 100644 --- a/rostests/winetests/mscms/profile.c +++ b/rostests/winetests/mscms/profile.c @@ -35,6 +35,8 @@ static HMODULE huser32; static BOOL (WINAPI *pAssociateColorProfileWithDeviceA)(PCSTR,PCSTR,PCSTR); static BOOL (WINAPI *pCloseColorProfile)(HPROFILE); +static HTRANSFORM (WINAPI *pCreateMultiProfileTransform)(PHPROFILE,DWORD,PDWORD,DWORD,DWORD,DWORD); +static BOOL (WINAPI *pDeleteColorTransform)(HTRANSFORM); static BOOL (WINAPI *pDisassociateColorProfileFromDeviceA)(PCSTR,PCSTR,PCSTR); static BOOL (WINAPI *pGetColorDirectoryA)(PCHAR,PCHAR,PDWORD); static BOOL (WINAPI *pGetColorDirectoryW)(PWCHAR,PWCHAR,PDWORD); @@ -68,6 +70,8 @@ static BOOL init_function_ptrs( void ) { GETFUNCPTR( AssociateColorProfileWithDeviceA ) GETFUNCPTR( CloseColorProfile ) + GETFUNCPTR( CreateMultiProfileTransform ) + GETFUNCPTR( DeleteColorTransform ) GETFUNCPTR( DisassociateColorProfileFromDeviceA ) GETFUNCPTR( GetColorDirectoryA ) GETFUNCPTR( GetColorDirectoryW ) @@ -1334,6 +1338,38 @@ static BOOL have_profile(void) return TRUE; } +static void test_CreateMultiProfileTransform( char *standardprofile, char *testprofile ) +{ + PROFILE profile; + HPROFILE handle[2]; + HTRANSFORM transform; + DWORD intents[2] = { INTENT_PERCEPTUAL, INTENT_PERCEPTUAL }; + + if (testprofile) + { + profile.dwType = PROFILE_FILENAME; + profile.pProfileData = standardprofile; + profile.cbDataSize = strlen(standardprofile); + + handle[0] = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); + ok( handle[0] != NULL, "got %u\n", GetLastError() ); + + profile.dwType = PROFILE_FILENAME; + profile.pProfileData = testprofile; + profile.cbDataSize = strlen(testprofile); + + handle[1] = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); + ok( handle[1] != NULL, "got %u\n", GetLastError() ); + + transform = pCreateMultiProfileTransform( handle, 2, intents, 2, 0, 0 ); + ok( transform != NULL, "got %u\n", GetLastError() ); + + pDeleteColorTransform( transform ); + pCloseColorProfile( handle[0] ); + pCloseColorProfile( handle[1] ); + } +} + START_TEST(profile) { UINT len; @@ -1443,6 +1479,7 @@ START_TEST(profile) test_UninstallColorProfileW( testprofileW ); test_AssociateColorProfileWithDeviceA( testprofile ); + test_CreateMultiProfileTransform( standardprofile, testprofile ); if (testprofile) DeleteFileA( testprofile ); FreeLibrary( huser32 );