wininet/tests: Don't crash on systems with IE5.

oldstable
Paul Vriens 2009-03-08 14:06:48 +01:00 committed by Alexandre Julliard
parent c01d0ade50
commit 2266219ca6
1 changed files with 12 additions and 6 deletions

View File

@ -305,13 +305,19 @@ static void InternetCrackUrlW_test(void)
return;
}
ok( !r, "InternetCrackUrlW succeeded unexpectedly\n");
ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error);
ok( error == ERROR_INVALID_PARAMETER ||
broken(error == ERROR_INTERNET_UNRECOGNIZED_SCHEME), /* IE5 */
"expected ERROR_INVALID_PARAMETER got %u\n", error);
SetLastError(0xdeadbeef);
r = InternetCrackUrlW(url, 0, 0, NULL );
error = GetLastError();
ok( !r, "InternetCrackUrlW succeeded unexpectedly\n");
ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error);
if (error == ERROR_INVALID_PARAMETER)
{
/* Crashes on IE5 */
SetLastError(0xdeadbeef);
r = InternetCrackUrlW(url, 0, 0, NULL );
error = GetLastError();
ok( !r, "InternetCrackUrlW succeeded unexpectedly\n");
ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error);
}
r = InternetCrackUrlW(url, 0, 0, &comp );
ok( r, "failed to crack url\n");