Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/wininet/dialogs.c | 3 ++- dlls/wininet/tests/internet.c | 29 ++++++++++------------------- 2 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/dlls/wininet/dialogs.c b/dlls/wininet/dialogs.c index 25ed1f2a651..77cbbfb1337 100644 --- a/dlls/wininet/dialogs.c +++ b/dlls/wininet/dialogs.c @@ -536,7 +536,8 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest, res = ERROR_SUCCESS; break; default: - res = ERROR_CANCELLED; + res = (dwFlags & FLAGS_ERROR_UI_FILTER_FOR_ERRORS) ? ERROR_SUCCESS : ERROR_CANCELLED; + break; }
if(req) diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index f7d7f1f49d7..f97cfef03d7 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -1575,15 +1575,11 @@ static void test_InternetErrorDlg(void) ok(res == expected, "Got %d, expected %d (%d)\n", res, expected, i);
res = InternetErrorDlg(NULL, req, i, FLAGS_ERROR_UI_FILTER_FOR_ERRORS | FLAGS_ERROR_UI_FLAGS_NO_UI, NULL); - todo_wine_if(i != ERROR_INTERNET_INCORRECT_PASSWORD && i != ERROR_INTERNET_SEC_CERT_DATE_INVALID && - i != ERROR_INTERNET_SEC_CERT_CN_INVALID && i != ERROR_INTERNET_INVALID_CA && - i != ERROR_INTERNET_SEC_CERT_ERRORS && i != ERROR_INTERNET_SEC_CERT_REV_FAILED && - i != ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR && i != ERROR_INTERNET_POST_IS_NON_SECURE && - i != ERROR_INTERNET_MIXED_SECURITY && i != ERROR_INTERNET_CHG_POST_IS_NON_SECURE && - i != ERROR_INTERNET_POST_IS_NON_SECURE && i != ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED && - i != ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR && i != ERROR_INTERNET_INSERT_CDROM && - i != ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE && i != ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT && - i != ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT && i != ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION) + todo_wine_if(i == ERROR_INTERNET_MIXED_SECURITY || i == ERROR_INTERNET_CHG_POST_IS_NON_SECURE || + i == ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED || i == ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR || + i == ERROR_INTERNET_INSERT_CDROM || i == ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE || + i == ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION || i == ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT || + i == ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT || i == ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION) ok(res == expected2, "Got %d, expected %d (%d)\n", res, expected2, i);
/* With a null req */ @@ -1601,23 +1597,18 @@ static void test_InternetErrorDlg(void) ok(res == expected, "Got %d, expected %d (%d)\n", res, expected, i);
res = InternetErrorDlg(NULL, NULL, i, FLAGS_ERROR_UI_FILTER_FOR_ERRORS | FLAGS_ERROR_UI_FLAGS_NO_UI, NULL); - todo_wine_if(i != ERROR_INTERNET_SEC_CERT_DATE_INVALID && i != ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR && - i != ERROR_INTERNET_SEC_CERT_CN_INVALID && i != ERROR_INTERNET_INVALID_CA && - i != ERROR_INTERNET_SEC_CERT_ERRORS && i != ERROR_INTERNET_SEC_CERT_REV_FAILED && - i != ERROR_INTERNET_MIXED_SECURITY && i != ERROR_INTERNET_CHG_POST_IS_NON_SECURE && - i != ERROR_INTERNET_POST_IS_NON_SECURE && i != ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR && - i != ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE && i != ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT && - i != ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT && i != ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION && - i != ERROR_INTERNET_INCORRECT_PASSWORD) + todo_wine_if(i == ERROR_INTERNET_MIXED_SECURITY || i == ERROR_INTERNET_CHG_POST_IS_NON_SECURE || + i == ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED || i == ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR || + i == ERROR_INTERNET_INSERT_CDROM || i == ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE || + i == ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION || i == ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT || + i == ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT || i == ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION) ok(res == expected2, "Got %d, expected %d (%d)\n", res, expected2, i); }
res = InternetErrorDlg(NULL, req, 0xdeadbeef, FLAGS_ERROR_UI_FILTER_FOR_ERRORS | FLAGS_ERROR_UI_FLAGS_NO_UI, NULL); -todo_wine ok(res == ERROR_SUCCESS, "Got %d, expected ERROR_SUCCESS\n", res);
res = InternetErrorDlg(NULL, NULL, 0xdeadbeef, FLAGS_ERROR_UI_FILTER_FOR_ERRORS | FLAGS_ERROR_UI_FLAGS_NO_UI, NULL); -todo_wine ok(res == ERROR_SUCCESS, "Got %d, expected ERROR_SUCCESS\n", res);
res = InternetCloseHandle(req);