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
2d155031
Commit
2d155031
authored
Feb 13, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Skip tests if we fail to inject mouse or keyboard events.
parent
4fc6dbd8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
win.c
dlls/user32/tests/win.c
+17
-3
No files found.
dlls/user32/tests/win.c
View file @
2d155031
...
...
@@ -2657,7 +2657,12 @@ static void test_keyboard_input(HWND hwnd)
ok
(
GetFocus
()
==
hwnd
,
"wrong focus window %p
\n
"
,
GetFocus
());
keybd_event
(
VK_SPACE
,
0
,
0
,
0
);
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"no message available
\n
"
);
ret
=
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
);
if
(
!
ret
)
{
skip
(
"keybd_event didn't work, skipping keyboard test
\n
"
);
return
;
}
ok
(
msg
.
hwnd
==
hwnd
&&
msg
.
message
==
WM_KEYDOWN
,
"hwnd %p message %04x
\n
"
,
msg
.
hwnd
,
msg
.
message
);
ret
=
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
);
ok
(
!
ret
,
"message %04x available
\n
"
,
msg
.
message
);
...
...
@@ -2742,7 +2747,11 @@ static void test_mouse_input(HWND hwnd)
SetCursorPos
(
x
,
y
);
GetCursorPos
(
&
pt
);
ok
(
x
==
pt
.
x
&&
y
==
pt
.
y
,
"wrong cursor pos (%d,%d), expected (%d,%d)
\n
"
,
pt
.
x
,
pt
.
y
,
x
,
y
);
if
(
x
!=
pt
.
x
||
y
!=
pt
.
y
)
{
skip
(
"failed to set mouse position, skipping mouse input tests
\n
"
);
goto
done
;
}
flush_events
(
TRUE
);
...
...
@@ -2807,7 +2816,11 @@ static void test_mouse_input(HWND hwnd)
mouse_event
(
MOUSEEVENTF_LEFTUP
,
0
,
0
,
0
,
0
);
ret
=
wait_for_message
(
&
msg
);
ok
(
ret
,
"no message available
\n
"
);
if
(
!
ret
)
{
skip
(
"simulating mouse click doesn't work, skipping mouse button tests
\n
"
);
goto
done
;
}
if
(
msg
.
message
==
WM_MOUSEMOVE
)
/* win2k has an extra WM_MOUSEMOVE here */
{
ret
=
wait_for_message
(
&
msg
);
...
...
@@ -2895,6 +2908,7 @@ static void test_mouse_input(HWND hwnd)
TEST_MOUSEACTIVATE
(
HTCLOSE
,
MA_ACTIVATE
);
TEST_MOUSEACTIVATE
(
HTHELP
,
MA_ACTIVATE
);
done:
/* Clear any messages left behind by WM_MOUSEACTIVATE tests */
flush_events
(
TRUE
);
...
...
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