user32/tests: Do not check the last error on succeeding hotkey calls.
This commit is contained in:
parent
a5719990b5
commit
b0beeaffc6
|
@ -13107,7 +13107,6 @@ static void test_hotkey(void)
|
||||||
|
|
||||||
if (ret == TRUE)
|
if (ret == TRUE)
|
||||||
{
|
{
|
||||||
ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -13197,10 +13196,8 @@ static void test_hotkey(void)
|
||||||
ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError());
|
ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError());
|
||||||
|
|
||||||
/* Unregister hotkey properly */
|
/* Unregister hotkey properly */
|
||||||
SetLastError(0xdeadbeef);
|
|
||||||
ret = UnregisterHotKey(test_window, 5);
|
ret = UnregisterHotKey(test_window, 5);
|
||||||
ok(ret == TRUE, "expected TRUE, got %i\n", ret);
|
ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError());
|
||||||
ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError());
|
|
||||||
|
|
||||||
/* Unregister hotkey again */
|
/* Unregister hotkey again */
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
|
@ -13209,10 +13206,8 @@ static void test_hotkey(void)
|
||||||
ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED, "unexpected error %d\n", GetLastError());
|
ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED, "unexpected error %d\n", GetLastError());
|
||||||
|
|
||||||
/* Register thread hotkey */
|
/* Register thread hotkey */
|
||||||
SetLastError(0xdeadbeef);
|
|
||||||
ret = RegisterHotKey(NULL, 5, MOD_WIN, hotkey_letter);
|
ret = RegisterHotKey(NULL, 5, MOD_WIN, hotkey_letter);
|
||||||
ok(ret == TRUE, "expected TRUE, got %i\n", ret);
|
ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError());
|
||||||
ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError());
|
|
||||||
|
|
||||||
/* Inject the appropriate key sequence */
|
/* Inject the appropriate key sequence */
|
||||||
keybd_event(VK_LWIN, 0, 0, 0);
|
keybd_event(VK_LWIN, 0, 0, 0);
|
||||||
|
@ -13265,10 +13260,8 @@ static void test_hotkey(void)
|
||||||
ok_sequence(WmHotkeyReleaseLWIN, "thread hotkey release LWIN", FALSE);
|
ok_sequence(WmHotkeyReleaseLWIN, "thread hotkey release LWIN", FALSE);
|
||||||
|
|
||||||
/* Unregister thread hotkey */
|
/* Unregister thread hotkey */
|
||||||
SetLastError(0xdeadbeef);
|
|
||||||
ret = UnregisterHotKey(NULL, 5);
|
ret = UnregisterHotKey(NULL, 5);
|
||||||
ok(ret == TRUE, "expected TRUE, got %i\n", ret);
|
ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError());
|
||||||
ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError());
|
|
||||||
|
|
||||||
UnhookWindowsHookEx(hKBD_hook);
|
UnhookWindowsHookEx(hKBD_hook);
|
||||||
hKBD_hook = NULL;
|
hKBD_hook = NULL;
|
||||||
|
|
Loading…
Reference in New Issue