Module: wine Branch: master Commit: f3968fdf80fc15f12f8000640873b059adfd75ad URL: http://source.winehq.org/git/wine.git/?a=commit;h=f3968fdf80fc15f12f80006408...
Author: Juan Lang juan.lang@gmail.com Date: Mon Jun 7 13:41:40 2010 -0700
winhttp/tests: Skip tests when a connection fails.
---
dlls/winhttp/tests/winhttp.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 26477ee..05c548c 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -211,6 +211,11 @@ static void test_OpenRequest (void) ok(request != NULL, "WinHttpOpenrequest failed to open a request, error: %u.\n", GetLastError());
ret = WinHttpSendRequest(request, WINHTTP_NO_ADDITIONAL_HEADERS, 0, NULL, 0, 0, 0); + if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + { + skip("Connection failed, skipping.\n"); + goto done; + } ok(ret == TRUE, "WinHttpSendRequest failed: %u\n", GetLastError()); ret = WinHttpCloseHandle(request); ok(ret == TRUE, "WinHttpCloseHandle failed on closing request, got %d.\n", ret); @@ -781,6 +786,11 @@ static void test_secure_connection(void) ok(req != NULL, "failed to open a request %u\n", GetLastError());
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0); + if (!ret && GetLastError() == ERROR_WINHTTP_CANNOT_CONNECT) + { + skip("Connection failed, skipping.\n"); + goto cleanup; + } ok(ret, "failed to send request %u\n", GetLastError());
ret = WinHttpReceiveResponse(req, NULL);