[WINESYNC] wininet/tests: Fix some test failures with Windows 10.

Windows 10 1607+ no longer validates a NULL window handle, so remove that test.

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

wine commit id 6b839a0f85236aac2cc794d5d586f1ba371866b1 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
winesync 2020-12-08 18:00:50 +01:00 committed by Jérôme Gardou
parent d4ceb8c619
commit f64bdd0732
3 changed files with 20 additions and 15 deletions

View file

@ -25,6 +25,7 @@
#include "winbase.h" #include "winbase.h"
#include "winuser.h" #include "winuser.h"
#include "wininet.h" #include "wininet.h"
#include "winineti.h"
#include "winerror.h" #include "winerror.h"
#include "winreg.h" #include "winreg.h"
@ -1498,13 +1499,6 @@ static void test_InternetErrorDlg(void)
req = HttpOpenRequestA(con, "GET", "/", NULL, NULL, NULL, 0, 0); req = HttpOpenRequestA(con, "GET", "/", NULL, NULL, NULL, 0, 0);
ok(req != 0, "HttpOpenRequest failed: 0x%08x\n", GetLastError()); ok(req != 0, "HttpOpenRequest failed: 0x%08x\n", GetLastError());
/* NULL hwnd and FLAGS_ERROR_UI_FLAGS_NO_UI not set */
for(i = INTERNET_ERROR_BASE; i < INTERNET_ERROR_LAST; i++)
{
res = InternetErrorDlg(NULL, req, i, 0, NULL);
ok(res == ERROR_INVALID_HANDLE, "Got %d (%d)\n", res, i);
}
hwnd = GetDesktopWindow(); hwnd = GetDesktopWindow();
ok(hwnd != NULL, "GetDesktopWindow failed (%d)\n", GetLastError()); ok(hwnd != NULL, "GetDesktopWindow failed (%d)\n", GetLastError());
@ -1537,6 +1531,8 @@ static void test_InternetErrorDlg(void)
if(i == ERROR_INTERNET_SEC_CERT_REVOKED) if(i == ERROR_INTERNET_SEC_CERT_REVOKED)
continue; /* Interactive (XP, Win7) */ continue; /* Interactive (XP, Win7) */
if (i == ERROR_INTERNET_PROXY_ALERT)
continue; /* Interactive (Win10 1607+) */
res = InternetErrorDlg(hwnd, req, i, FLAGS_ERROR_UI_FLAGS_NO_UI, NULL); res = InternetErrorDlg(hwnd, req, i, FLAGS_ERROR_UI_FLAGS_NO_UI, NULL);
@ -1550,13 +1546,8 @@ static void test_InternetErrorDlg(void)
expected = ERROR_CANCELLED; expected = ERROR_CANCELLED;
break; break;
case ERROR_INTERNET_FORTEZZA_LOGIN_NEEDED: case ERROR_INTERNET_FORTEZZA_LOGIN_NEEDED:
if(res != expected) if (res == NTE_PROV_TYPE_NOT_DEF) /* XP, 2003 */
{ expected = NTE_PROV_TYPE_NOT_DEF;
/* Windows XP, W2K3 */
ok(res == NTE_PROV_TYPE_NOT_DEF, "Got %d\n", res);
win_skip("Skipping some tests for %d\n", i);
continue;
}
break; break;
case ERROR_INTERNET_CHG_POST_IS_NON_SECURE: case ERROR_INTERNET_CHG_POST_IS_NON_SECURE:
if(res == ERROR_SUCCESS) /* win10 returns ERROR_SUCCESS */ if(res == ERROR_SUCCESS) /* win10 returns ERROR_SUCCESS */
@ -1565,6 +1556,9 @@ static void test_InternetErrorDlg(void)
default: break; default: break;
} }
if (expected == ERROR_NOT_SUPPORTED && res == ERROR_CANCELLED) /* Win10 1607+ */
expected = ERROR_CANCELLED;
todo_wine_if(test_flags & FLAG_TODO) todo_wine_if(test_flags & FLAG_TODO)
ok(res == expected, "Got %d, expected %d (%d)\n", res, expected, i); ok(res == expected, "Got %d, expected %d (%d)\n", res, expected, i);

View file

@ -106,6 +106,17 @@ typedef enum {
#define CACHE_CONFIG_CONTENT_USAGE_FC 0x00002000 #define CACHE_CONFIG_CONTENT_USAGE_FC 0x00002000
#define CACHE_CONFIG_STICKY_CONTENT_USAGE_FC 0x00004000 #define CACHE_CONFIG_STICKY_CONTENT_USAGE_FC 0x00004000
#define ERROR_INTERNET_NO_NEW_CONTAINERS (INTERNET_ERROR_BASE + 51)
#define ERROR_INTERNET_SOURCE_PORT_IN_USE (INTERNET_ERROR_BASE + 58)
#define ERROR_INTERNET_INSECURE_FALLBACK_REQUIRED (INTERNET_ERROR_BASE + 59)
#define ERROR_INTERNET_PROXY_ALERT (INTERNET_ERROR_BASE + 61)
#define ERROR_INTERNET_NO_CM_CONNECTION (INTERNET_ERROR_BASE + 80)
#define ERROR_HTTP_PUSH_STATUS_CODE_NOT_SUPPORTED (INTERNET_ERROR_BASE + 147)
#define ERROR_HTTP_PUSH_RETRY_NOT_SUPPORTED (INTERNET_ERROR_BASE + 148)
#define ERROR_HTTP_PUSH_ENABLE_FAILED (INTERNET_ERROR_BASE + 149)
#define ERROR_INTERNET_OFFLINE ERROR_INTERNET_DISCONNECTED
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View file

@ -5,4 +5,4 @@ files:
include/wininet.h: sdk/include/psdk/wininet.h include/wininet.h: sdk/include/psdk/wininet.h
include/winineti.h: sdk/include/psdk/winineti.h include/winineti.h: sdk/include/psdk/winineti.h
tags: tags:
wine: af9d246952b7aaf8f557ec1b85cbb4bce1245227 wine: 6b839a0f85236aac2cc794d5d586f1ba371866b1