Module: wine Branch: master Commit: 27ea3804ddc8077fedb7a0ea81ac96910f78a26f URL: http://source.winehq.org/git/wine.git/?a=commit;h=27ea3804ddc8077fedb7a0ea81...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Jul 6 13:44:15 2016 +0200
wininet: Added semi-stub INTERNET_OPTION_END_BROWSER_SESSION implementation.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wininet/internet.c | 3 ++- dlls/wininet/tests/internet.c | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index d3d6a38..19cf470 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -2805,7 +2805,8 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, FIXME("Option INTERNET_OPTION_RESET_URLCACHE_SESSION: STUB\n"); break; case INTERNET_OPTION_END_BROWSER_SESSION: - FIXME("Option INTERNET_OPTION_END_BROWSER_SESSION: STUB\n"); + FIXME("Option INTERNET_OPTION_END_BROWSER_SESSION: semi-stub\n"); + free_cookie(); break; case INTERNET_OPTION_CONNECTED_STATE: FIXME("Option INTERNET_OPTION_CONNECTED_STATE: STUB\n"); diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index ac8e9b3..5408af8 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -1173,6 +1173,28 @@ static void test_InternetSetOption(void) ok(ret == TRUE, "InternetCloseHandle failed: 0x%08x\n", GetLastError()); }
+static void test_end_browser_session(void) +{ + DWORD len; + BOOL ret; + + ret = InternetSetCookieA("http://www.example.com/test_end", NULL, "A=B"); + ok(ret == TRUE, "InternetSetCookie failed\n"); + + len = 1024; + ret = InternetGetCookieA("http://www.example.com/test_end", NULL, NULL, &len); + ok(ret == TRUE,"InternetGetCookie failed\n"); + ok(len != 0, "len = 0\n"); + + ret = InternetSetOptionA(NULL, INTERNET_OPTION_END_BROWSER_SESSION, NULL, 0); + ok(ret, "InternetSetOptio(INTERNET_OPTION_END_BROWSER_SESSION) failed: %u\n", GetLastError()); + + len = 1024; + ret = InternetGetCookieA("http://www.example.com/test_end", NULL, NULL, &len); + ok(!ret && GetLastError() == ERROR_NO_MORE_ITEMS, "InternetGetCookie returned %x (%u)\n", ret, GetLastError()); + ok(!len, "len = %u\n", len); +} + #define verifyProxyEnable(e) r_verifyProxyEnable(__LINE__, e) static void r_verifyProxyEnable(LONG l, DWORD exp) { @@ -1805,4 +1827,5 @@ START_TEST(internet) win_skip("Privacy[SG]etZonePreferenceW are not available\n");
test_InternetSetOption(); + test_end_browser_session(); }