Module: wine Branch: master Commit: dc9f5becd16272a7bb814120eeef15222fa16cb2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=dc9f5becd16272a7bb814120ee...
Author: Bruno Jesus 00cpxxx@gmail.com Date: Thu Aug 16 22:39:30 2012 -0300
wininet/tests: Add invalid index test for HttpQueryInfo.
---
dlls/wininet/tests/http.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 84e7882..acbaf2e 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -2614,6 +2614,14 @@ static void test_HttpQueryInfo(int port) ok(ret, "HttpQueryInfo failed %u\n", GetLastError()); ok(index == 0, "expected 0 got %u\n", index);
+ index = 0xdeadbeef; /* invalid start index */ + size = sizeof(buffer); + ret = HttpQueryInfo(hr, HTTP_QUERY_RAW_HEADERS, buffer, &size, &index); + todo_wine ok(!ret, "HttpQueryInfo should have failed\n"); + todo_wine ok(GetLastError() == ERROR_HTTP_HEADER_NOT_FOUND, + "Expected ERROR_HTTP_HEADER_NOT_FOUND, got %u\n", GetLastError()); + + index = 0; size = sizeof(buffer); ret = HttpQueryInfo(hr, HTTP_QUERY_RAW_HEADERS_CRLF, buffer, &size, &index); ok(ret, "HttpQueryInfo failed %u\n", GetLastError());