wininet: Skip more tests on IE older than 6.0.

This commit is contained in:
Jacek Caban 2010-10-19 10:44:03 +02:00 committed by Alexandre Julliard
parent 2f0b9dd3bf
commit fa5839399f
5 changed files with 38 additions and 20 deletions

View File

@ -943,12 +943,6 @@ static void test_status_callbacks(HINTERNET hInternet)
HINTERNET hFtp; HINTERNET hFtp;
BOOL ret; BOOL ret;
if (!pInternetSetStatusCallbackA)
{
win_skip("InternetSetStatusCallbackA() is not available, skipping test\n");
return;
}
cb = pInternetSetStatusCallbackA(hInternet, status_callback); cb = pInternetSetStatusCallbackA(hInternet, status_callback);
ok(cb == NULL, "expected NULL got %p\n", cb); ok(cb == NULL, "expected NULL got %p\n", cb);
@ -973,6 +967,12 @@ START_TEST(ftp)
HANDLE hInternet, hFtp, hHttp; HANDLE hInternet, hFtp, hHttp;
hWininet = GetModuleHandleA("wininet.dll"); hWininet = GetModuleHandleA("wininet.dll");
if(!GetProcAddress(hWininet, "InternetGetCookieExW")) {
win_skip("Too old IE (older than 6.0)\n");
return;
}
pFtpCommandA = (void*)GetProcAddress(hWininet, "FtpCommandA"); pFtpCommandA = (void*)GetProcAddress(hWininet, "FtpCommandA");
pInternetSetStatusCallbackA = (void*)GetProcAddress(hWininet, "InternetSetStatusCallbackA"); pInternetSetStatusCallbackA = (void*)GetProcAddress(hWininet, "InternetSetStatusCallbackA");

View File

@ -3151,22 +3151,23 @@ START_TEST(http)
{ {
HMODULE hdll; HMODULE hdll;
hdll = GetModuleHandleA("wininet.dll"); hdll = GetModuleHandleA("wininet.dll");
if(!GetProcAddress(hdll, "InternetGetCookieExW")) {
win_skip("Too old IE (older than 6.0)\n");
return;
}
pInternetSetStatusCallbackA = (void*)GetProcAddress(hdll, "InternetSetStatusCallbackA"); pInternetSetStatusCallbackA = (void*)GetProcAddress(hdll, "InternetSetStatusCallbackA");
if (!pInternetSetStatusCallbackA) init_status_tests();
skip("skipping the InternetReadFile tests\n"); InternetReadFile_test(INTERNET_FLAG_ASYNC, &test_data[0]);
else InternetReadFile_test(0, &test_data[0]);
{ first_connection_to_test_url = TRUE;
init_status_tests(); InternetReadFile_test(INTERNET_FLAG_ASYNC, &test_data[1]);
InternetReadFile_test(INTERNET_FLAG_ASYNC, &test_data[0]); InternetReadFile_test(0, &test_data[1]);
InternetReadFile_test(0, &test_data[0]); InternetReadFileExA_test(INTERNET_FLAG_ASYNC);
first_connection_to_test_url = TRUE; test_open_url_async();
InternetReadFile_test(INTERNET_FLAG_ASYNC, &test_data[1]); test_async_HttpSendRequestEx();
InternetReadFile_test(0, &test_data[1]);
InternetReadFileExA_test(INTERNET_FLAG_ASYNC);
test_open_url_async();
test_async_HttpSendRequestEx();
}
InternetOpenRequest_test(); InternetOpenRequest_test();
test_http_cache(); test_http_cache();
InternetOpenUrlA_test(); InternetOpenUrlA_test();

View File

@ -1129,6 +1129,12 @@ START_TEST(internet)
{ {
HMODULE hdll; HMODULE hdll;
hdll = GetModuleHandleA("wininet.dll"); hdll = GetModuleHandleA("wininet.dll");
if(!GetProcAddress(hdll, "InternetGetCookieExW")) {
win_skip("Too old IE (older than 6.0)\n");
return;
}
pCreateUrlCacheContainerA = (void*)GetProcAddress(hdll, "CreateUrlCacheContainerA"); pCreateUrlCacheContainerA = (void*)GetProcAddress(hdll, "CreateUrlCacheContainerA");
pCreateUrlCacheContainerW = (void*)GetProcAddress(hdll, "CreateUrlCacheContainerW"); pCreateUrlCacheContainerW = (void*)GetProcAddress(hdll, "CreateUrlCacheContainerW");
pInternetTimeFromSystemTimeA = (void*)GetProcAddress(hdll, "InternetTimeFromSystemTimeA"); pInternetTimeFromSystemTimeA = (void*)GetProcAddress(hdll, "InternetTimeFromSystemTimeA");

View File

@ -1103,6 +1103,11 @@ START_TEST(url)
{ {
int i; 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++) for(i=0; i < sizeof(crack_url_tests)/sizeof(*crack_url_tests); i++)
test_crack_url(crack_url_tests+i); test_crack_url(crack_url_tests+i);

View File

@ -311,6 +311,12 @@ START_TEST(urlcache)
{ {
HMODULE hdll; HMODULE hdll;
hdll = GetModuleHandleA("wininet.dll"); hdll = GetModuleHandleA("wininet.dll");
if(!GetProcAddress(hdll, "InternetGetCookieExW")) {
win_skip("Too old IE (older than 6.0)\n");
return;
}
pDeleteUrlCacheEntryA = (void*)GetProcAddress(hdll, "DeleteUrlCacheEntryA"); pDeleteUrlCacheEntryA = (void*)GetProcAddress(hdll, "DeleteUrlCacheEntryA");
pUnlockUrlCacheEntryFileA = (void*)GetProcAddress(hdll, "UnlockUrlCacheEntryFileA"); pUnlockUrlCacheEntryFileA = (void*)GetProcAddress(hdll, "UnlockUrlCacheEntryFileA");
test_urlcacheA(); test_urlcacheA();