Module: wine Branch: master Commit: 9072dbd2f2c4c62c8465f812bba9d7a85bff343f URL: http://source.winehq.org/git/wine.git/?a=commit;h=9072dbd2f2c4c62c8465f812bb...
Author: Huw Davies huw@codeweavers.com Date: Fri Apr 21 09:49:25 2017 +0100
shell32/tests: Add a test for the size of the icon returned by ExtractIcons().
Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/shell32/tests/Makefile.in | 2 +- dlls/shell32/tests/shelllink.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/tests/Makefile.in b/dlls/shell32/tests/Makefile.in index cfe0c50..4bde094 100644 --- a/dlls/shell32/tests/Makefile.in +++ b/dlls/shell32/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = shell32.dll -IMPORTS = shell32 ole32 oleaut32 user32 advapi32 +IMPORTS = shell32 ole32 oleaut32 user32 gdi32 advapi32
C_SRCS = \ appbar.c \ diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index fdf2b14..c88e344 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -1159,6 +1159,8 @@ static void test_ExtractIcon(void) char path[MAX_PATH]; HANDLE file; int r; + ICONINFO info; + BITMAP bm;
/* specified instance handle */ hicon = ExtractIconA(GetModuleHandleA("shell32.dll"), NULL, 0); @@ -1214,6 +1216,10 @@ if (0) /* existing index */ hicon = ExtractIconW(NULL, shell32W, 0); ok(hicon != NULL && HandleToLong(hicon) != -1, "Got icon %p\n", hicon); + GetIconInfo(hicon, &info); + GetObjectW(info.hbmColor, sizeof(bm), &bm); + ok(bm.bmWidth == GetSystemMetrics(SM_CXICON), "got %d\n", bm.bmWidth); + ok(bm.bmHeight == GetSystemMetrics(SM_CYICON), "got %d\n", bm.bmHeight); DestroyIcon(hicon);
/* returns number of resources */