Zebediah Figura : wininet/tests: Don't test that the URL cache is used for persistent cookies.

Alexandre Julliard julliard at winehq.org
Tue Jan 7 17:25:24 CST 2020


Module: wine
Branch: master
Commit: 4928c623dc7f3b7f2355cf61c9f97784ff2380fe
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4928c623dc7f3b7f2355cf61c9f97784ff2380fe

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Jan  6 14:47:42 2020 -0600

wininet/tests: Don't test that the URL cache is used for persistent cookies.

This seems to be an implementation detail, which is no longer true in Windows
1709+.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wininet/tests/internet.c | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c
index 13b2930988..b94c0647e2 100644
--- a/dlls/wininet/tests/internet.c
+++ b/dlls/wininet/tests/internet.c
@@ -376,7 +376,6 @@ static void test_complicated_cookie(void)
   BOOL ret;
 
   CHAR buffer[1024];
-  CHAR user[256];
   WCHAR wbuf[1024];
 
   static const WCHAR testing_example_comW[] =
@@ -530,25 +529,16 @@ static void test_complicated_cookie(void)
   ret = InternetSetCookieA("http://testing.example.com", NULL, "A=B; expires=Fri, 01-Jan-2038 00:00:00 GMT");
   ok(ret, "InternetSetCookie failed with error %d\n", GetLastError());
 
-  len = sizeof(user);
-  ret = GetUserNameA(user, &len);
-  ok(ret, "GetUserName failed with error %d\n", GetLastError());
-  for(; len>0; len--)
-      user[len-1] = tolower(user[len-1]);
-
-  sprintf(buffer, "Cookie:%s at testing.example.com/", user);
-  ret = GetUrlCacheEntryInfoA(buffer, NULL, &len);
-  ok(!ret, "GetUrlCacheEntryInfo succeeded\n");
-  ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %d\n", GetLastError());
+  len = sizeof(buffer);
+  ret = InternetGetCookieA("http://testing.example.com/foobar", NULL, buffer, &len);
+  ok(ret, "got error %u\n", GetLastError());
+  ok(len == 24, "got len %u\n", len);
+  ok(!!strstr(buffer, "A=B"), "cookie is not present\n");
 
   /* remove persistent cookie */
   ret = InternetSetCookieA("http://testing.example.com", NULL, "A=B");
   ok(ret, "InternetSetCookie failed with error %d\n", GetLastError());
 
-  ret = GetUrlCacheEntryInfoA(buffer, NULL, &len);
-  ok(!ret, "GetUrlCacheEntryInfo succeeded\n");
-  ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() = %d\n", GetLastError());
-
   /* try setting cookie for different domain */
   ret = InternetSetCookieA("http://www.aaa.example.com/bar",NULL,"E=F; domain=different.com");
   ok(!ret, "InternetSetCookie succeeded\n");




More information about the wine-cvs mailing list