Misha Koshelev : wininet/tests: Test that for an open HTTP connection InternetQueryDataAvailable succeeds or returns ERROR_IO_PENDING .

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 13 06:31:52 CDT 2007


Module: wine
Branch: master
Commit: 9aac2fcf55b262908677003a5edb729f05e5be61
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9aac2fcf55b262908677003a5edb729f05e5be61

Author: Misha Koshelev <mk144210 at bcm.edu>
Date:   Sun Aug 12 15:41:47 2007 -0500

wininet/tests: Test that for an open HTTP connection InternetQueryDataAvailable succeeds or returns ERROR_IO_PENDING.

---

 dlls/wininet/tests/http.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 5d0b0bb..b8d391c 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)




More information about the wine-cvs mailing list