Santino Mazza : riched20/tests: When selection is out of view, the scrollbar should move.
Alexandre Julliard
julliard at winehq.org
Thu Jul 28 16:00:04 CDT 2022
Module: wine
Branch: master
Commit: ee131e9eba7dad090f0baf4a73fab2d62dc73b52
URL: https://gitlab.winehq.org/wine/wine/-/commit/ee131e9eba7dad090f0baf4a73fab2d62dc73b52
Author: Santino Mazza <mazzasantino1206 at gmail.com>
Date: Tue Jul 19 14:11:27 2022 -0300
riched20/tests: When selection is out of view, the scrollbar should move.
Signed-off-by: Santino Mazza <mazzasantino1206 at gmail.com>
---
dlls/riched20/tests/editor.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index 03c07829ee4..2667e7d3fdc 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -5018,6 +5018,24 @@ static void check_EM_SETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id)
id, setsel->expected_getsel_start, setsel->expected_getsel_end, start, end);
}
+/* When the selection is out of the windows view, the scrollbar should move. */
+static void check_EM_SETSEL_multiline(HWND hwnd)
+{
+ int oldY;
+ int curY;
+ const char textwithlines[] = "This is a text\n"
+ "with lines\n"
+ "I expect this text\n"
+ "to be\nlarge\nenough\n";
+
+ SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)textwithlines);
+ oldY = get_scroll_pos_y(hwnd);
+ SendMessageA(hwnd, EM_SETSEL, 59, 59);
+ curY = get_scroll_pos_y(hwnd);
+ todo_wine
+ ok(oldY < curY, "oldY %d >= curY %d\n", oldY, curY);
+}
+
static void test_EM_SETSEL(void)
{
char buffA[32] = {0};
@@ -5058,6 +5076,8 @@ static void test_EM_SETSEL(void)
ok(sel_end == 8, "Selection end incorrectly: %d expected 8\n", sel_end);
}
+ check_EM_SETSEL_multiline(hwndRichEdit);
+
DestroyWindow(hwndRichEdit);
}
More information about the wine-cvs
mailing list