Juan Lang : wininet/tests: Add a couple more tests for GetUrlCacheEntryInfoEx.
Alexandre Julliard
julliard at winehq.org
Wed Mar 9 11:12:49 CST 2011
Module: wine
Branch: master
Commit: c485996e5ea71f27f2e794461ecfdfe07a9070ac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c485996e5ea71f27f2e794461ecfdfe07a9070ac
Author: Juan Lang <juan.lang at gmail.com>
Date: Tue Mar 8 11:34:23 2011 -0800
wininet/tests: Add a couple more tests for GetUrlCacheEntryInfoEx.
---
dlls/wininet/tests/urlcache.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/dlls/wininet/tests/urlcache.c b/dlls/wininet/tests/urlcache.c
index 630b5cc..526a70d 100644
--- a/dlls/wininet/tests/urlcache.c
+++ b/dlls/wininet/tests/urlcache.c
@@ -96,7 +96,7 @@ static void test_find_url_cache_entriesA(void)
static void test_GetUrlCacheEntryInfoExA(void)
{
BOOL ret;
- DWORD cbCacheEntryInfo;
+ DWORD cbCacheEntryInfo, cbRedirectUrl;
LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo;
SetLastError(0xdeadbeef);
@@ -142,6 +142,16 @@ static void test_GetUrlCacheEntryInfoExA(void)
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetUrlCacheEntryInfoEx should have set last error to ERROR_INSUFFICIENT_BUFFER instead of %d\n", GetLastError());
HeapFree(GetProcessHeap(), 0, lpCacheEntryInfo);
+
+ /* Querying the redirect URL fails with ERROR_INVALID_PARAMETER */
+ SetLastError(0xdeadbeef);
+ ret = GetUrlCacheEntryInfoEx(TEST_URL, NULL, NULL, NULL, &cbRedirectUrl, NULL, 0);
+ ok(GetLastError() == ERROR_INVALID_PARAMETER,
+ "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ SetLastError(0xdeadbeef);
+ ret = GetUrlCacheEntryInfoEx(TEST_URL, NULL, &cbCacheEntryInfo, NULL, &cbRedirectUrl, NULL, 0);
+ ok(GetLastError() == ERROR_INVALID_PARAMETER,
+ "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
}
static void test_RetrieveUrlCacheEntryA(void)
More information about the wine-cvs
mailing list