Nikolay Sivov : user32/tests: Some tests for SetScrollInfo().
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Nov 23 09:59:45 CST 2015
Module: wine
Branch: master
Commit: 119d97e8d7220fda9046d29c9305ea150686101a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=119d97e8d7220fda9046d29c9305ea150686101a
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Nov 22 00:21:03 2015 +0300
user32/tests: Some tests for SetScrollInfo().
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/tests/scroll.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/dlls/user32/tests/scroll.c b/dlls/user32/tests/scroll.c
index 22a5cb2..691855b 100644
--- a/dlls/user32/tests/scroll.c
+++ b/dlls/user32/tests/scroll.c
@@ -525,6 +525,49 @@ static void scrollbar_test_init(void)
UnregisterClassA(cls_name, wc.hInstance);
}
+static void test_SetScrollInfo(void)
+{
+ SCROLLINFO si;
+ HWND mainwnd;
+ BOOL ret;
+
+ mainwnd = create_main_test_wnd();
+
+ ret = IsWindowEnabled(hScroll);
+ ok(ret, "scroll bar disabled\n");
+
+ EnableScrollBar(hScroll, SB_CTL, ESB_DISABLE_BOTH);
+
+ ret = IsWindowEnabled(hScroll);
+ ok(!ret, "scroll bar disabled\n");
+
+ memset(&si, 0, sizeof(si));
+ si.cbSize = sizeof(si);
+ si.fMask = 0xf;
+ ret = GetScrollInfo(hScroll, SB_CTL, &si);
+ ok(ret, "got %d\n", ret);
+
+ /* SetScrollInfo */
+ memset(&si, 0, sizeof(si));
+ si.cbSize = sizeof(si);
+ ret = IsWindowEnabled(hScroll);
+ ok(!ret, "scroll bar disabled\n");
+ si.fMask = SIF_POS|SIF_RANGE|SIF_PAGE|SIF_DISABLENOSCROLL;
+ si.nMax = 100;
+ si.nPos = 0;
+ si.nPage = 100;
+ SetScrollInfo(hScroll, SB_CTL, &si, TRUE);
+ ret = IsWindowEnabled(hScroll);
+ ok(!ret, "scroll bar enabled\n");
+
+ si.fMask = 0xf;
+ ret = GetScrollInfo(hScroll, SB_CTL, &si);
+ ok(ret, "got %d\n", ret);
+
+ DestroyWindow(hScroll);
+ DestroyWindow(mainwnd);
+}
+
START_TEST ( scroll )
{
WNDCLASSA wc;
@@ -548,6 +591,7 @@ START_TEST ( scroll )
test_ShowScrollBar();
test_GetScrollBarInfo();
scrollbar_test_track();
+ test_SetScrollInfo();
/* Some test results vary depending of theming being active or not */
hUxtheme = LoadLibraryA("uxtheme.dll");
More information about the wine-cvs
mailing list