user32/tests: Fix the cursor tests on Win9x.
This commit is contained in:
parent
43a70a68bc
commit
4afb1c54c0
|
@ -76,7 +76,7 @@ static LRESULT CALLBACK callback_child(HWND hwnd, UINT msg, WPARAM wParam, LPARA
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = DestroyCursor((HCURSOR) lParam);
|
ret = DestroyCursor((HCURSOR) lParam);
|
||||||
error = GetLastError();
|
error = GetLastError();
|
||||||
todo_wine ok(!ret, "DestroyCursor on the active cursor succeeded.\n");
|
todo_wine ok(!ret || broken(ret) /* win9x */, "DestroyCursor on the active cursor succeeded.\n");
|
||||||
ok(error == ERROR_DESTROY_OBJECT_OF_OTHER_THREAD ||
|
ok(error == ERROR_DESTROY_OBJECT_OF_OTHER_THREAD ||
|
||||||
error == 0xdeadbeef, /* vista */
|
error == 0xdeadbeef, /* vista */
|
||||||
"Last error: %u\n", error);
|
"Last error: %u\n", error);
|
||||||
|
@ -983,25 +983,26 @@ static void test_DestroyCursor(void)
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = DestroyCursor(cursor);
|
ret = DestroyCursor(cursor);
|
||||||
ok(!ret, "DestroyCursor on the active cursor succeeded\n");
|
ok(!ret || broken(ret) /* succeeds on win9x */, "DestroyCursor on the active cursor succeeded\n");
|
||||||
error = GetLastError();
|
error = GetLastError();
|
||||||
ok(error == 0xdeadbeef, "Last error: %u\n", error);
|
ok(error == 0xdeadbeef, "Last error: %u\n", error);
|
||||||
|
if (!ret)
|
||||||
|
{
|
||||||
|
cursor2 = GetCursor();
|
||||||
|
ok(cursor2 == cursor, "Active was set to %p when trying to destroy it\n", cursor2);
|
||||||
|
SetCursor(NULL);
|
||||||
|
|
||||||
cursor2 = GetCursor();
|
/* Trying to destroy the cursor properly fails now with
|
||||||
ok(cursor2 == cursor, "Active was set to %p when trying to destroy it\n", cursor2);
|
* ERROR_INVALID_CURSOR_HANDLE. This happens because we called
|
||||||
|
* DestroyCursor() 2+ times after calling SetCursor(). The calls to
|
||||||
SetCursor(NULL);
|
* GetCursor() and SetCursor(NULL) in between make no difference. */
|
||||||
|
ret = DestroyCursor(cursor);
|
||||||
/* Trying to destroy the cursor properly fails now with
|
todo_wine {
|
||||||
* ERROR_INVALID_CURSOR_HANDLE. This happens because we called
|
ok(!ret, "DestroyCursor succeeded.\n");
|
||||||
* DestroyCursor() 2+ times after calling SetCursor(). The calls to
|
error = GetLastError();
|
||||||
* GetCursor() and SetCursor(NULL) in between make no difference. */
|
ok(error == ERROR_INVALID_CURSOR_HANDLE || error == 0xdeadbeef, /* vista */
|
||||||
ret = DestroyCursor(cursor);
|
"Last error: 0x%08x\n", error);
|
||||||
todo_wine {
|
}
|
||||||
ok(!ret, "DestroyCursor succeeded.\n");
|
|
||||||
error = GetLastError();
|
|
||||||
ok(error == ERROR_INVALID_CURSOR_HANDLE || error == 0xdeadbeef, /* vista */
|
|
||||||
"Last error: 0x%08x\n", error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteObject(cursorInfo.hbmMask);
|
DeleteObject(cursorInfo.hbmMask);
|
||||||
|
@ -1012,7 +1013,7 @@ static void test_DestroyCursor(void)
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = DestroyCursor(cursor);
|
ret = DestroyCursor(cursor);
|
||||||
ok(ret, "DestroyCursor on the active cursor failed.\n");
|
ok(ret || broken(!ret) /* fails on win9x */, "DestroyCursor on the active cursor failed.\n");
|
||||||
error = GetLastError();
|
error = GetLastError();
|
||||||
ok(error == 0xdeadbeef, "Last error: 0x%08x\n", error);
|
ok(error == 0xdeadbeef, "Last error: 0x%08x\n", error);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue