Module: wine Branch: master Commit: 88d5cab5e980d85417812a8ef44fe2b46f51f31f URL: http://source.winehq.org/git/wine.git/?a=commit;h=88d5cab5e980d85417812a8ef4...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Mon Sep 9 10:00:47 2013 +0400
comctl32/tests: Manually load comctl32.dll with newly activated context.
---
dlls/comctl32/tests/header.c | 17 ----------------- dlls/comctl32/tests/listview.c | 16 ---------------- dlls/comctl32/tests/monthcal.c | 16 ---------------- dlls/comctl32/tests/treeview.c | 16 ---------------- dlls/comctl32/tests/v6util.h | 11 +++++++++++ 5 files changed, 11 insertions(+), 65 deletions(-)
diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index 6ad0aa8..02fa61a 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -1814,7 +1814,6 @@ START_TEST(header) HWND parent_hwnd; ULONG_PTR ctx_cookie; HANDLE hCtx; - HWND hwnd;
if (!init()) return; @@ -1847,22 +1846,6 @@ START_TEST(header) return; }
- /* this is a XP SP3 failure workaround */ - hwnd = CreateWindowExA(0, WC_HEADER, NULL, - WS_CHILD|WS_BORDER|WS_VISIBLE|HDS_BUTTONS|HDS_HORZ, - 0, 0, 100, 100, - parent_hwnd, NULL, GetModuleHandleA(NULL), NULL); - - if (!IsWindow(hwnd)) - { - win_skip("FIXME: failed to create Header window.\n"); - unload_v6_module(ctx_cookie, hCtx); - DestroyWindow(parent_hwnd); - return; - } - else - DestroyWindow(hwnd); - /* comctl32 version 6 tests start here */ test_hdf_fixedwidth(parent_hwnd); test_hds_nosizing(parent_hwnd); diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 1ac4333..344d084 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -5554,7 +5554,6 @@ START_TEST(listview)
ULONG_PTR ctx_cookie; HANDLE hCtx; - HWND hwnd;
hComctl32 = GetModuleHandleA("comctl32.dll"); pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); @@ -5623,21 +5622,6 @@ START_TEST(listview) return; }
- /* this is a XP SP3 failure workaround */ - hwnd = CreateWindowExA(0, WC_LISTVIEW, "foo", - WS_CHILD | WS_BORDER | WS_VISIBLE | LVS_REPORT, - 0, 0, 100, 100, - hwndparent, NULL, GetModuleHandleA(NULL), NULL); - if (!IsWindow(hwnd)) - { - win_skip("FIXME: failed to create ListView window.\n"); - unload_v6_module(ctx_cookie, hCtx); - DestroyWindow(hwndparent); - return; - } - else - DestroyWindow(hwnd); - /* comctl32 version 6 tests start here */ test_get_set_view(); test_canceleditlabel(); diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index 1cadf44..1a6c366 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -2002,7 +2002,6 @@ START_TEST(monthcal) BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); INITCOMMONCONTROLSEX iccex; HMODULE hComctl32; - HWND hwnd;
ULONG_PTR ctx_cookie; HANDLE hCtx; @@ -2048,21 +2047,6 @@ START_TEST(monthcal) return; }
- /* this is a XP SP3 failure workaround */ - hwnd = CreateWindowExA(0, MONTHCAL_CLASSA, "foo", - WS_CHILD | WS_BORDER | WS_VISIBLE, - 0, 0, 100, 100, - parent_wnd, NULL, GetModuleHandleA(NULL), NULL); - if (!IsWindow(hwnd)) - { - win_skip("FIXME: failed to create Monthcal window.\n"); - unload_v6_module(ctx_cookie, hCtx); - DestroyWindow(parent_wnd); - return; - } - else - DestroyWindow(hwnd); - test_hittest_v6(); test_get_set_border(); test_MCM_SIZERECTTOMIN(); diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index 3c437de..b784140 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -1972,7 +1972,6 @@ START_TEST(treeview)
ULONG_PTR ctx_cookie; HANDLE hCtx; - HWND hwnd;
hComctl32 = GetModuleHandleA("comctl32.dll"); pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); @@ -2044,21 +2043,6 @@ START_TEST(treeview) return; }
- /* this is a XP SP3 failure workaround */ - hwnd = CreateWindowExA(0, WC_TREEVIEW, "foo", - WS_CHILD | WS_BORDER | WS_VISIBLE, - 0, 0, 100, 100, - hMainWnd, NULL, GetModuleHandleA(NULL), NULL); - if (!IsWindow(hwnd)) - { - win_skip("FIXME: failed to create TreeView window.\n"); - unload_v6_module(ctx_cookie, hCtx); - DestroyWindow(hMainWnd); - return; - } - else - DestroyWindow(hwnd); - /* comctl32 version 6 tests start here */ test_expandedimage(); test_htreeitem_layout(); diff --git a/dlls/comctl32/tests/v6util.h b/dlls/comctl32/tests/v6util.h index 848e95b..1300598 100644 --- a/dlls/comctl32/tests/v6util.h +++ b/dlls/comctl32/tests/v6util.h @@ -82,6 +82,9 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx) HANDLE hKernel32; HANDLE (WINAPI *pCreateActCtxA)(ACTCTXA*); BOOL (WINAPI *pActivateActCtx)(HANDLE, ULONG_PTR*); + BOOL (WINAPI *pFindActCtxSectionStringA)(DWORD,const GUID *,ULONG,LPCSTR,PACTCTX_SECTION_KEYED_DATA); + + ACTCTX_SECTION_KEYED_DATA data;
ACTCTXA ctx; BOOL ret; @@ -91,6 +94,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx) hKernel32 = GetModuleHandleA("kernel32.dll"); pCreateActCtxA = (void*)GetProcAddress(hKernel32, "CreateActCtxA"); pActivateActCtx = (void*)GetProcAddress(hKernel32, "ActivateActCtx"); + pFindActCtxSectionStringA = (void*)GetProcAddress(hKernel32, "FindActCtxSectionStringA"); if (!(pCreateActCtxA && pActivateActCtx)) { win_skip("Activation contexts unsupported. No version 6 tests possible.\n"); @@ -135,6 +139,13 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx) DeleteFileA(manifest_name); }
+ data.cbSize = sizeof(data); + ret = pFindActCtxSectionStringA(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, + "comctl32.dll", &data); + ok(ret, "failed to find comctl32.dll in active context, %u\n", GetLastError()); + if (ret) + LoadLibraryA("comctl32.dll"); + return ret; }