Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
dbdf9278
Commit
dbdf9278
authored
Feb 22, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscms: Add tests for AssociateColorProfileWithDevice and DisassociateColorProfileFromDevice.
parent
88ba6a66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
0 deletions
+71
-0
profile.c
dlls/mscms/tests/profile.c
+71
-0
No files found.
dlls/mscms/tests/profile.c
View file @
dbdf9278
...
@@ -32,7 +32,9 @@
...
@@ -32,7 +32,9 @@
HMODULE
hmscms
;
HMODULE
hmscms
;
static
BOOL
(
WINAPI
*
pAssociateColorProfileWithDeviceA
)(
PCSTR
,
PCSTR
,
PCSTR
);
static
BOOL
(
WINAPI
*
pCloseColorProfile
)(
HPROFILE
);
static
BOOL
(
WINAPI
*
pCloseColorProfile
)(
HPROFILE
);
static
BOOL
(
WINAPI
*
pDisassociateColorProfileFromDeviceA
)(
PCSTR
,
PCSTR
,
PCSTR
);
static
BOOL
(
WINAPI
*
pGetColorDirectoryA
)(
PCHAR
,
PCHAR
,
PDWORD
);
static
BOOL
(
WINAPI
*
pGetColorDirectoryA
)(
PCHAR
,
PCHAR
,
PDWORD
);
static
BOOL
(
WINAPI
*
pGetColorDirectoryW
)(
PWCHAR
,
PWCHAR
,
PDWORD
);
static
BOOL
(
WINAPI
*
pGetColorDirectoryW
)(
PWCHAR
,
PWCHAR
,
PDWORD
);
static
BOOL
(
WINAPI
*
pGetColorProfileElement
)(
HPROFILE
,
TAGTYPE
,
DWORD
,
PDWORD
,
PVOID
,
PBOOL
);
static
BOOL
(
WINAPI
*
pGetColorProfileElement
)(
HPROFILE
,
TAGTYPE
,
DWORD
,
PDWORD
,
PVOID
,
PBOOL
);
...
@@ -61,7 +63,9 @@ static BOOL (WINAPI *pUninstallColorProfileW)(PCWSTR,PCWSTR,BOOL);
...
@@ -61,7 +63,9 @@ static BOOL (WINAPI *pUninstallColorProfileW)(PCWSTR,PCWSTR,BOOL);
static
BOOL
init_function_ptrs
(
void
)
static
BOOL
init_function_ptrs
(
void
)
{
{
GETFUNCPTR
(
AssociateColorProfileWithDeviceA
)
GETFUNCPTR
(
CloseColorProfile
)
GETFUNCPTR
(
CloseColorProfile
)
GETFUNCPTR
(
DisassociateColorProfileFromDeviceA
)
GETFUNCPTR
(
GetColorDirectoryA
)
GETFUNCPTR
(
GetColorDirectoryA
)
GETFUNCPTR
(
GetColorDirectoryW
)
GETFUNCPTR
(
GetColorDirectoryW
)
GETFUNCPTR
(
GetColorProfileElement
)
GETFUNCPTR
(
GetColorProfileElement
)
...
@@ -1353,6 +1357,71 @@ static void test_UninstallColorProfileW(void)
...
@@ -1353,6 +1357,71 @@ static void test_UninstallColorProfileW(void)
}
}
}
}
static
void
test_AssociateColorProfileWithDeviceA
(
void
)
{
BOOL
ret
;
char
profile
[
MAX_PATH
],
basename
[
MAX_PATH
];
DWORD
error
,
size
=
sizeof
(
profile
);
if
(
testprofile
)
{
SetLastError
(
0xdeadbeef
);
ret
=
pAssociateColorProfileWithDeviceA
(
"machine"
,
testprofile
,
NULL
);
error
=
GetLastError
();
ok
(
!
ret
,
"AssociateColorProfileWithDevice() succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pAssociateColorProfileWithDeviceA
(
"machine"
,
NULL
,
"DISPLAY"
);
error
=
GetLastError
();
ok
(
!
ret
,
"AssociateColorProfileWithDevice() succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pAssociateColorProfileWithDeviceA
(
"machine"
,
testprofile
,
"DISPLAY"
);
error
=
GetLastError
();
ok
(
!
ret
,
"AssociateColorProfileWithDevice() succeeded
\n
"
);
ok
(
error
==
ERROR_NOT_SUPPORTED
,
"expected ERROR_NOT_SUPPORTED, got %u
\n
"
,
error
);
ret
=
pInstallColorProfileA
(
NULL
,
testprofile
);
ok
(
ret
,
"InstallColorProfileA() failed (%u)
\n
"
,
GetLastError
()
);
ret
=
pGetColorDirectoryA
(
NULL
,
profile
,
&
size
);
ok
(
ret
,
"GetColorDirectoryA() failed (%d)
\n
"
,
GetLastError
()
);
MSCMS_basenameA
(
testprofile
,
basename
);
lstrcatA
(
profile
,
"
\\
"
);
lstrcatA
(
profile
,
basename
);
ret
=
pAssociateColorProfileWithDeviceA
(
NULL
,
profile
,
"DISPLAY"
);
ok
(
ret
,
"AssociateColorProfileWithDevice() failed (%u)
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
pDisassociateColorProfileFromDeviceA
(
"machine"
,
profile
,
NULL
);
error
=
GetLastError
();
ok
(
!
ret
,
"DisassociateColorProfileFromDeviceA() succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pDisassociateColorProfileFromDeviceA
(
"machine"
,
NULL
,
"DISPLAY"
);
error
=
GetLastError
();
ok
(
!
ret
,
"DisassociateColorProfileFromDeviceA() succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
pDisassociateColorProfileFromDeviceA
(
"machine"
,
profile
,
"DISPLAY"
);
error
=
GetLastError
();
ok
(
!
ret
,
"DisassociateColorProfileFromDeviceA() succeeded
\n
"
);
ok
(
error
==
ERROR_NOT_SUPPORTED
,
"expected ERROR_NOT_SUPPORTED, got %u
\n
"
,
error
);
ret
=
pDisassociateColorProfileFromDeviceA
(
NULL
,
profile
,
"DISPLAY"
);
ok
(
ret
,
"DisassociateColorProfileFromDeviceA() failed (%u)
\n
"
,
GetLastError
()
);
ret
=
pUninstallColorProfileA
(
NULL
,
profile
,
TRUE
);
ok
(
ret
,
"UninstallColorProfileW() failed (%d)
\n
"
,
GetLastError
()
);
}
}
START_TEST
(
profile
)
START_TEST
(
profile
)
{
{
UINT
len
;
UINT
len
;
...
@@ -1457,6 +1526,8 @@ START_TEST(profile)
...
@@ -1457,6 +1526,8 @@ START_TEST(profile)
test_UninstallColorProfileA
();
test_UninstallColorProfileA
();
test_UninstallColorProfileW
();
test_UninstallColorProfileW
();
test_AssociateColorProfileWithDeviceA
();
/* Clean up */
/* Clean up */
if
(
testprofile
)
if
(
testprofile
)
DeleteFileA
(
testprofile
);
DeleteFileA
(
testprofile
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment