Alexandre Julliard : user32/tests: Fix the layered window tests for some Vista versions.
Alexandre Julliard
julliard at winehq.org
Tue Jan 13 10:56:44 CST 2009
Module: wine
Branch: master
Commit: c6144893b61edc928994d271d061626dd062ed44
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c6144893b61edc928994d271d061626dd062ed44
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jan 13 17:06:31 2009 +0100
user32/tests: Fix the layered window tests for some Vista versions.
---
dlls/user32/tests/win.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 7f6f88b..9d6ba7f 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 );
More information about the wine-cvs
mailing list