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
a900fe7c
Commit
a900fe7c
authored
Jul 22, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix some last error tests that fail on Windows.
parent
5be95f40
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
msg.c
dlls/user32/tests/msg.c
+16
-8
No files found.
dlls/user32/tests/msg.c
View file @
a900fe7c
...
...
@@ -13169,7 +13169,8 @@ static void test_hotkey(void)
SetLastError
(
0xdeadbeef
);
ret
=
UnregisterHotKey
(
NULL
,
0
);
ok
(
ret
==
FALSE
,
"expected FALSE, got %i
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_HOTKEY_NOT_REGISTERED
,
"unexpected error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_HOTKEY_NOT_REGISTERED
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"unexpected error %d
\n
"
,
GetLastError
());
if
(
ret
==
TRUE
)
{
...
...
@@ -13185,7 +13186,8 @@ static void test_hotkey(void)
SetLastError
(
0xdeadbeef
);
ret
=
UnregisterHotKey
(
test_window
,
0
);
ok
(
ret
==
FALSE
,
"expected FALSE, got %i
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_HOTKEY_NOT_REGISTERED
,
"unexpected error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_HOTKEY_NOT_REGISTERED
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"unexpected error %d
\n
"
,
GetLastError
());
/* Search for a Windows Key + letter combination that hasn't been registered */
for
(
hotkey_letter
=
0x41
;
hotkey_letter
<=
0x51
;
hotkey_letter
++
)
...
...
@@ -13199,7 +13201,8 @@ static void test_hotkey(void)
}
else
{
ok
(
GetLastError
()
==
ERROR_HOTKEY_ALREADY_REGISTERED
,
"unexpected error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_HOTKEY_ALREADY_REGISTERED
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"unexpected error %d
\n
"
,
GetLastError
());
}
}
...
...
@@ -13216,19 +13219,22 @@ static void test_hotkey(void)
SetLastError
(
0xdeadbeef
);
ret
=
RegisterHotKey
(
test_window
,
4
,
MOD_WIN
,
hotkey_letter
);
ok
(
ret
==
FALSE
,
"expected FALSE, got %i
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_HOTKEY_ALREADY_REGISTERED
,
"unexpected error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_HOTKEY_ALREADY_REGISTERED
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"unexpected error %d
\n
"
,
GetLastError
());
/* Same key combination, different window */
SetLastError
(
0xdeadbeef
);
ret
=
RegisterHotKey
(
NULL
,
5
,
MOD_WIN
,
hotkey_letter
);
ok
(
ret
==
FALSE
,
"expected FALSE, got %i
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_HOTKEY_ALREADY_REGISTERED
,
"unexpected error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_HOTKEY_ALREADY_REGISTERED
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"unexpected error %d
\n
"
,
GetLastError
());
/* Register the same hotkey twice */
SetLastError
(
0xdeadbeef
);
ret
=
RegisterHotKey
(
test_window
,
5
,
MOD_WIN
,
hotkey_letter
);
ok
(
ret
==
FALSE
,
"expected FALSE, got %i
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_HOTKEY_ALREADY_REGISTERED
,
"unexpected error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_HOTKEY_ALREADY_REGISTERED
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"unexpected error %d
\n
"
,
GetLastError
());
/* Window on another thread */
taskbar_window
=
FindWindowA
(
"Shell_TrayWnd"
,
NULL
);
...
...
@@ -13241,7 +13247,8 @@ static void test_hotkey(void)
SetLastError
(
0xdeadbeef
);
ret
=
RegisterHotKey
(
taskbar_window
,
5
,
0
,
hotkey_letter
);
ok
(
ret
==
FALSE
,
"expected FALSE, got %i
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_WINDOW_OF_OTHER_THREAD
,
"unexpected error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_WINDOW_OF_OTHER_THREAD
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"unexpected error %d
\n
"
,
GetLastError
());
}
/* Inject the appropriate key sequence */
...
...
@@ -13345,7 +13352,8 @@ static void test_hotkey(void)
SetLastError
(
0xdeadbeef
);
ret
=
UnregisterHotKey
(
test_window
,
5
);
ok
(
ret
==
FALSE
,
"expected FALSE, got %i
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_HOTKEY_NOT_REGISTERED
,
"unexpected error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_HOTKEY_NOT_REGISTERED
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"unexpected error %d
\n
"
,
GetLastError
());
/* Register thread hotkey */
ret
=
RegisterHotKey
(
NULL
,
5
,
MOD_WIN
,
hotkey_letter
);
...
...
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