mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 17:14:32 +00:00
[USER32_APITEST] Add test for bad 'Icon Groups' but good 'Icons' such as F1'97 (#6020)
Add test for bad 'Icon Groups' but good 'Icons' such as created by old versions of Watcom C/C++ That icon shows fine in Windows Explorer WinXP/Win2K3, but does not show in WinVista/Win7 anymore. A very special corner case. We will commit the proposed fix shortly after committing the new test.
This commit is contained in:
parent
e3d97d7dde
commit
c00d41d91c
4 changed files with 12 additions and 2 deletions
|
@ -27,8 +27,9 @@ BOOL ResourceToFile(INT i, PCWSTR FileName)
|
||||||
|
|
||||||
if (FileExists(FileName))
|
if (FileExists(FileName))
|
||||||
{
|
{
|
||||||
skip("'%S' already exists. Exiting now\n", FileName);
|
/* We should only be using %temp% paths, so deleting here should be OK */
|
||||||
return FALSE;
|
printf("Deleting '%S' that already exists.\n", FileName);
|
||||||
|
DeleteFileW(FileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
hRes = FindResourceW(NULL, MAKEINTRESOURCEW(i), MAKEINTRESOURCEW(RT_RCDATA));
|
hRes = FindResourceW(NULL, MAKEINTRESOURCEW(i), MAKEINTRESOURCEW(RT_RCDATA));
|
||||||
|
@ -90,6 +91,12 @@ static struct
|
||||||
|
|
||||||
/* Icon group file containing one PNG icon and one normal icon */
|
/* Icon group file containing one PNG icon and one normal icon */
|
||||||
{L"%temp%\\ROS.ico", 1, 1, TRUE},
|
{L"%temp%\\ROS.ico", 1, 1, TRUE},
|
||||||
|
|
||||||
|
/* Executable file with bad 'Icon Group' but good 'Icons'.
|
||||||
|
* Windows explorer shows the program's icon correctly in WinXP/Win2K3
|
||||||
|
* but Windows 7 shows only a default icon. This is analogous
|
||||||
|
* to EXE's generated by older Watcom C/C++ versions. */
|
||||||
|
{L"%temp%\\cpimg2e.exe", 1, 1, TRUE},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct
|
static struct
|
||||||
|
@ -100,6 +107,7 @@ static struct
|
||||||
{
|
{
|
||||||
{L"%temp%\\ROS.ico", IDR_ICONS_PNG},
|
{L"%temp%\\ROS.ico", IDR_ICONS_PNG},
|
||||||
{L"%temp%\\sysicon.ico", IDR_ICONS_NORMAL},
|
{L"%temp%\\sysicon.ico", IDR_ICONS_NORMAL},
|
||||||
|
{L"%temp%\\cpimg2e.exe", IDR_EXE_NORMAL}
|
||||||
};
|
};
|
||||||
|
|
||||||
START_TEST(PrivateExtractIcons)
|
START_TEST(PrivateExtractIcons)
|
||||||
|
|
BIN
modules/rostests/apitests/user32/cpimg2e.exe
Normal file
BIN
modules/rostests/apitests/user32/cpimg2e.exe
Normal file
Binary file not shown.
|
@ -3,3 +3,4 @@
|
||||||
|
|
||||||
#define IDR_ICONS_PNG 2000
|
#define IDR_ICONS_PNG 2000
|
||||||
#define IDR_ICONS_NORMAL 2001
|
#define IDR_ICONS_NORMAL 2001
|
||||||
|
#define IDR_EXE_NORMAL 2002
|
||||||
|
|
|
@ -10,6 +10,7 @@ TESTCURSOR CURSOR "test.cur"
|
||||||
|
|
||||||
IDR_ICONS_PNG RCDATA "ROS.ico"
|
IDR_ICONS_PNG RCDATA "ROS.ico"
|
||||||
IDR_ICONS_NORMAL RCDATA "sysicon.ico"
|
IDR_ICONS_NORMAL RCDATA "sysicon.ico"
|
||||||
|
IDR_EXE_NORMAL RCDATA "cpimg2e.exe"
|
||||||
|
|
||||||
TESTDIALOG DIALOG 0,0, 200,200
|
TESTDIALOG DIALOG 0,0, 200,200
|
||||||
CLASS "TestDialogClass"
|
CLASS "TestDialogClass"
|
||||||
|
|
Loading…
Reference in a new issue