Module: wine Branch: master Commit: fa5839399fdb2313e40ea3b7f022d69453782b2f URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa5839399fdb2313e40ea3b7f0...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Oct 19 10:44:03 2010 +0200
wininet: Skip more tests on IE older than 6.0.
---
dlls/wininet/tests/ftp.c | 12 ++++++------ dlls/wininet/tests/http.c | 29 +++++++++++++++-------------- dlls/wininet/tests/internet.c | 6 ++++++ dlls/wininet/tests/url.c | 5 +++++ dlls/wininet/tests/urlcache.c | 6 ++++++ 5 files changed, 38 insertions(+), 20 deletions(-)
diff --git a/dlls/wininet/tests/ftp.c b/dlls/wininet/tests/ftp.c index df9c347..a483dc9 100644 --- a/dlls/wininet/tests/ftp.c +++ b/dlls/wininet/tests/ftp.c @@ -943,12 +943,6 @@ static void test_status_callbacks(HINTERNET hInternet) HINTERNET hFtp; BOOL ret;
- if (!pInternetSetStatusCallbackA) - { - win_skip("InternetSetStatusCallbackA() is not available, skipping test\n"); - return; - } - cb = pInternetSetStatusCallbackA(hInternet, status_callback); ok(cb == NULL, "expected NULL got %p\n", cb);
@@ -973,6 +967,12 @@ START_TEST(ftp) HANDLE hInternet, hFtp, hHttp;
hWininet = GetModuleHandleA("wininet.dll"); + + if(!GetProcAddress(hWininet, "InternetGetCookieExW")) { + win_skip("Too old IE (older than 6.0)\n"); + return; + } + pFtpCommandA = (void*)GetProcAddress(hWininet, "FtpCommandA"); pInternetSetStatusCallbackA = (void*)GetProcAddress(hWininet, "InternetSetStatusCallbackA");
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index d942ca4..7872297 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -3151,22 +3151,23 @@ START_TEST(http) { HMODULE hdll; hdll = GetModuleHandleA("wininet.dll"); - pInternetSetStatusCallbackA = (void*)GetProcAddress(hdll, "InternetSetStatusCallbackA");
- if (!pInternetSetStatusCallbackA) - skip("skipping the InternetReadFile tests\n"); - else - { - init_status_tests(); - InternetReadFile_test(INTERNET_FLAG_ASYNC, &test_data[0]); - InternetReadFile_test(0, &test_data[0]); - first_connection_to_test_url = TRUE; - InternetReadFile_test(INTERNET_FLAG_ASYNC, &test_data[1]); - InternetReadFile_test(0, &test_data[1]); - InternetReadFileExA_test(INTERNET_FLAG_ASYNC); - test_open_url_async(); - test_async_HttpSendRequestEx(); + if(!GetProcAddress(hdll, "InternetGetCookieExW")) { + win_skip("Too old IE (older than 6.0)\n"); + return; } + + pInternetSetStatusCallbackA = (void*)GetProcAddress(hdll, "InternetSetStatusCallbackA"); + + init_status_tests(); + InternetReadFile_test(INTERNET_FLAG_ASYNC, &test_data[0]); + InternetReadFile_test(0, &test_data[0]); + first_connection_to_test_url = TRUE; + InternetReadFile_test(INTERNET_FLAG_ASYNC, &test_data[1]); + InternetReadFile_test(0, &test_data[1]); + InternetReadFileExA_test(INTERNET_FLAG_ASYNC); + test_open_url_async(); + test_async_HttpSendRequestEx(); InternetOpenRequest_test(); test_http_cache(); InternetOpenUrlA_test(); diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 54fd229..a38e196 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -1129,6 +1129,12 @@ START_TEST(internet) { HMODULE hdll; hdll = GetModuleHandleA("wininet.dll"); + + if(!GetProcAddress(hdll, "InternetGetCookieExW")) { + win_skip("Too old IE (older than 6.0)\n"); + return; + } + pCreateUrlCacheContainerA = (void*)GetProcAddress(hdll, "CreateUrlCacheContainerA"); pCreateUrlCacheContainerW = (void*)GetProcAddress(hdll, "CreateUrlCacheContainerW"); pInternetTimeFromSystemTimeA = (void*)GetProcAddress(hdll, "InternetTimeFromSystemTimeA"); diff --git a/dlls/wininet/tests/url.c b/dlls/wininet/tests/url.c index 5e055ff..0a2079d 100644 --- a/dlls/wininet/tests/url.c +++ b/dlls/wininet/tests/url.c @@ -1103,6 +1103,11 @@ START_TEST(url) { int i;
+ if(!GetProcAddress(GetModuleHandleA("wininet.dll"), "InternetGetCookieExW")) { + win_skip("Too old IE (older than 6.0)\n"); + return; + } + for(i=0; i < sizeof(crack_url_tests)/sizeof(*crack_url_tests); i++) test_crack_url(crack_url_tests+i);
diff --git a/dlls/wininet/tests/urlcache.c b/dlls/wininet/tests/urlcache.c index 65e433c..630b5cc 100644 --- a/dlls/wininet/tests/urlcache.c +++ b/dlls/wininet/tests/urlcache.c @@ -311,6 +311,12 @@ START_TEST(urlcache) { HMODULE hdll; hdll = GetModuleHandleA("wininet.dll"); + + if(!GetProcAddress(hdll, "InternetGetCookieExW")) { + win_skip("Too old IE (older than 6.0)\n"); + return; + } + pDeleteUrlCacheEntryA = (void*)GetProcAddress(hdll, "DeleteUrlCacheEntryA"); pUnlockUrlCacheEntryFileA = (void*)GetProcAddress(hdll, "UnlockUrlCacheEntryFileA"); test_urlcacheA();