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

This commit is contained in:
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; return;
} }
ok( !r, "InternetCrackUrlW succeeded unexpectedly\n"); 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); if (error == ERROR_INVALID_PARAMETER)
r = InternetCrackUrlW(url, 0, 0, NULL ); {
error = GetLastError(); /* Crashes on IE5 */
ok( !r, "InternetCrackUrlW succeeded unexpectedly\n"); SetLastError(0xdeadbeef);
ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error); 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 ); r = InternetCrackUrlW(url, 0, 0, &comp );
ok( r, "failed to crack url\n"); ok( r, "failed to crack url\n");