From 9aac2fcf55b262908677003a5edb729f05e5be61 Mon Sep 17 00:00:00 2001 From: Misha Koshelev Date: Sun, 12 Aug 2007 15:41:47 -0500 Subject: [PATCH] wininet/tests: Test that for an open HTTP connection InternetQueryDataAvailable succeeds or returns ERROR_IO_PENDING. --- dlls/wininet/tests/http.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 5d0b0bbb85d..b8d391c038b 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -397,7 +397,9 @@ static void InternetReadFile_test(int flags) if (flags & INTERNET_FLAG_ASYNC) SET_EXPECT(INTERNET_STATUS_REQUEST_COMPLETE); rc = InternetQueryDataAvailable(hor,&length,0x0,0x0); - ok(!(rc == 0 && length != 0),"InternetQueryDataAvailable failed\n"); + ok(!(rc == 0 && length != 0),"InternetQueryDataAvailable failed with non-zero length\n"); + ok(rc != 0 || ((flags & INTERNET_FLAG_ASYNC) && GetLastError() == ERROR_IO_PENDING), + "InternetQueryDataAvailable failed, error %d\n", GetLastError()); if (flags & INTERNET_FLAG_ASYNC) { if (rc != 0)