Zhiyi Zhang : comctl32/tests: Remove pager skip check.
Alexandre Julliard
julliard at winehq.org
Mon Aug 27 16:18:13 CDT 2018
Module: wine
Branch: master
Commit: b200fac42d7bc4ac9da3d6056e60d50dc5efdf15
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b200fac42d7bc4ac9da3d6056e60d50dc5efdf15
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Fri Aug 24 22:04:20 2018 +0800
comctl32/tests: Remove pager skip check.
Pager should be available on all VMs(XP+) on TestBot.
So there's no need to check for the availability of
pager control. Add calling InitCommonControls() so that
pager control can be correctly initialized on XP.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/tests/pager.c | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c
index 0da396c..fa505dc 100644
--- a/dlls/comctl32/tests/pager.c
+++ b/dlls/comctl32/tests/pager.c
@@ -32,6 +32,7 @@ static HWND parent_wnd, child1_wnd, child2_wnd;
#define CHILD1_ID 1
#define CHILD2_ID 2
+static BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*);
static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
static struct msg_sequence *sequences[NUM_MSG_SEQUENCES];
@@ -257,11 +258,7 @@ static void test_pager(void)
RECT rect, rect2;
pager = create_pager_control( PGS_HORZ );
- if (!pager)
- {
- win_skip( "Pager control not supported\n" );
- return;
- }
+ ok(pager != NULL, "Fail to create pager\n");
register_child_wnd_class();
@@ -333,11 +330,26 @@ static void test_pager(void)
DestroyWindow( pager );
}
-START_TEST(pager)
+static void init_functions(void)
{
- HMODULE mod = GetModuleHandleA("comctl32.dll");
+ HMODULE mod = LoadLibraryA("comctl32.dll");
+
+#define X(f) p##f = (void*)GetProcAddress(mod, #f);
+ X(InitCommonControlsEx);
+#undef X
pSetWindowSubclass = (void*)GetProcAddress(mod, (LPSTR)410);
+}
+
+START_TEST(pager)
+{
+ INITCOMMONCONTROLSEX iccex;
+
+ init_functions();
+
+ iccex.dwSize = sizeof(iccex);
+ iccex.dwICC = ICC_PAGESCROLLER_CLASS;
+ pInitCommonControlsEx(&iccex);
init_msg_sequences(sequences, NUM_MSG_SEQUENCES);
@@ -345,4 +357,6 @@ START_TEST(pager)
ok(parent_wnd != NULL, "Failed to create parent window!\n");
test_pager();
+
+ DestroyWindow(parent_wnd);
}
More information about the wine-cvs
mailing list