Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
059c70d7
Commit
059c70d7
authored
Jul 25, 2022
by
Santino Mazza
Committed by
Alexandre Julliard
Jul 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20/test: Add scrolling test for richole.
Signed-off-by:
Santino Mazza
<
mazzasantino1206@gmail.com
>
parent
25209c16
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
richole.c
dlls/riched20/tests/richole.c
+25
-0
No files found.
dlls/riched20/tests/richole.c
View file @
059c70d7
...
...
@@ -3579,13 +3579,25 @@ static void test_ITextRange_IsEqual(void)
ITextSelection_Release
(
selection
);
}
static
int
get_scroll_pos_y
(
HWND
hwnd
)
{
POINT
p
=
{
-
1
,
-
1
};
SendMessageA
(
hwnd
,
EM_GETSCROLLPOS
,
0
,
(
LPARAM
)
&
p
);
ok
(
p
.
x
!=
-
1
&&
p
.
y
!=
-
1
,
"p.x:%ld p.y:%ld
\n
"
,
p
.
x
,
p
.
y
);
return
p
.
y
;
}
static
void
test_Select
(
void
)
{
static
const
CHAR
test_text1
[]
=
"TestSomeText"
;
static
const
CHAR
test_text2
[]
=
"text
\n
with
\n
break
\n
"
"lines
\n
test
\n
test
\n
"
;
IRichEditOle
*
reOle
=
NULL
;
ITextDocument
*
doc
=
NULL
;
ITextSelection
*
selection
;
ITextRange
*
range
;
int
scroll_pos1
;
int
scroll_pos2
;
LONG
value
;
HRESULT
hr
;
HWND
hwnd
;
...
...
@@ -3597,8 +3609,11 @@ static void test_Select(void)
hr
=
ITextDocument_Range
(
doc
,
0
,
4
,
&
range
);
ok
(
hr
==
S_OK
,
"got 0x%08lx
\n
"
,
hr
);
scroll_pos1
=
get_scroll_pos_y
(
hwnd
);
hr
=
ITextRange_Select
(
range
);
ok
(
hr
==
S_OK
,
"got 0x%08lx
\n
"
,
hr
);
scroll_pos2
=
get_scroll_pos_y
(
hwnd
);
ok
(
scroll_pos1
==
scroll_pos2
,
"%d != %d
\n
"
,
scroll_pos1
,
scroll_pos2
);
value
=
1
;
hr
=
ITextSelection_GetStart
(
selection
,
&
value
);
...
...
@@ -3611,6 +3626,16 @@ static void test_Select(void)
hr
=
ITextSelection_Select
(
selection
);
ok
(
hr
==
S_OK
,
"got 0x%08lx
\n
"
,
hr
);
SendMessageA
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
test_text2
);
SendMessageA
(
hwnd
,
EM_SETSEL
,
1
,
2
);
hr
=
ITextDocument_Range
(
doc
,
10
,
16
,
&
range
);
ok
(
hr
==
S_OK
,
"got 0x%08lx
\n
"
,
hr
);
scroll_pos1
=
get_scroll_pos_y
(
hwnd
);
hr
=
ITextRange_Select
(
range
);
ok
(
hr
==
S_OK
,
"got 0x%08lx
\n
"
,
hr
);
scroll_pos2
=
get_scroll_pos_y
(
hwnd
);
ok
(
scroll_pos1
!=
scroll_pos2
,
"%d == %d
\n
"
,
scroll_pos1
,
scroll_pos2
);
release_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
hr
=
ITextRange_Select
(
range
);
...
...
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