Commit 4e4d477c authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

shell32/tests: Fix some test failures on NT4 (and some Win95 boxes).

parent a19db6dc
...@@ -36,6 +36,7 @@ struct testwindow_info ...@@ -36,6 +36,7 @@ struct testwindow_info
{ {
HWND hwnd; HWND hwnd;
BOOL registered; BOOL registered;
BOOL to_be_deleted;
RECT desired_rect; RECT desired_rect;
UINT edge; UINT edge;
RECT allocated_rect; RECT allocated_rect;
...@@ -58,6 +59,12 @@ static void testwindow_setpos(HWND hwnd) ...@@ -58,6 +59,12 @@ static void testwindow_setpos(HWND hwnd)
return; return;
} }
if (info->to_be_deleted)
{
win_skip("Some Win95 and NT4 systems send messages to removed taskbars\n");
return;
}
abd.cbSize = sizeof(abd); abd.cbSize = sizeof(abd);
abd.hWnd = hwnd; abd.hWnd = hwnd;
abd.uEdge = info->edge; abd.uEdge = info->edge;
...@@ -221,6 +228,7 @@ static void test_setpos(void) ...@@ -221,6 +228,7 @@ static void test_setpos(void)
/* dock windows[0] to the bottom of the screen */ /* dock windows[0] to the bottom of the screen */
windows[0].registered = TRUE; windows[0].registered = TRUE;
windows[0].to_be_deleted = FALSE;
windows[0].edge = ABE_BOTTOM; windows[0].edge = ABE_BOTTOM;
windows[0].desired_rect.left = 0; windows[0].desired_rect.left = 0;
windows[0].desired_rect.right = screen_width; windows[0].desired_rect.right = screen_width;
...@@ -241,6 +249,7 @@ static void test_setpos(void) ...@@ -241,6 +249,7 @@ static void test_setpos(void)
/* dock windows[1] to the bottom of the screen */ /* dock windows[1] to the bottom of the screen */
windows[1].registered = TRUE; windows[1].registered = TRUE;
windows[1].to_be_deleted = FALSE;
windows[1].edge = ABE_BOTTOM; windows[1].edge = ABE_BOTTOM;
windows[1].desired_rect.left = 0; windows[1].desired_rect.left = 0;
windows[1].desired_rect.right = screen_width; windows[1].desired_rect.right = screen_width;
...@@ -272,6 +281,7 @@ static void test_setpos(void) ...@@ -272,6 +281,7 @@ static void test_setpos(void)
/* dock windows[2] to the bottom of the screen */ /* dock windows[2] to the bottom of the screen */
windows[2].registered = TRUE; windows[2].registered = TRUE;
windows[2].to_be_deleted = FALSE;
windows[2].edge = ABE_BOTTOM; windows[2].edge = ABE_BOTTOM;
windows[2].desired_rect.left = 0; windows[2].desired_rect.left = 0;
windows[2].desired_rect.right = screen_width; windows[2].desired_rect.right = screen_width;
...@@ -328,6 +338,7 @@ static void test_setpos(void) ...@@ -328,6 +338,7 @@ static void test_setpos(void)
expected_bottom = max(windows[0].allocated_rect.bottom, windows[1].allocated_rect.bottom); expected_bottom = max(windows[0].allocated_rect.bottom, windows[1].allocated_rect.bottom);
abd.hWnd = windows[0].hwnd; abd.hWnd = windows[0].hwnd;
windows[0].to_be_deleted = TRUE;
ret = SHAppBarMessage(ABM_REMOVE, &abd); ret = SHAppBarMessage(ABM_REMOVE, &abd);
ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret); ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret);
windows[0].registered = FALSE; windows[0].registered = FALSE;
...@@ -341,12 +352,14 @@ static void test_setpos(void) ...@@ -341,12 +352,14 @@ static void test_setpos(void)
/* remove the other windows */ /* remove the other windows */
abd.hWnd = windows[1].hwnd; abd.hWnd = windows[1].hwnd;
windows[1].to_be_deleted = TRUE;
ret = SHAppBarMessage(ABM_REMOVE, &abd); ret = SHAppBarMessage(ABM_REMOVE, &abd);
ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret); ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret);
windows[1].registered = FALSE; windows[1].registered = FALSE;
DestroyWindow(windows[1].hwnd); DestroyWindow(windows[1].hwnd);
abd.hWnd = windows[2].hwnd; abd.hWnd = windows[2].hwnd;
windows[2].to_be_deleted = TRUE;
ret = SHAppBarMessage(ABM_REMOVE, &abd); ret = SHAppBarMessage(ABM_REMOVE, &abd);
ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret); ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret);
windows[2].registered = FALSE; windows[2].registered = FALSE;
......
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