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
ffe9ace9
Commit
ffe9ace9
authored
Dec 23, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix some last error checks for WoW64.
parent
89c0b87f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
clipboard.c
dlls/user32/tests/clipboard.c
+4
-2
menu.c
dlls/user32/tests/menu.c
+3
-2
winstation.c
dlls/user32/tests/winstation.c
+10
-5
No files found.
dlls/user32/tests/clipboard.c
View file @
ffe9ace9
...
@@ -56,7 +56,8 @@ static void test_ClipboardOwner(void)
...
@@ -56,7 +56,8 @@ static void test_ClipboardOwner(void)
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ok
(
!
CloseClipboard
(),
"CloseClipboard should fail if clipboard wasn't open
\n
"
);
ok
(
!
CloseClipboard
(),
"CloseClipboard should fail if clipboard wasn't open
\n
"
);
test_last_error
(
ERROR_CLIPBOARD_NOT_OPEN
);
ok
(
GetLastError
()
==
ERROR_CLIPBOARD_NOT_OPEN
||
broken
(
GetLastError
()
==
0xdeadbeef
),
/* wow64 */
"wrong error %u
\n
"
,
GetLastError
());
ok
(
OpenClipboard
(
0
),
"OpenClipboard failed
\n
"
);
ok
(
OpenClipboard
(
0
),
"OpenClipboard failed
\n
"
);
ok
(
!
GetClipboardOwner
(),
"clipboard should still be not owned
\n
"
);
ok
(
!
GetClipboardOwner
(),
"clipboard should still be not owned
\n
"
);
...
@@ -188,7 +189,8 @@ todo_wine
...
@@ -188,7 +189,8 @@ todo_wine
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ok
(
!
EmptyClipboard
(),
"EmptyClipboard should fail if clipboard wasn't open
\n
"
);
ok
(
!
EmptyClipboard
(),
"EmptyClipboard should fail if clipboard wasn't open
\n
"
);
test_last_error
(
ERROR_CLIPBOARD_NOT_OPEN
);
ok
(
GetLastError
()
==
ERROR_CLIPBOARD_NOT_OPEN
||
broken
(
GetLastError
()
==
0xdeadbeef
),
/* wow64 */
"Wrong error %u
\n
"
,
GetLastError
());
}
}
static
HGLOBAL
create_text
(
void
)
static
HGLOBAL
create_text
(
void
)
...
...
dlls/user32/tests/menu.c
View file @
ffe9ace9
...
@@ -390,8 +390,9 @@ static void test_subpopup_locked_by_menu(void)
...
@@ -390,8 +390,9 @@ static void test_subpopup_locked_by_menu(void)
ok
(
ret
==
itemid
,
"TrackPopupMenu returned %d error is %d
\n
"
,
ret
,
gle
);
ok
(
ret
==
itemid
,
"TrackPopupMenu returned %d error is %d
\n
"
,
ret
,
gle
);
}
}
ok
(
gle
==
0
||
ok
(
gle
==
0
||
broken
(
gle
==
ERROR_INVALID_PARAMETER
),
/* win2k0 */
broken
(
gle
==
0xdeadbeef
)
||
/* wow64 */
"Last error is %d
\n
"
,
gle
);
broken
(
gle
==
ERROR_INVALID_PARAMETER
),
/* win2k0 */
"Last error is %d
\n
"
,
gle
);
}
}
/* clean up */
/* clean up */
DestroyMenu
(
hmenu
);
DestroyMenu
(
hmenu
);
...
...
dlls/user32/tests/winstation.c
View file @
ffe9ace9
...
@@ -76,7 +76,8 @@ static DWORD CALLBACK thread( LPVOID arg )
...
@@ -76,7 +76,8 @@ static DWORD CALLBACK thread( LPVOID arg )
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"bad last error %d
\n
"
,
GetLastError
()
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"bad last error %d
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ok
(
!
CloseDesktop
(
d1
),
"CloseDesktop succeeded
\n
"
);
ok
(
!
CloseDesktop
(
d1
),
"CloseDesktop succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_BUSY
,
"bad last error %d
\n
"
,
GetLastError
()
);
ok
(
GetLastError
()
==
ERROR_BUSY
||
broken
(
GetLastError
()
==
0xdeadbeef
),
/* wow64 */
"bad last error %d
\n
"
,
GetLastError
()
);
print_object
(
d1
);
print_object
(
d1
);
d2
=
CreateDesktop
(
"foobar2"
,
NULL
,
NULL
,
0
,
DESKTOP_ALL_ACCESS
,
NULL
);
d2
=
CreateDesktop
(
"foobar2"
,
NULL
,
NULL
,
0
,
DESKTOP_ALL_ACCESS
,
NULL
);
trace
(
"created desktop %p
\n
"
,
d2
);
trace
(
"created desktop %p
\n
"
,
d2
);
...
@@ -84,7 +85,8 @@ static DWORD CALLBACK thread( LPVOID arg )
...
@@ -84,7 +85,8 @@ static DWORD CALLBACK thread( LPVOID arg )
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ok
(
!
SetThreadDesktop
(
d2
),
"set thread desktop succeeded with existing window
\n
"
);
ok
(
!
SetThreadDesktop
(
d2
),
"set thread desktop succeeded with existing window
\n
"
);
ok
(
GetLastError
()
==
ERROR_BUSY
,
"bad last error %d
\n
"
,
GetLastError
()
);
ok
(
GetLastError
()
==
ERROR_BUSY
||
broken
(
GetLastError
()
==
0xdeadbeef
),
/* wow64 */
"bad last error %d
\n
"
,
GetLastError
()
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
ok
(
SetThreadDesktop
(
d2
),
"set thread desktop failed
\n
"
);
ok
(
SetThreadDesktop
(
d2
),
"set thread desktop failed
\n
"
);
...
@@ -139,7 +141,8 @@ static void test_handles(void)
...
@@ -139,7 +141,8 @@ static void test_handles(void)
ok
(
w2
!=
w1
,
"CreateWindowStation returned default handle
\n
"
);
ok
(
w2
!=
w1
,
"CreateWindowStation returned default handle
\n
"
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ok
(
!
CloseDesktop
(
(
HDESK
)
w2
),
"CloseDesktop succeeded on win station
\n
"
);
ok
(
!
CloseDesktop
(
(
HDESK
)
w2
),
"CloseDesktop succeeded on win station
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"bad last error %d
\n
"
,
GetLastError
()
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
||
broken
(
GetLastError
()
==
0xdeadbeef
),
/* wow64 */
"bad last error %d
\n
"
,
GetLastError
()
);
ok
(
CloseWindowStation
(
w2
),
"CloseWindowStation failed
\n
"
);
ok
(
CloseWindowStation
(
w2
),
"CloseWindowStation failed
\n
"
);
w2
=
CreateWindowStation
(
"WinSta0"
,
0
,
WINSTA_ALL_ACCESS
,
NULL
);
w2
=
CreateWindowStation
(
"WinSta0"
,
0
,
WINSTA_ALL_ACCESS
,
NULL
);
...
@@ -200,7 +203,8 @@ static void test_handles(void)
...
@@ -200,7 +203,8 @@ static void test_handles(void)
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ok
(
!
CloseDesktop
(
d1
),
"closing thread desktop succeeded
\n
"
);
ok
(
!
CloseDesktop
(
d1
),
"closing thread desktop succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_BUSY
,
"bad last error %d
\n
"
,
GetLastError
()
);
ok
(
GetLastError
()
==
ERROR_BUSY
||
broken
(
GetLastError
()
==
0xdeadbeef
),
/* wow64 */
"bad last error %d
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
if
(
CloseHandle
(
d1
))
/* succeeds on nt4 */
if
(
CloseHandle
(
d1
))
/* succeeds on nt4 */
...
@@ -225,7 +229,8 @@ static void test_handles(void)
...
@@ -225,7 +229,8 @@ static void test_handles(void)
ok
(
d2
!=
0
,
"create foobar desktop failed
\n
"
);
ok
(
d2
!=
0
,
"create foobar desktop failed
\n
"
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ok
(
!
CloseWindowStation
(
(
HWINSTA
)
d2
),
"CloseWindowStation succeeded on desktop
\n
"
);
ok
(
!
CloseWindowStation
(
(
HWINSTA
)
d2
),
"CloseWindowStation succeeded on desktop
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"bad last error %d
\n
"
,
GetLastError
()
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
||
broken
(
GetLastError
()
==
0xdeadbeef
),
/* wow64 */
"bad last error %d
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
d3
=
CreateDesktop
(
"foobar"
,
NULL
,
NULL
,
0
,
DESKTOP_ALL_ACCESS
,
NULL
);
d3
=
CreateDesktop
(
"foobar"
,
NULL
,
NULL
,
0
,
DESKTOP_ALL_ACCESS
,
NULL
);
...
...
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