Commit 9e737691 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

comctl32/tests: Fix some test failures on comctl32 4.70.

parent 16ddc624
...@@ -110,6 +110,12 @@ static void test_title(void) ...@@ -110,6 +110,12 @@ static void test_title(void)
psh.pfnCallback = sheet_callback; psh.pfnCallback = sheet_callback;
hdlg = (HWND)PropertySheetA(&psh); hdlg = (HWND)PropertySheetA(&psh);
if (hdlg == INVALID_HANDLE_VALUE)
{
win_skip("comctl32 4.70 needs dwSize adjustment\n");
psh.dwSize = sizeof(psh) - sizeof(HBITMAP) - sizeof(HPALETTE) - sizeof(HBITMAP);
hdlg = (HWND)PropertySheetA(&psh);
}
DestroyWindow(hdlg); DestroyWindow(hdlg);
} }
...@@ -141,6 +147,12 @@ static void test_nopage(void) ...@@ -141,6 +147,12 @@ static void test_nopage(void)
psh.pfnCallback = sheet_callback; psh.pfnCallback = sheet_callback;
hdlg = (HWND)PropertySheetA(&psh); hdlg = (HWND)PropertySheetA(&psh);
if (hdlg == INVALID_HANDLE_VALUE)
{
win_skip("comctl32 4.70 needs dwSize adjustment\n");
psh.dwSize = sizeof(psh) - sizeof(HBITMAP) - sizeof(HPALETTE) - sizeof(HBITMAP);
hdlg = (HWND)PropertySheetA(&psh);
}
ShowWindow(hdlg,SW_NORMAL); ShowWindow(hdlg,SW_NORMAL);
SendMessage(hdlg, PSM_REMOVEPAGE, 0, 0); SendMessage(hdlg, PSM_REMOVEPAGE, 0, 0);
RedrawWindow(hdlg,NULL,NULL,RDW_UPDATENOW|RDW_ERASENOW); RedrawWindow(hdlg,NULL,NULL,RDW_UPDATENOW|RDW_ERASENOW);
...@@ -183,6 +195,7 @@ static void test_disableowner(void) ...@@ -183,6 +195,7 @@ static void test_disableowner(void)
HPROPSHEETPAGE hpsp[1]; HPROPSHEETPAGE hpsp[1];
PROPSHEETPAGEA psp; PROPSHEETPAGEA psp;
PROPSHEETHEADERA psh; PROPSHEETHEADERA psh;
INT_PTR p;
register_parent_wnd_class(); register_parent_wnd_class();
parent = CreateWindowA("parent class", "", WS_CAPTION | WS_SYSMENU | WS_VISIBLE, 100, 100, 100, 100, GetDesktopWindow(), NULL, GetModuleHandleA(NULL), 0); parent = CreateWindowA("parent class", "", WS_CAPTION | WS_SYSMENU | WS_VISIBLE, 100, 100, 100, 100, GetDesktopWindow(), NULL, GetModuleHandleA(NULL), 0);
...@@ -207,7 +220,9 @@ static void test_disableowner(void) ...@@ -207,7 +220,9 @@ static void test_disableowner(void)
U3(psh).phpage = hpsp; U3(psh).phpage = hpsp;
psh.pfnCallback = disableowner_callback; psh.pfnCallback = disableowner_callback;
PropertySheetA(&psh); p = PropertySheetA(&psh);
todo_wine
ok(p == 0, "Expected 0, got %ld\n", p);
ok(IsWindowEnabled(parent) != 0, "parent window should be enabled\n"); ok(IsWindowEnabled(parent) != 0, "parent window should be enabled\n");
DestroyWindow(parent); DestroyWindow(parent);
} }
...@@ -283,6 +298,12 @@ static void test_wiznavigation(void) ...@@ -283,6 +298,12 @@ static void test_wiznavigation(void)
psh.hwndParent = GetDesktopWindow(); psh.hwndParent = GetDesktopWindow();
U3(psh).phpage = hpsp; U3(psh).phpage = hpsp;
hdlg = (HWND)PropertySheetA(&psh); hdlg = (HWND)PropertySheetA(&psh);
if (hdlg == INVALID_HANDLE_VALUE)
{
win_skip("comctl32 4.70 needs dwSize adjustment\n");
psh.dwSize = sizeof(psh) - sizeof(HBITMAP) - sizeof(HPALETTE) - sizeof(HBITMAP);
hdlg = (HWND)PropertySheetA(&psh);
}
ok(active_page == 0, "Active page should be 0. Is: %d\n", active_page); ok(active_page == 0, "Active page should be 0. Is: %d\n", active_page);
...@@ -381,6 +402,12 @@ static void test_buttons(void) ...@@ -381,6 +402,12 @@ static void test_buttons(void)
psh.pfnCallback = sheet_callback; psh.pfnCallback = sheet_callback;
hdlg = (HWND)PropertySheetA(&psh); hdlg = (HWND)PropertySheetA(&psh);
if (hdlg == INVALID_HANDLE_VALUE)
{
win_skip("comctl32 4.70 needs dwSize adjustment\n");
psh.dwSize = sizeof(psh) - sizeof(HBITMAP) - sizeof(HPALETTE) - sizeof(HBITMAP);
hdlg = (HWND)PropertySheetA(&psh);
}
/* OK button */ /* OK button */
button = GetDlgItem(hdlg, IDOK); button = GetDlgItem(hdlg, IDOK);
......
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