From 8e6d2bab3766e48cf559a011d6aa9b6419851ee6 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Wed, 3 Oct 2012 12:29:15 +0200 Subject: [PATCH] wininet: Fixed failing test. --- dlls/wininet/tests/urlcache.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/wininet/tests/urlcache.c b/dlls/wininet/tests/urlcache.c index c8f45705604..f4e50ceb006 100644 --- a/dlls/wininet/tests/urlcache.c +++ b/dlls/wininet/tests/urlcache.c @@ -41,6 +41,7 @@ static BOOL (WINAPI *pUnlockUrlCacheEntryFileA)(LPCSTR,DWORD); static char filenameA[MAX_PATH + 1]; static char filenameA1[MAX_PATH + 1]; +static BOOL old_ie = FALSE; static void check_cache_entry_infoA(const char *returnedfrom, LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo) { @@ -137,7 +138,7 @@ static void test_GetUrlCacheEntryInfoExA(void) /* Unicode version of function seems to ignore 0x200 flag */ ret = GetUrlCacheEntryInfoExW(test_urlW, NULL, NULL, NULL, NULL, NULL, 0x200 /*GET_INSTALLED_ENTRY*/); - ok(ret, "GetUrlCacheEntryInfoExW failed with error %d\n", GetLastError()); + ok(ret || broken(old_ie && !ret), "GetUrlCacheEntryInfoExW failed with error %d\n", GetLastError()); ret = GetUrlCacheEntryInfoEx(test_url, lpCacheEntryInfo, &cbCacheEntryInfo, NULL, NULL, NULL, 0); ok(ret, "GetUrlCacheEntryInfoEx failed with error %d\n", GetLastError()); @@ -845,10 +846,10 @@ static void test_GetDiskInfoA(void) ret = GetDiskInfoA(path, NULL, NULL, NULL); error = GetLastError(); ok(!ret || - broken(ret), /* < IE7 */ + broken(old_ie && ret), /* < IE7 */ "GetDiskInfoA succeeded\n"); ok(error == ERROR_PATH_NOT_FOUND || - broken(error == 0xdeadbeef), /* < IE7 */ + broken(old_ie && error == 0xdeadbeef), /* < IE7 */ "got %u expected ERROR_PATH_NOT_FOUND\n", error); SetLastError(0xdeadbeef); @@ -867,6 +868,8 @@ START_TEST(urlcache) win_skip("Too old IE (older than 6.0)\n"); return; } + if(!GetProcAddress(hdll, "InternetGetSecurityInfoByURL")) /* < IE7 */ + old_ie = TRUE; pDeleteUrlCacheEntryA = (void*)GetProcAddress(hdll, "DeleteUrlCacheEntryA"); pUnlockUrlCacheEntryFileA = (void*)GetProcAddress(hdll, "UnlockUrlCacheEntryFileA");