user32: Make the clipboard tests pass on Vista.

This commit is contained in:
Reece H. Dunn 2008-01-23 23:32:52 +00:00 committed by Alexandre Julliard
parent e6dfbcb07f
commit ad89ff0abf
1 changed files with 6 additions and 4 deletions

View File

@ -66,8 +66,9 @@ static void test_ClipboardOwner(void)
ok(OpenClipboard(hWnd1), "OpenClipboard failed\n");
SetLastError(0xdeadbeef);
ok(!OpenClipboard(hWnd2) && GetLastError() == 0xdeadbeef,
"OpenClipboard should fail without setting last error value\n");
ok(!OpenClipboard(hWnd2) &&
(GetLastError() == 0xdeadbeef || GetLastError() == ERROR_ACCESS_DENIED),
"OpenClipboard should fail without setting last error value, or with ERROR_ACCESS_DENIED, got error %d\n", GetLastError());
SetLastError(0xdeadbeef);
ok(!GetClipboardOwner() && GetLastError() == 0xdeadbeef, "clipboard should still be not owned\n");
@ -76,8 +77,9 @@ static void test_ClipboardOwner(void)
ok(GetClipboardOwner() == hWnd1, "clipboard should be owned by %p, not by %p\n", hWnd1, GetClipboardOwner());
SetLastError(0xdeadbeef);
ok(!OpenClipboard(hWnd2) && GetLastError() == 0xdeadbeef,
"OpenClipboard should fail without setting last error value\n");
ok(!OpenClipboard(hWnd2) &&
(GetLastError() == 0xdeadbeef || GetLastError() == ERROR_ACCESS_DENIED),
"OpenClipboard should fail without setting last error valuei, or with ERROR_ACCESS_DENIED, got error %d\n", GetLastError());
ret = CloseClipboard();
ok( ret, "CloseClipboard error %d\n", GetLastError());