Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2271226b
Commit
2271226b
authored
Oct 17, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Oct 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Added test for auto scroll behaviour with redraw disabled.
parent
7f327237
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
editor.c
dlls/riched20/tests/editor.c
+32
-0
No files found.
dlls/riched20/tests/editor.c
View file @
2271226b
...
...
@@ -5537,6 +5537,37 @@ static void test_word_wrap(void)
DestroyWindow
(
hwnd
);
}
static
void
test_auto_yscroll
(
void
)
{
HWND
hwnd
=
new_richedit
(
NULL
);
int
lines
,
ret
,
redraw
;
POINT
pt
;
for
(
redraw
=
0
;
redraw
<=
1
;
redraw
++
)
{
trace
(
"testing with WM_SETREDRAW=%d
\n
"
,
redraw
);
SendMessage
(
hwnd
,
WM_SETREDRAW
,
redraw
,
0
);
SendMessage
(
hwnd
,
EM_REPLACESEL
,
0
,
(
LPARAM
)
"1
\n
2
\n
3
\n
4
\n
5
\n
6
\n
7
\n
8"
);
lines
=
SendMessage
(
hwnd
,
EM_GETLINECOUNT
,
0
,
0
);
ok
(
lines
==
8
,
"%d lines instead of 8
\n
"
,
lines
);
ret
=
SendMessage
(
hwnd
,
EM_GETSCROLLPOS
,
0
,
(
LPARAM
)
&
pt
);
ok
(
ret
==
1
,
"EM_GETSCROLLPOS returned %d instead of 1
\n
"
,
ret
);
if
(
!
redraw
)
todo_wine
ok
(
pt
.
y
!=
0
,
"Didn't scroll down after replacing text.
\n
"
);
else
ok
(
pt
.
y
!=
0
,
"Didn't scroll down after replacing text.
\n
"
);
SendMessage
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
NULL
);
lines
=
SendMessage
(
hwnd
,
EM_GETLINECOUNT
,
0
,
0
);
ok
(
lines
==
1
,
"%d lines instead of 1
\n
"
,
lines
);
ret
=
SendMessage
(
hwnd
,
EM_GETSCROLLPOS
,
0
,
(
LPARAM
)
&
pt
);
ok
(
ret
==
1
,
"EM_GETSCROLLPOS returned %d instead of 1
\n
"
,
ret
);
ok
(
pt
.
y
==
0
,
"y scroll position is %d after clearing text.
\n
"
,
pt
.
y
);
}
SendMessage
(
hwnd
,
WM_SETREDRAW
,
TRUE
,
0
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
editor
)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
...
...
@@ -5585,6 +5616,7 @@ START_TEST( editor )
test_EM_CHARFROMPOS
();
test_SETPARAFORMAT
();
test_word_wrap
();
test_auto_yscroll
();
/* Set the environment variable WINETEST_RICHED20 to keep windows
* responsive and open for 30 seconds. This is useful for debugging.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment