From c6144893b61edc928994d271d061626dd062ed44 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 13 Jan 2009 17:06:31 +0100 Subject: [PATCH] user32/tests: Fix the layered window tests for some Vista versions. --- dlls/user32/tests/win.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 7f6f88baea8..9d6ba7f3580 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -4958,7 +4958,7 @@ static void test_layered_window(void) ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" ); ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" ); - ok( key == 0x123456, "wrong color key %x\n", key ); + ok( key == 0x123456 || key == 0, "wrong color key %x\n", key ); ok( alpha == 44, "wrong alpha %u\n", alpha ); ok( flags == LWA_ALPHA, "wrong flags %x\n", flags ); @@ -4987,24 +4987,24 @@ static void test_layered_window(void) ok( alpha == 22 || alpha == 33, "wrong alpha %u\n", alpha ); ok( flags == LWA_COLORKEY, "wrong flags %x\n", flags ); - /* color key always changed */ + /* color key may or may not be changed without LWA_COLORKEY */ ret = pSetLayeredWindowAttributes( hwnd, 0x999999, 44, 0 ); 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 == 0x999999, "wrong color key %x\n", key ); + ok( key == 0x888888 || key == 0x999999, "wrong color key %x\n", key ); ok( alpha == 22 || alpha == 44, "wrong alpha %u\n", alpha ); ok( flags == 0, "wrong flags %x\n", flags ); - /* default alpha is 0 */ + /* default alpha and color key is 0 */ SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED ); SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED ); ret = pSetLayeredWindowAttributes( hwnd, 0x222222, 55, 0 ); ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" ); 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( key == 0 || key == 0x222222, "wrong color key %x\n", key ); ok( alpha == 0 || alpha == 55, "wrong alpha %u\n", alpha ); ok( flags == 0, "wrong flags %x\n", flags );