From c485996e5ea71f27f2e794461ecfdfe07a9070ac Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Tue, 8 Mar 2011 11:34:23 -0800 Subject: [PATCH] wininet/tests: Add a couple more tests for GetUrlCacheEntryInfoEx. --- dlls/wininet/tests/urlcache.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/wininet/tests/urlcache.c b/dlls/wininet/tests/urlcache.c index 630b5cc6887..526a70da26d 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) -- 2.11.4.GIT