Francois Gouget : wininet/tests: Get the tests running again on Win98.
Module: wine Branch: master Commit: 089221fcce3ddfea02f136c31c8c0da20132ed4d URL: http://source.winehq.org/git/wine.git/?a=commit;h=089221fcce3ddfea02f136c31c... Author: Francois Gouget <fgouget(a)free.fr> Date: Thu May 22 10:38:29 2008 +0200 wininet/tests: Get the tests running again on Win98. --- dlls/wininet/tests/urlcache.c | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/dlls/wininet/tests/urlcache.c b/dlls/wininet/tests/urlcache.c index 08ffebb..1e0e5b6 100644 --- a/dlls/wininet/tests/urlcache.c +++ b/dlls/wininet/tests/urlcache.c @@ -30,6 +30,9 @@ #define TEST_URL "http://urlcachetest.winehq.org/index.html" +static BOOL (WINAPI *pDeleteUrlCacheEntryA)(LPCSTR); +static BOOL (WINAPI *pUnlockUrlCacheEntryFileA)(LPCSTR,DWORD); + static char filenameA[MAX_PATH + 1]; static void check_cache_entry_infoA(const char *returnedfrom, LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo) @@ -150,16 +153,22 @@ static void test_urlcacheA(void) HeapFree(GetProcessHeap(), 0, lpCacheEntryInfo); - ret = UnlockUrlCacheEntryFile(TEST_URL, 0); - ok(ret, "UnlockUrlCacheEntryFile failed with error %d\n", GetLastError()); + if (pUnlockUrlCacheEntryFileA) + { + ret = pUnlockUrlCacheEntryFileA(TEST_URL, 0); + ok(ret, "UnlockUrlCacheEntryFileA failed with error %d\n", GetLastError()); + } /* test Find*UrlCacheEntry functions */ test_find_url_cache_entriesA(); test_GetUrlCacheEntryInfoExA(); - ret = DeleteUrlCacheEntry(TEST_URL); - ok(ret, "DeleteUrlCacheEntry failed with error %d\n", GetLastError()); + if (pDeleteUrlCacheEntryA) + { + ret = pDeleteUrlCacheEntryA(TEST_URL); + ok(ret, "DeleteUrlCacheEntryA failed with error %d\n", GetLastError()); + } ret = DeleteFile(filenameA); todo_wine @@ -178,6 +187,10 @@ static void test_FindCloseUrlCache(void) START_TEST(urlcache) { + HMODULE hdll; + hdll = GetModuleHandleA("wininet.dll"); + pDeleteUrlCacheEntryA = (void*)GetProcAddress(hdll, "DeleteUrlCacheEntryA"); + pUnlockUrlCacheEntryFileA = (void*)GetProcAddress(hdll, "UnlockUrlCacheEntryFileA"); test_urlcacheA(); test_FindCloseUrlCache(); }
participants (1)
-
Alexandre Julliard