Commit bf430421 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

comctl32/tests: Add a test to check built-in comctl32 classes.

parent 685a4b50
...@@ -338,7 +338,7 @@ static void test_LoadIconWithScaleDown(void) ...@@ -338,7 +338,7 @@ static void test_LoadIconWithScaleDown(void)
FreeLibrary(hinst); FreeLibrary(hinst);
} }
static void check_class( const char *name, int must_exist, UINT style, UINT ignore ) static void check_class( const char *name, int must_exist, UINT style, UINT ignore, BOOL v6 )
{ {
WNDCLASSA wc; WNDCLASSA wc;
...@@ -347,14 +347,14 @@ static void check_class( const char *name, int must_exist, UINT style, UINT igno ...@@ -347,14 +347,14 @@ static void check_class( const char *name, int must_exist, UINT style, UINT igno
char buff[64]; char buff[64];
HWND hwnd; HWND hwnd;
todo_wine_if(strcmp(name, "Button") && todo_wine_if(!strcmp(name, "SysLink") && !must_exist && !v6)
strcmp(name, "ComboBox") && ok( must_exist, "System class %s should %sexist\n", name, must_exist ? "" : "NOT " );
strcmp(name, "Edit") && if (!must_exist) return;
strcmp(name, "Static") &&
strcmp(name, "ListBox") && todo_wine_if(!strcmp(name, "ScrollBar") || (!strcmp(name, "tooltips_class32") && v6))
strcmp(name, "ComboLBox"))
ok( !(~wc.style & style & ~ignore), "System class %s is missing bits %x (%08x/%08x)\n", ok( !(~wc.style & style & ~ignore), "System class %s is missing bits %x (%08x/%08x)\n",
name, ~wc.style & style, wc.style, style ); name, ~wc.style & style, wc.style, style );
todo_wine_if((!strcmp(name, "tooltips_class32") && v6) || !strcmp(name, "SysLink"))
ok( !(wc.style & ~style), "System class %s has extra bits %x (%08x/%08x)\n", ok( !(wc.style & ~style), "System class %s has extra bits %x (%08x/%08x)\n",
name, wc.style & ~style, wc.style, style ); name, wc.style & ~style, wc.style, style );
ok( !wc.hInstance, "System class %s has hInstance %p\n", name, wc.hInstance ); ok( !wc.hInstance, "System class %s has hInstance %p\n", name, wc.hInstance );
...@@ -373,13 +373,40 @@ todo_wine_if(strcmp(name, "Button") && ...@@ -373,13 +373,40 @@ todo_wine_if(strcmp(name, "Button") &&
static void test_builtin_classes(void) static void test_builtin_classes(void)
{ {
/* check style bits */ /* check style bits */
check_class( "Button", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0 ); check_class( "Button", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE );
check_class( "ComboBox", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0 ); check_class( "ComboBox", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE );
check_class( "Edit", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0 ); check_class( "Edit", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE );
check_class( "ListBox", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0 ); check_class( "ListBox", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE );
check_class( "ScrollBar", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0 ); check_class( "ScrollBar", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE );
check_class( "Static", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0 ); check_class( "Static", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE );
check_class( "ComboLBox", 1, CS_SAVEBITS | CS_DBLCLKS | CS_DROPSHADOW | CS_GLOBALCLASS, CS_DROPSHADOW ); check_class( "ComboLBox", 1, CS_SAVEBITS | CS_DBLCLKS | CS_DROPSHADOW | CS_GLOBALCLASS, CS_DROPSHADOW, FALSE );
}
static void test_comctl32_classes(BOOL v6)
{
check_class(ANIMATE_CLASSA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE);
check_class(WC_COMBOBOXEXA, 1, CS_GLOBALCLASS, 0, FALSE);
check_class(DATETIMEPICK_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE);
check_class(WC_HEADERA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE);
check_class(HOTKEY_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE);
check_class(WC_IPADDRESSA, 1, CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE);
check_class(WC_LISTVIEWA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE);
check_class(MONTHCAL_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE);
check_class(WC_NATIVEFONTCTLA, 1, CS_GLOBALCLASS, 0, FALSE);
check_class(WC_PAGESCROLLERA, 1, CS_GLOBALCLASS, 0, FALSE);
check_class(PROGRESS_CLASSA, 1, CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE);
check_class(REBARCLASSNAMEA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE);
check_class(STATUSCLASSNAMEA, 1, CS_DBLCLKS | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE);
check_class(WC_TABCONTROLA, 1, CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE);
check_class(TOOLBARCLASSNAMEA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE);
if (v6)
check_class(TOOLTIPS_CLASSA, 1, CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS | CS_DROPSHADOW, CS_SAVEBITS | CS_HREDRAW | CS_VREDRAW /* XP */, TRUE);
else
check_class(TOOLTIPS_CLASSA, 1, CS_DBLCLKS | CS_GLOBALCLASS | CS_SAVEBITS, CS_HREDRAW | CS_VREDRAW /* XP */, FALSE);
check_class(TRACKBAR_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE);
check_class(WC_TREEVIEWA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE);
check_class(UPDOWN_CLASSA, 1, CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE);
check_class("SysLink", v6, CS_GLOBALCLASS, 0, FALSE);
} }
START_TEST(misc) START_TEST(misc)
...@@ -393,9 +420,12 @@ START_TEST(misc) ...@@ -393,9 +420,12 @@ START_TEST(misc)
test_GetPtrAW(); test_GetPtrAW();
test_Alloc(); test_Alloc();
test_comctl32_classes(FALSE);
if (!load_v6_module(&ctx_cookie, &hCtx)) if (!load_v6_module(&ctx_cookie, &hCtx))
return; return;
test_comctl32_classes(TRUE);
test_builtin_classes(); test_builtin_classes();
test_LoadIconWithScaleDown(); test_LoadIconWithScaleDown();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment