user32/tests: Fix some test failures on XP.
This commit is contained in:
parent
0ac31924a1
commit
343d2420fc
|
@ -3906,7 +3906,7 @@ static LRESULT CALLBACK minmax_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM l
|
|||
}
|
||||
|
||||
static int expected_cx, expected_cy;
|
||||
static RECT expected_rect;
|
||||
static RECT expected_rect, broken_rect;
|
||||
|
||||
static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
|
||||
{
|
||||
|
@ -3930,8 +3930,10 @@ static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM
|
|||
hwnd, msg, cs->cx, cs->cy, rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok( cs->cx == expected_cx, "wrong x size %d/%d\n", cs->cx, expected_cx );
|
||||
ok( cs->cy == expected_cy, "wrong y size %d/%d\n", cs->cy, expected_cy );
|
||||
ok( rect.right - rect.left == expected_rect.right - expected_rect.left &&
|
||||
rect.bottom - rect.top == expected_rect.bottom - expected_rect.top,
|
||||
ok( (rect.right - rect.left == expected_rect.right - expected_rect.left &&
|
||||
rect.bottom - rect.top == expected_rect.bottom - expected_rect.top) ||
|
||||
broken( rect.right - rect.left == broken_rect.right - broken_rect.left &&
|
||||
rect.bottom - rect.top == broken_rect.bottom - broken_rect.top),
|
||||
"wrong rect %d,%d-%d,%d / %d,%d-%d,%d\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom,
|
||||
expected_rect.left, expected_rect.top, expected_rect.right, expected_rect.bottom );
|
||||
|
@ -4212,6 +4214,7 @@ static void test_CreateWindow(void)
|
|||
|
||||
expected_cx = expected_cy = 200000;
|
||||
SetRect( &expected_rect, 0, 0, 200000, 200000 );
|
||||
broken_rect = expected_rect;
|
||||
hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 300000, 300000, 200000, 200000, parent, 0, 0, NULL);
|
||||
ok( hwnd != 0, "creation failed err %u\n", GetLastError());
|
||||
GetClientRect( hwnd, &rc );
|
||||
|
@ -4221,6 +4224,7 @@ static void test_CreateWindow(void)
|
|||
|
||||
expected_cx = expected_cy = -10;
|
||||
SetRect( &expected_rect, 0, 0, 0, 0 );
|
||||
broken_rect = expected_rect;
|
||||
hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, -20, -20, -10, -10, parent, 0, 0, NULL);
|
||||
ok( hwnd != 0, "creation failed err %u\n", GetLastError());
|
||||
GetClientRect( hwnd, &rc );
|
||||
|
@ -4230,6 +4234,7 @@ static void test_CreateWindow(void)
|
|||
|
||||
expected_cx = expected_cy = -200000;
|
||||
SetRect( &expected_rect, 0, 0, 0, 0 );
|
||||
broken_rect = expected_rect;
|
||||
hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, -300000, -300000, -200000, -200000, parent, 0, 0, NULL);
|
||||
ok( hwnd != 0, "creation failed err %u\n", GetLastError());
|
||||
GetClientRect( hwnd, &rc );
|
||||
|
@ -4245,21 +4250,23 @@ static void test_CreateWindow(void)
|
|||
expected_cx = 100;
|
||||
expected_cy = 0x7fffffff;
|
||||
SetRect( &expected_rect, 10, 10, 110, 0x7fffffff );
|
||||
SetRect( &broken_rect, 10, 10, 110, 0x7fffffffU + 10 );
|
||||
hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 10, 10, 100, 0x7fffffff, parent, 0, 0, NULL);
|
||||
ok( hwnd != 0, "creation failed err %u\n", GetLastError());
|
||||
GetClientRect( hwnd, &rc );
|
||||
ok( rc.right == 100, "invalid rect right %u\n", rc.right );
|
||||
ok( rc.bottom == 0x7fffffff - 10, "invalid rect bottom %u\n", rc.bottom );
|
||||
ok( rc.bottom == 0x7fffffff - 10 || broken(rc.bottom == 0), "invalid rect bottom %u\n", rc.bottom );
|
||||
DestroyWindow(hwnd);
|
||||
|
||||
expected_cx = 0x7fffffff;
|
||||
expected_cy = 0x7fffffff;
|
||||
SetRect( &expected_rect, 20, 10, 0x7fffffff, 0x7fffffff );
|
||||
SetRect( &broken_rect, 20, 10, 0x7fffffffU + 20, 0x7fffffffU + 10 );
|
||||
hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 20, 10, 0x7fffffff, 0x7fffffff, parent, 0, 0, NULL);
|
||||
ok( hwnd != 0, "creation failed err %u\n", GetLastError());
|
||||
GetClientRect( hwnd, &rc );
|
||||
ok( rc.right == 0x7fffffff - 20, "invalid rect right %u\n", rc.right );
|
||||
ok( rc.bottom == 0x7fffffff - 10, "invalid rect bottom %u\n", rc.bottom );
|
||||
ok( rc.right == 0x7fffffff - 20 || broken(rc.right == 0), "invalid rect right %u\n", rc.right );
|
||||
ok( rc.bottom == 0x7fffffff - 10 || broken(rc.bottom == 0), "invalid rect bottom %u\n", rc.bottom );
|
||||
DestroyWindow(hwnd);
|
||||
|
||||
/* top level window */
|
||||
|
@ -4635,10 +4642,7 @@ static LRESULT CALLBACK TestExposedRegion_WndProc(HWND hwnd, UINT msg, WPARAM wP
|
|||
if(waitResult != WAIT_TIMEOUT)
|
||||
{
|
||||
GetUpdateRect(hwnd, &updateRect, FALSE);
|
||||
todo_wine
|
||||
{
|
||||
ok(!IsRectEmpty(&updateRect), "Exposed rect should not be empty\n");
|
||||
}
|
||||
ok(IsRectEmpty(&updateRect), "Exposed rect should be empty\n");
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -4856,14 +4860,14 @@ static void test_layered_window(void)
|
|||
ok( alpha == 22, "wrong alpha %u\n", alpha );
|
||||
ok( flags == (LWA_COLORKEY | LWA_ALPHA), "wrong flags %x\n", flags );
|
||||
|
||||
/* alpha not changed if LWA_ALPHA is not set */
|
||||
ret = pSetLayeredWindowAttributes( hwnd, 0x888888, 33, LWA_COLORKEY );
|
||||
ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" );
|
||||
alpha = 0;
|
||||
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
|
||||
ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" );
|
||||
ok( key == 0x888888, "wrong color key %x\n", key );
|
||||
ok( alpha == 22, "wrong alpha %u\n", alpha );
|
||||
/* alpha not changed on vista if LWA_ALPHA is not set */
|
||||
ok( alpha == 22 || alpha == 33, "wrong alpha %u\n", alpha );
|
||||
ok( flags == LWA_COLORKEY, "wrong flags %x\n", flags );
|
||||
|
||||
/* color key always changed */
|
||||
|
@ -4873,7 +4877,7 @@ static void test_layered_window(void)
|
|||
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
|
||||
ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" );
|
||||
ok( key == 0x999999, "wrong color key %x\n", key );
|
||||
ok( alpha == 22, "wrong alpha %u\n", alpha );
|
||||
ok( alpha == 22 || alpha == 44, "wrong alpha %u\n", alpha );
|
||||
ok( flags == 0, "wrong flags %x\n", flags );
|
||||
|
||||
/* default alpha is 0 */
|
||||
|
@ -4884,7 +4888,7 @@ static void test_layered_window(void)
|
|||
ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags );
|
||||
ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" );
|
||||
ok( key == 0x222222, "wrong color key %x\n", key );
|
||||
ok( alpha == 0, "wrong alpha %u\n", alpha );
|
||||
ok( alpha == 0 || alpha == 55, "wrong alpha %u\n", alpha );
|
||||
ok( flags == 0, "wrong flags %x\n", flags );
|
||||
|
||||
DestroyWindow( hwnd );
|
||||
|
|
Loading…
Reference in New Issue