Commit 6b73bee0 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

gdi32/tests: Fix crash and failures on Win95.

parent 3237f587
...@@ -189,11 +189,16 @@ static void test_EnumICMProfilesA( HDC dc ) ...@@ -189,11 +189,16 @@ static void test_EnumICMProfilesA( HDC dc )
ret = EnumICMProfilesA( NULL, NULL, 0 ); ret = EnumICMProfilesA( NULL, NULL, 0 );
ok(ret == -1 || broken(ret == 0) /* nt4 */, "expected -1, got %d\n", ret); ok(ret == -1 || broken(ret == 0) /* nt4 */, "expected -1, got %d\n", ret);
ret = EnumICMProfilesA( dc, NULL, 0 );
ok(ret == -1 || broken(ret == 0) /* nt4 */, "expected -1, got %d\n", ret);
ret = EnumICMProfilesA( dc, enum_profiles_callbackA, 0 ); ret = EnumICMProfilesA( dc, enum_profiles_callbackA, 0 );
ok(ret == -1 || broken(ret == 0) /* nt4 */, "expected -1, got %d\n", ret); ok(ret == -1 || broken(ret == 0) /* nt4 */ || broken(ret == 1) /* win95 */,
"expected -1, got %d\n", ret);
if (ret != 1)
{
/* Crashes on Win95 */
ret = EnumICMProfilesA( dc, NULL, 0 );
ok(ret == -1 || broken(ret == 0) /* nt4 */, "expected -1, got %d\n", ret);
}
} }
static CALLBACK INT enum_profiles_callbackW( LPWSTR filename, LPARAM lparam ) static CALLBACK INT enum_profiles_callbackW( LPWSTR filename, LPARAM lparam )
...@@ -251,7 +256,8 @@ static void test_SetICMProfileA( HDC dc ) ...@@ -251,7 +256,8 @@ static void test_SetICMProfileA( HDC dc )
ret = SetICMProfileA( dc, NULL ); ret = SetICMProfileA( dc, NULL );
error = GetLastError(); error = GetLastError();
ok(!ret, "SetICMProfileA succeeded\n"); ok(!ret, "SetICMProfileA succeeded\n");
ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error); ok(error == ERROR_INVALID_PARAMETER || broken(error == 0xdeadbeef) /* win95 */,
"expected ERROR_INVALID_PARAMETER, got %u\n", error);
ret = SetICMProfileA( dc, profile ); ret = SetICMProfileA( dc, profile );
ok(ret, "SetICMProfileA failed %u\n", GetLastError()); ok(ret, "SetICMProfileA failed %u\n", GetLastError());
......
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