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
4a573392
Commit
4a573392
authored
Nov 11, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix window tests on various Windows versions.
parent
af601ff2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
win.c
dlls/user32/tests/win.c
+18
-9
No files found.
dlls/user32/tests/win.c
View file @
4a573392
...
...
@@ -963,12 +963,14 @@ static void test_shell_window(void)
DWORD
pid
;
HANDLE
hProcess
;
SetLastError
(
0xdeadbeef
);
ret
=
DestroyWindow
(
shellWindow
);
error
=
GetLastError
();
ok
(
!
ret
,
"DestroyWindow(shellWindow)
\n
"
);
/* passes on Win XP, but not on Win98 */
ok
(
error
==
ERROR_ACCESS_DENIED
,
"ERROR_ACCESS_DENIED after DestroyWindow(shellWindow)
\n
"
);
ok
(
error
==
ERROR_ACCESS_DENIED
||
error
==
0xdeadbeef
,
"got %u after DestroyWindow(shellWindow)
\n
"
,
error
);
/* close old shell instance */
GetWindowThreadProcessId
(
shellWindow
,
&
pid
);
...
...
@@ -2558,7 +2560,7 @@ static void test_keyboard_input(HWND hwnd)
BOOL
ret
;
flush_events
(
TRUE
);
S
howWindow
(
hwnd
,
SW_SH
OW
);
S
etWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_SHOWWIND
OW
);
UpdateWindow
(
hwnd
);
flush_events
(
TRUE
);
...
...
@@ -2680,13 +2682,17 @@ static void test_mouse_input(HWND hwnd)
mouse_event
(
MOUSEEVENTF_MOVE
,
-
1
,
-
1
,
0
,
0
);
ShowWindow
(
popup
,
SW_HIDE
);
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"no message available
\n
"
);
do
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"no message available
\n
"
);
while
(
msg
.
message
>=
0xc000
);
/* skip registered messages */
ok
(
msg
.
hwnd
==
hwnd
&&
msg
.
message
==
WM_MOUSEMOVE
,
"hwnd %p message %04x
\n
"
,
msg
.
hwnd
,
msg
.
message
);
flush_events
(
TRUE
);
mouse_event
(
MOUSEEVENTF_MOVE
,
1
,
1
,
0
,
0
);
ShowWindow
(
hwnd
,
SW_HIDE
);
ret
=
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
);
do
ret
=
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
);
while
(
ret
&&
msg
.
message
>=
0xc000
);
/* skip registered messages */
ok
(
!
ret
,
"message %04x available
\n
"
,
msg
.
message
);
flush_events
(
TRUE
);
...
...
@@ -2752,7 +2758,9 @@ static void test_mouse_input(HWND hwnd)
SendMessageA
(
hwnd
,
WM_COMMAND
,
(
WPARAM
)
popup
,
0
);
test_lbuttondown_flag
=
FALSE
;
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"no message available
\n
"
);
do
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"no message available
\n
"
);
while
(
msg
.
message
>=
0xc000
);
/* skip registered messages */
ok
(
msg
.
hwnd
==
popup
&&
msg
.
message
==
WM_LBUTTONDOWN
,
"hwnd %p/%p message %04x
\n
"
,
msg
.
hwnd
,
popup
,
msg
.
message
);
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"no message available
\n
"
);
...
...
@@ -4753,11 +4761,12 @@ static void test_GetWindowModuleFileName(void)
ok
(
!
ret1
,
"expected 0, got %u
\n
"
,
ret1
);
ok
(
GetLastError
()
==
ERROR_INVALID_WINDOW_HANDLE
,
"expected ERROR_INVALID_WINDOW_HANDLE, got %u
\n
"
,
GetLastError
());
ret1
=
GetModuleFileName
(
0
,
buf1
,
sizeof
(
buf1
));
hwnd
=
GetDesktopWindow
();
ok
(
IsWindow
(
hwnd
),
"got invalid desktop window %p
\n
"
,
hwnd
);
SetLastError
(
0xdeadbeef
);
ret
1
=
pGetWindowModuleFileNameA
(
hwnd
,
buf1
,
sizeof
(
buf1
));
ok
(
!
ret
1
,
"expected 0, got %u
\n
"
,
ret1
);
ret
2
=
pGetWindowModuleFileNameA
(
hwnd
,
buf2
,
sizeof
(
buf2
));
ok
(
!
ret
2
||
ret1
==
ret2
/* vista */
,
"expected 0, got %u
\n
"
,
ret2
);
hwnd
=
FindWindow
(
"Shell_TrayWnd"
,
NULL
);
ok
(
IsWindow
(
hwnd
),
"got invalid tray window %p
\n
"
,
hwnd
);
...
...
@@ -5151,7 +5160,6 @@ START_TEST(win)
test_SetMenu
(
hwndMain
);
test_SetFocus
(
hwndMain
);
test_SetActiveWindow
(
hwndMain
);
test_SetForegroundWindow
(
hwndMain
);
test_children_zorder
(
hwndMain
);
test_popup_zorder
(
hwndMain2
,
hwndMain
);
...
...
@@ -5171,11 +5179,12 @@ START_TEST(win)
test_csparentdc
();
test_SetWindowLong
();
test_ShowWindow
();
test_gettext
();
if
(
0
)
test_gettext
();
/* crashes on NT4 */
test_GetUpdateRect
();
test_Expose
();
test_layered_window
();
test_SetForegroundWindow
(
hwndMain
);
test_shell_window
();
/* add the tests above this line */
...
...
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