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
c1736fed
Commit
c1736fed
authored
Jan 12, 2011
by
Greg Geldorp
Committed by
Alexandre Julliard
Jan 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Skip tests if not running in the foreground.
parent
33a5cdbf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
device.c
dlls/d3d8/tests/device.c
+12
-0
No files found.
dlls/d3d8/tests/device.c
View file @
c1736fed
...
@@ -1541,6 +1541,7 @@ struct wndproc_thread_param
...
@@ -1541,6 +1541,7 @@ struct wndproc_thread_param
HWND
dummy_window
;
HWND
dummy_window
;
HANDLE
window_created
;
HANDLE
window_created
;
HANDLE
test_finished
;
HANDLE
test_finished
;
BOOL
running_in_foreground
;
};
};
static
LRESULT
CALLBACK
test_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wparam
,
LPARAM
lparam
)
static
LRESULT
CALLBACK
test_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wparam
,
LPARAM
lparam
)
...
@@ -1584,6 +1585,7 @@ static DWORD WINAPI wndproc_thread(void *param)
...
@@ -1584,6 +1585,7 @@ static DWORD WINAPI wndproc_thread(void *param)
p
->
dummy_window
=
CreateWindowA
(
"d3d8_test_wndproc_wc"
,
"d3d8_test"
,
p
->
dummy_window
=
CreateWindowA
(
"d3d8_test_wndproc_wc"
,
"d3d8_test"
,
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
p
->
running_in_foreground
=
SetForegroundWindow
(
p
->
dummy_window
);
ret
=
SetEvent
(
p
->
window_created
);
ret
=
SetEvent
(
p
->
window_created
);
ok
(
ret
,
"SetEvent failed, last error %#x.
\n
"
,
GetLastError
());
ok
(
ret
,
"SetEvent failed, last error %#x.
\n
"
,
GetLastError
());
...
@@ -1667,9 +1669,14 @@ static void test_wndproc(void)
...
@@ -1667,9 +1669,14 @@ static void test_wndproc(void)
tmp
=
GetFocus
();
tmp
=
GetFocus
();
ok
(
tmp
==
device_window
,
"Expected focus %p, got %p.
\n
"
,
device_window
,
tmp
);
ok
(
tmp
==
device_window
,
"Expected focus %p, got %p.
\n
"
,
device_window
,
tmp
);
if
(
thread_params
.
running_in_foreground
)
{
tmp
=
GetForegroundWindow
();
tmp
=
GetForegroundWindow
();
ok
(
tmp
==
thread_params
.
dummy_window
,
"Expected foreground window %p, got %p.
\n
"
,
ok
(
tmp
==
thread_params
.
dummy_window
,
"Expected foreground window %p, got %p.
\n
"
,
thread_params
.
dummy_window
,
tmp
);
thread_params
.
dummy_window
,
tmp
);
}
else
skip
(
"Not running in foreground, skip foreground window test
\n
"
);
flush_events
();
flush_events
();
...
@@ -1806,9 +1813,14 @@ static void test_wndproc_windowed(void)
...
@@ -1806,9 +1813,14 @@ static void test_wndproc_windowed(void)
tmp
=
GetFocus
();
tmp
=
GetFocus
();
ok
(
tmp
==
device_window
,
"Expected focus %p, got %p.
\n
"
,
device_window
,
tmp
);
ok
(
tmp
==
device_window
,
"Expected focus %p, got %p.
\n
"
,
device_window
,
tmp
);
if
(
thread_params
.
running_in_foreground
)
{
tmp
=
GetForegroundWindow
();
tmp
=
GetForegroundWindow
();
ok
(
tmp
==
thread_params
.
dummy_window
,
"Expected foreground window %p, got %p.
\n
"
,
ok
(
tmp
==
thread_params
.
dummy_window
,
"Expected foreground window %p, got %p.
\n
"
,
thread_params
.
dummy_window
,
tmp
);
thread_params
.
dummy_window
,
tmp
);
}
else
skip
(
"Not running in foreground, skip foreground window test
\n
"
);
filter_messages
=
focus_window
;
filter_messages
=
focus_window
;
...
...
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