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
47871f69
Commit
47871f69
authored
Jul 19, 2008
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Jul 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: More tests for visibility behavior of richedit scrollbars, with todo_wine.
Alternate method of forcing (in)visibility of scrollbars, with SetWindowLongA().
parent
86e9e072
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
232 additions
and
0 deletions
+232
-0
editor.c
dlls/riched20/tests/editor.c
+232
-0
No files found.
dlls/riched20/tests/editor.c
View file @
47871f69
...
...
@@ -2697,6 +2697,238 @@ static void test_scrollbar_visibility(void)
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
DestroyWindow
(
hwndRichEdit
);
/* Test behavior with explicit visibility request, using SetWindowLong()() */
hwndRichEdit
=
new_richedit
(
NULL
);
#define ENABLE_WS_VSCROLL(hwnd) \
SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) | WS_VSCROLL)
#define DISABLE_WS_VSCROLL(hwnd) \
SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) & ~WS_VSCROLL)
/* Previously failed because builtin incorrectly re-hides scrollbar forced visible */
ENABLE_WS_VSCROLL
(
hwndRichEdit
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
!=
0
),
"Vertical scrollbar is invisible, should be visible.
\n
"
);
todo_wine
{
ok
(
si
.
nPage
==
0
&&
si
.
nMin
==
0
&&
si
.
nMax
==
0
,
"reported page/range is %d (%d..%d) expected all 0
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
}
/* Ditto, see above */
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
0
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
!=
0
),
"Vertical scrollbar is invisible, should be visible.
\n
"
);
todo_wine
{
ok
(
si
.
nPage
==
0
&&
si
.
nMin
==
0
&&
si
.
nMax
==
0
,
"reported page/range is %d (%d..%d) expected all 0
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
}
/* Ditto, see above */
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"a"
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
todo_wine
{
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
!=
0
),
"Vertical scrollbar is invisible, should be visible.
\n
"
);
ok
(
si
.
nPage
==
0
&&
si
.
nMin
==
0
&&
si
.
nMax
==
0
,
"reported page/range is %d (%d..%d) expected all 0
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
}
/* Ditto, see above */
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"a
\n
a"
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
todo_wine
{
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
!=
0
),
"Vertical scrollbar is invisible, should be visible.
\n
"
);
ok
(
si
.
nPage
==
0
&&
si
.
nMin
==
0
&&
si
.
nMax
==
0
,
"reported page/range is %d (%d..%d) expected all 0
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
}
/* Ditto, see above */
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
0
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
todo_wine
{
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
!=
0
),
"Vertical scrollbar is invisible, should be visible.
\n
"
);
ok
(
si
.
nPage
==
0
&&
si
.
nMin
==
0
&&
si
.
nMax
==
0
,
"reported page/range is %d (%d..%d) expected all 0
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
}
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
text
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
0
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
==
0
),
"Vertical scrollbar is visible, should be invisible.
\n
"
);
ok
(
si
.
nPage
!=
0
&&
si
.
nMin
==
0
&&
si
.
nMax
!=
0
,
"reported page/range is %d (%d..%d) expected nMax/nPage nonzero
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
DestroyWindow
(
hwndRichEdit
);
hwndRichEdit
=
new_richedit
(
NULL
);
DISABLE_WS_VSCROLL
(
hwndRichEdit
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
==
0
),
"Vertical scrollbar is visible, should be invisible.
\n
"
);
todo_wine
{
ok
(
si
.
nPage
==
0
&&
si
.
nMin
==
0
&&
si
.
nMax
==
0
,
"reported page/range is %d (%d..%d) expected all 0
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
}
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
0
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
==
0
),
"Vertical scrollbar is visible, should be invisible.
\n
"
);
todo_wine
{
ok
(
si
.
nPage
==
0
&&
si
.
nMin
==
0
&&
si
.
nMax
==
0
,
"reported page/range is %d (%d..%d) expected all 0
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
}
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"a"
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
==
0
),
"Vertical scrollbar is visible, should be invisible.
\n
"
);
todo_wine
{
ok
(
si
.
nPage
==
0
&&
si
.
nMin
==
0
&&
si
.
nMax
==
0
,
"reported page/range is %d (%d..%d) expected all 0
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
}
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
0
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
==
0
),
"Vertical scrollbar is visible, should be invisible.
\n
"
);
todo_wine
{
ok
(
si
.
nPage
==
0
&&
si
.
nMin
==
0
&&
si
.
nMax
==
0
,
"reported page/range is %d (%d..%d) expected all 0
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
}
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
text
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
!=
0
),
"Vertical scrollbar is invisible, should be visible.
\n
"
);
ok
(
si
.
nPage
!=
0
&&
si
.
nMin
==
0
&&
si
.
nMax
!=
0
,
"reported page/range is %d (%d..%d)
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
/* Previously, builtin incorrectly re-shows explicitly hidden scrollbar */
DISABLE_WS_VSCROLL
(
hwndRichEdit
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
==
0
),
"Vertical scrollbar is visible, should be invisible.
\n
"
);
ok
(
si
.
nPage
!=
0
&&
si
.
nMin
==
0
&&
si
.
nMax
!=
0
,
"reported page/range is %d (%d..%d)
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
0
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
==
0
),
"Vertical scrollbar is visible, should be invisible.
\n
"
);
ok
(
si
.
nPage
!=
0
&&
si
.
nMin
==
0
&&
si
.
nMax
!=
0
,
"reported page/range is %d (%d..%d) expected nMax/nPage nonzero
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
text
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
!=
0
),
"Vertical scrollbar is invisible, should be visible.
\n
"
);
ok
(
si
.
nPage
!=
0
&&
si
.
nMin
==
0
&&
si
.
nMax
!=
0
,
"reported page/range is %d (%d..%d)
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
DISABLE_WS_VSCROLL
(
hwndRichEdit
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
==
0
),
"Vertical scrollbar is visible, should be invisible.
\n
"
);
ok
(
si
.
nPage
!=
0
&&
si
.
nMin
==
0
&&
si
.
nMax
!=
0
,
"reported page/range is %d (%d..%d)
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
/* Testing effect of EM_SCROLL on scrollbar visibility. It seems that
EM_SCROLL will make visible any forcefully invisible scrollbar */
SendMessage
(
hwndRichEdit
,
EM_SCROLL
,
SB_LINEDOWN
,
0
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
!=
0
),
"Vertical scrollbar is invisible, should be visible.
\n
"
);
ok
(
si
.
nPage
!=
0
&&
si
.
nMin
==
0
&&
si
.
nMax
!=
0
,
"reported page/range is %d (%d..%d)
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
DISABLE_WS_VSCROLL
(
hwndRichEdit
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
==
0
),
"Vertical scrollbar is visible, should be invisible.
\n
"
);
ok
(
si
.
nPage
!=
0
&&
si
.
nMin
==
0
&&
si
.
nMax
!=
0
,
"reported page/range is %d (%d..%d)
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
/* Again, EM_SCROLL, with SB_LINEUP */
SendMessage
(
hwndRichEdit
,
EM_SCROLL
,
SB_LINEUP
,
0
);
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cbSize
=
sizeof
(
si
);
si
.
fMask
=
SIF_PAGE
|
SIF_RANGE
;
GetScrollInfo
(
hwndRichEdit
,
SB_VERT
,
&
si
);
ok
(((
GetWindowLongA
(
hwndRichEdit
,
GWL_STYLE
)
&
WS_VSCROLL
)
!=
0
),
"Vertical scrollbar is invisible, should be visible.
\n
"
);
ok
(
si
.
nPage
!=
0
&&
si
.
nMin
==
0
&&
si
.
nMax
!=
0
,
"reported page/range is %d (%d..%d)
\n
"
,
si
.
nPage
,
si
.
nMin
,
si
.
nMax
);
DestroyWindow
(
hwndRichEdit
);
}
static
void
test_EM_SETUNDOLIMIT
(
void
)
...
...
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