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
3de83dcb
Commit
3de83dcb
authored
Sep 04, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add more tests for GetUpdateRect.
parent
23dc9a38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
6 deletions
+44
-6
win.c
dlls/user32/tests/win.c
+44
-6
No files found.
dlls/user32/tests/win.c
View file @
3de83dcb
...
...
@@ -4211,10 +4211,12 @@ static void test_gettext(void)
static
void
test_GetUpdateRect
(
void
)
{
MSG
msg
;
BOOL
ret
,
parent_wm_paint
,
grandparent_wm_paint
;
RECT
rc1
,
rc2
;
HWND
hgrandparent
,
hparent
,
hchild
;
WNDCLASSA
cls
;
const
char
*
classNameA
=
"GetUpdateRectClass"
;
static
const
char
classNameA
[]
=
"GetUpdateRectClass"
;
hgrandparent
=
CreateWindowA
(
"static"
,
"grandparent"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
100
,
100
,
NULL
,
NULL
,
0
,
NULL
);
...
...
@@ -4230,17 +4232,33 @@ static void test_GetUpdateRect(void)
ShowWindow
(
hchild
,
SW_HIDE
);
SetRect
(
&
rc2
,
0
,
0
,
0
,
0
);
GetUpdateRect
(
hgrandparent
,
&
rc1
,
FALSE
);
ret
=
GetUpdateRect
(
hgrandparent
,
&
rc1
,
FALSE
);
ok
(
!
ret
,
"GetUpdateRect returned not empty region
\n
"
);
ok
(
EqualRect
(
&
rc1
,
&
rc2
),
"rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)
\n
"
,
rc1
.
left
,
rc1
.
top
,
rc1
.
right
,
rc1
.
bottom
,
rc2
.
left
,
rc2
.
top
,
rc2
.
right
,
rc2
.
bottom
);
SetRect
(
&
rc2
,
10
,
10
,
40
,
40
);
GetUpdateRect
(
hparent
,
&
rc1
,
FALSE
);
ret
=
GetUpdateRect
(
hparent
,
&
rc1
,
FALSE
);
ok
(
ret
,
"GetUpdateRect returned empty region
\n
"
);
ok
(
EqualRect
(
&
rc1
,
&
rc2
),
"rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)
\n
"
,
rc1
.
left
,
rc1
.
top
,
rc1
.
right
,
rc1
.
bottom
,
rc2
.
left
,
rc2
.
top
,
rc2
.
right
,
rc2
.
bottom
);
parent_wm_paint
=
FALSE
;
grandparent_wm_paint
=
FALSE
;
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
{
if
(
msg
.
message
==
WM_PAINT
)
{
if
(
msg
.
hwnd
==
hgrandparent
)
grandparent_wm_paint
=
TRUE
;
if
(
msg
.
hwnd
==
hparent
)
parent_wm_paint
=
TRUE
;
}
DispatchMessage
(
&
msg
);
}
ok
(
parent_wm_paint
,
"WM_PAINT should have been recieved in parent
\n
"
);
ok
(
!
grandparent_wm_paint
,
"WM_PAINT should NOT have been recieved in grandparent
\n
"
);
DestroyWindow
(
hgrandparent
);
cls
.
style
=
0
;
...
...
@@ -4259,7 +4277,7 @@ static void test_GetUpdateRect(void)
return
;
}
hgrandparent
=
CreateWindowA
(
"static"
,
"grandparent"
,
WS_OVERLAPPEDWINDOW
,
hgrandparent
=
CreateWindowA
(
classNameA
,
"grandparent"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
100
,
100
,
NULL
,
NULL
,
0
,
NULL
);
hparent
=
CreateWindowA
(
classNameA
,
"parent"
,
WS_CHILD
|
WS_VISIBLE
,
...
...
@@ -4271,19 +4289,39 @@ static void test_GetUpdateRect(void)
ShowWindow
(
hgrandparent
,
SW_SHOW
);
UpdateWindow
(
hgrandparent
);
ret
=
GetUpdateRect
(
hgrandparent
,
&
rc1
,
FALSE
);
ok
(
!
ret
,
"GetUpdateRect returned not empty region
\n
"
);
ShowWindow
(
hchild
,
SW_HIDE
);
SetRect
(
&
rc2
,
0
,
0
,
0
,
0
);
GetUpdateRect
(
hgrandparent
,
&
rc1
,
FALSE
);
ret
=
GetUpdateRect
(
hgrandparent
,
&
rc1
,
FALSE
);
ok
(
!
ret
,
"GetUpdateRect returned not empty region
\n
"
);
ok
(
EqualRect
(
&
rc1
,
&
rc2
),
"rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)
\n
"
,
rc1
.
left
,
rc1
.
top
,
rc1
.
right
,
rc1
.
bottom
,
rc2
.
left
,
rc2
.
top
,
rc2
.
right
,
rc2
.
bottom
);
SetRect
(
&
rc2
,
10
,
10
,
40
,
40
);
GetUpdateRect
(
hparent
,
&
rc1
,
FALSE
);
ret
=
GetUpdateRect
(
hparent
,
&
rc1
,
FALSE
);
ok
(
ret
,
"GetUpdateRect returned empty region
\n
"
);
ok
(
EqualRect
(
&
rc1
,
&
rc2
),
"rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)
\n
"
,
rc1
.
left
,
rc1
.
top
,
rc1
.
right
,
rc1
.
bottom
,
rc2
.
left
,
rc2
.
top
,
rc2
.
right
,
rc2
.
bottom
);
parent_wm_paint
=
FALSE
;
grandparent_wm_paint
=
FALSE
;
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
{
if
(
msg
.
message
==
WM_PAINT
)
{
if
(
msg
.
hwnd
==
hgrandparent
)
grandparent_wm_paint
=
TRUE
;
if
(
msg
.
hwnd
==
hparent
)
parent_wm_paint
=
TRUE
;
}
DispatchMessage
(
&
msg
);
}
ok
(
parent_wm_paint
,
"WM_PAINT should have been recieved in parent
\n
"
);
ok
(
!
grandparent_wm_paint
,
"WM_PAINT should NOT have been recieved in grandparent
\n
"
);
DestroyWindow
(
hgrandparent
);
}
...
...
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