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
43e1df02
Commit
43e1df02
authored
Oct 08, 2013
by
Qian Hong
Committed by
Alexandre Julliard
Oct 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Added input desktop tests on different winstations.
parent
834ce9a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
winstation.c
dlls/user32/tests/winstation.c
+66
-0
No files found.
dlls/user32/tests/winstation.c
View file @
43e1df02
...
...
@@ -652,6 +652,71 @@ todo_wine
ok
(
ret
,
"CloseDesktop failed!
\n
"
);
}
static
void
test_inputdesktop2
(
void
)
{
HWINSTA
w1
,
w2
;
HDESK
thread_desk
,
new_desk
,
input_desk
,
hdesk
;
DWORD
ret
;
thread_desk
=
GetThreadDesktop
(
GetCurrentThreadId
());
ok
(
thread_desk
!=
NULL
,
"GetThreadDesktop failed!
\n
"
);
w1
=
GetProcessWindowStation
();
ok
(
w1
!=
NULL
,
"GetProcessWindowStation failed!
\n
"
);
w2
=
CreateWindowStation
(
"winsta_test"
,
0
,
WINSTA_ALL_ACCESS
,
NULL
);
ok
(
w2
!=
NULL
,
"CreateWindowStation failed!
\n
"
);
ret
=
EnumDesktopsA
(
GetProcessWindowStation
(),
desktop_callbackA
,
0
);
ok
(
!
ret
,
"EnumDesktopsA failed!
\n
"
);
input_desk
=
OpenInputDesktop
(
0
,
FALSE
,
DESKTOP_ALL_ACCESS
);
todo_wine
ok
(
input_desk
!=
NULL
,
"OpenInputDesktop failed!
\n
"
);
ret
=
CloseDesktop
(
input_desk
);
todo_wine
ok
(
ret
,
"CloseDesktop failed!
\n
"
);
ret
=
SetProcessWindowStation
(
w2
);
ok
(
ret
,
"SetProcessWindowStation failed!
\n
"
);
hdesk
=
GetThreadDesktop
(
GetCurrentThreadId
());
ok
(
hdesk
!=
NULL
,
"GetThreadDesktop failed!
\n
"
);
ok
(
hdesk
==
thread_desk
,
"thread desktop should not change after winstation changed!
\n
"
);
ret
=
EnumDesktopsA
(
GetProcessWindowStation
(),
desktop_callbackA
,
0
);
new_desk
=
CreateDesktop
(
"desk_test"
,
NULL
,
NULL
,
0
,
DESKTOP_ALL_ACCESS
,
NULL
);
ok
(
new_desk
!=
NULL
,
"CreateDesktop failed!
\n
"
);
ret
=
EnumDesktopsA
(
GetProcessWindowStation
(),
desktop_callbackA
,
0
);
ok
(
!
ret
,
"EnumDesktopsA failed!
\n
"
);
SetLastError
(
0xdeadbeef
);
input_desk
=
OpenInputDesktop
(
0
,
FALSE
,
DESKTOP_ALL_ACCESS
);
ok
(
input_desk
==
NULL
,
"OpenInputDesktop should fail on non default winstation!
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_FUNCTION
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"last error %08x
\n
"
,
GetLastError
());
hdesk
=
OpenDesktop
(
"desk_test"
,
0
,
TRUE
,
DESKTOP_ALL_ACCESS
);
ok
(
hdesk
!=
NULL
,
"OpenDesktop failed!
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
SwitchDesktop
(
hdesk
);
todo_wine
ok
(
!
ret
,
"Switch to desktop belong to non default winstation should fail!
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"last error %08x
\n
"
,
GetLastError
());
ret
=
SetThreadDesktop
(
hdesk
);
ok
(
ret
,
"SetThreadDesktop failed!
\n
"
);
/* clean side effect */
ret
=
SetThreadDesktop
(
thread_desk
);
todo_wine
ok
(
ret
,
"SetThreadDesktop should success even desktop is not belong to process winstation!
\n
"
);
ret
=
SetProcessWindowStation
(
w1
);
ok
(
ret
,
"SetProcessWindowStation failed!
\n
"
);
ret
=
SetThreadDesktop
(
thread_desk
);
ok
(
ret
,
"SetThreadDesktop failed!
\n
"
);
ret
=
CloseWindowStation
(
w2
);
ok
(
ret
,
"CloseWindowStation failed!
\n
"
);
ret
=
CloseDesktop
(
new_desk
);
ok
(
ret
,
"CloseDesktop failed!
\n
"
);
ret
=
CloseDesktop
(
hdesk
);
ok
(
ret
,
"CloseDesktop failed!
\n
"
);
}
START_TEST
(
winstation
)
{
/* Check whether this platform supports WindowStation calls */
...
...
@@ -665,6 +730,7 @@ START_TEST(winstation)
}
test_inputdesktop
();
test_inputdesktop2
();
test_enumstations
();
test_enumdesktops
();
test_handles
();
...
...
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