The test is currently disabled under Wine because current PropertySheet hangs, and doesn't respond to any events.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/comctl32/tests/propsheet.c | 42 +++++++++++++++++++++++++++++++++ dlls/comctl32/tests/resources.h | 1 + dlls/comctl32/tests/rsrc.rc | 7 ++++++ 3 files changed, 50 insertions(+)
diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c index 2a4afaa51e..b5c05b253a 100644 --- a/dlls/comctl32/tests/propsheet.c +++ b/dlls/comctl32/tests/propsheet.c @@ -1143,6 +1143,47 @@ static void test_CreatePropertySheetPage(void) } }
+static void test_bad_control_class(void) +{ + PROPSHEETPAGEA psp; + PROPSHEETHEADERA psh; + HPROPSHEETPAGE hpsp; + INT_PTR ret; + + memset(&psp, 0, sizeof(psp)); + psp.dwSize = sizeof(psp); + psp.hInstance = GetModuleHandleA(NULL); + U(psp).pszTemplate = (LPCSTR)MAKEINTRESOURCE(IDD_PROP_PAGE_BAD_CONTROL); + psp.pfnDlgProc = page_dlg_proc; + + hpsp = pCreatePropertySheetPageA(&psp); + ok(hpsp != 0, "CreatePropertySheetPage failed\n"); + + memset(&psh, 0, sizeof(psh)); + psh.dwSize = PROPSHEETHEADERA_V1_SIZE; + psh.nPages = 1; + psh.hwndParent = GetDesktopWindow(); + U3(psh).phpage = &hpsp; + +if (!strcmp(winetest_platform, "windows")) /* FIXME: enable once Wine is fixed */ +{ + ret = pPropertySheetA(&psh); + ok(ret == 0, "got %ld\n", ret); +} + + /* Need to recreate hpsp otherwise the test fails under Windows */ + hpsp = pCreatePropertySheetPageA(&psp); + ok(hpsp != 0, "CreatePropertySheetPage failed\n"); + U3(psh).phpage = &hpsp; + + psh.dwFlags = PSH_MODELESS; + ret = pPropertySheetA(&psh); + ok(ret != 0, "got %ld\n", ret); + + ok(IsWindow((HWND)ret), "bad window handle %#lx\n", ret); + DestroyWindow((HWND)ret); +} + static void init_functions(void) { HMODULE hComCtl32 = LoadLibraryA("comctl32.dll"); @@ -1168,6 +1209,7 @@ START_TEST(propsheet)
init_functions();
+ test_bad_control_class(); test_title(); test_nopage(); test_disableowner(); diff --git a/dlls/comctl32/tests/resources.h b/dlls/comctl32/tests/resources.h index 3a89cd7baf..53522c0a09 100644 --- a/dlls/comctl32/tests/resources.h +++ b/dlls/comctl32/tests/resources.h @@ -39,6 +39,7 @@ #define IDD_PROP_PAGE_WITH_CUSTOM_DEFAULT_BUTTON 34 #define IDD_PROP_PAGE_MESSAGE_TEST 35 #define IDD_PROP_PAGE_ERROR 36 +#define IDD_PROP_PAGE_BAD_CONTROL 37
#define IDC_PS_EDIT1 1000 #define IDC_PS_EDIT2 1001 diff --git a/dlls/comctl32/tests/rsrc.rc b/dlls/comctl32/tests/rsrc.rc index 327aa225e1..6eb4fe8a0a 100644 --- a/dlls/comctl32/tests/rsrc.rc +++ b/dlls/comctl32/tests/rsrc.rc @@ -78,6 +78,13 @@ FONT 8, "MS Shell Dlg" { }
+IDD_PROP_PAGE_BAD_CONTROL DIALOG 0, 0, 100, 100 +STYLE WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS | WS_VISIBLE +FONT 8, "MS Shell Dlg" +{ + CONTROL "", -1, "invalid class", 0, 0, 0, 0, 0 +} + STRINGTABLE { IDS_TBADD1 "abc"
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=45790
Your paranoid android.
=== w8adm (task log) ===
Task errors: TestBot process got stuck or died unexpectedly The previous 1 run(s) terminated abnormally
=== wvistau64_he (task log) ===
Task errors: TestBot process got stuck or died unexpectedly The previous 1 run(s) terminated abnormally