Commit ffe9ace9 authored by Alexandre Julliard's avatar Alexandre Julliard

user32/tests: Fix some last error checks for WoW64.

parent 89c0b87f
...@@ -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)
......
...@@ -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);
......
...@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment