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
3d133bec
Commit
3d133bec
authored
Mar 27, 2017
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add tests for EnableWindow().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5aaa77c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
win.c
dlls/user32/tests/win.c
+53
-0
No files found.
dlls/user32/tests/win.c
View file @
3d133bec
...
...
@@ -6554,6 +6554,58 @@ static void test_ShowWindow(void)
ok
(
!
IsWindow
(
hwnd
),
"window should not exist
\n
"
);
}
static
DWORD
CALLBACK
enablewindow_thread
(
LPVOID
arg
)
{
HWND
hwnd
=
arg
;
EnableWindow
(
hwnd
,
FALSE
);
return
0
;
}
static
void
test_EnableWindow
(
void
)
{
HWND
hwnd
;
HANDLE
hthread
;
DWORD
tid
;
MSG
msg
;
hwnd
=
CreateWindowExA
(
0
,
"MainWindowClass"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
100
,
100
,
0
,
0
,
0
,
NULL
);
assert
(
hwnd
);
ok
(
IsWindowEnabled
(
hwnd
),
"window should be enabled
\n
"
);
SetFocus
(
hwnd
);
SetCapture
(
hwnd
);
EnableWindow
(
hwnd
,
FALSE
);
check_wnd_state
(
hwnd
,
hwnd
,
0
,
0
);
ok
(
!
IsWindowEnabled
(
hwnd
),
"window should not be enabled
\n
"
);
SetFocus
(
hwnd
);
SetCapture
(
hwnd
);
check_wnd_state
(
hwnd
,
hwnd
,
0
,
hwnd
);
EnableWindow
(
hwnd
,
TRUE
);
SetFocus
(
hwnd
);
check_wnd_state
(
hwnd
,
hwnd
,
hwnd
,
hwnd
);
ok
(
IsWindowEnabled
(
hwnd
),
"window should be enabled
\n
"
);
/* test disabling from thread */
hthread
=
CreateThread
(
NULL
,
0
,
enablewindow_thread
,
hwnd
,
0
,
&
tid
);
while
(
MsgWaitForMultipleObjects
(
1
,
&
hthread
,
FALSE
,
INFINITE
,
QS_SENDMESSAGE
)
!=
WAIT_OBJECT_0
)
{
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
|
PM_QS_SENDMESSAGE
))
DispatchMessageA
(
&
msg
);
}
ok
(
!
IsWindowEnabled
(
hwnd
),
"window should not be enabled
\n
"
);
todo_wine
check_active_state
(
hwnd
,
hwnd
,
hwnd
);
ok
(
0
==
GetCapture
(),
"GetCapture() = %p
\n
"
,
GetCapture
());
CloseHandle
(
hthread
);
DestroyWindow
(
hwnd
);
}
static
DWORD
CALLBACK
gettext_msg_thread
(
LPVOID
arg
)
{
HWND
hwnd
=
arg
;
...
...
@@ -9778,6 +9830,7 @@ START_TEST(win)
test_SetWindowLong
();
test_set_window_style
();
test_ShowWindow
();
test_EnableWindow
();
test_gettext
();
test_GetUpdateRect
();
test_Expose
();
...
...
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