diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index f4d0b43b731..1682b0553aa 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -188,8 +188,9 @@ static BOOL proxy_active(void) return proxy_enable != 0; } -#define test_status_code(a,b) _test_status_code(__LINE__,a,b) -static void _test_status_code(unsigned line, HINTERNET req, DWORD excode) +#define test_status_code(a,b) _test_status_code(__LINE__,a,b, FALSE) +#define test_status_code_todo(a,b) _test_status_code(__LINE__,a,b, TRUE) +static void _test_status_code(unsigned line, HINTERNET req, DWORD excode, BOOL is_todo) { DWORD code, size, index; char exbuf[10], bufa[10]; @@ -200,7 +201,10 @@ static void _test_status_code(unsigned line, HINTERNET req, DWORD excode) size = sizeof(code); res = HttpQueryInfoA(req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &code, &size, NULL); ok_(__FILE__,line)(res, "[1] HttpQueryInfoA(HTTP_QUERY_STATUS_CODE|number) failed: %u\n", GetLastError()); - ok_(__FILE__,line)(code == excode, "code = %d, expected %d\n", code, excode); + if (is_todo) + todo_wine ok_(__FILE__,line)(code == excode, "code = %d, expected %d\n", code, excode); + else + ok_(__FILE__,line)(code == excode, "code = %d, expected %d\n", code, excode); ok_(__FILE__,line)(size == sizeof(code), "size = %u\n", size); code = 0xdeadbeef; @@ -208,8 +212,10 @@ static void _test_status_code(unsigned line, HINTERNET req, DWORD excode) size = sizeof(code); res = HttpQueryInfoA(req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &code, &size, &index); ok_(__FILE__,line)(res, "[2] HttpQueryInfoA(HTTP_QUERY_STATUS_CODE|number index) failed: %u\n", GetLastError()); - ok_(__FILE__,line)(code == excode, "code = %d, expected %d\n", code, excode); - ok_(__FILE__,line)(!index, "index = %d, expected 0\n", code); + if (is_todo) + todo_wine ok_(__FILE__,line)(code == excode, "code = %d, expected %d\n", code, excode); + else + ok_(__FILE__,line)(!index, "index = %d, expected 0\n", code); ok_(__FILE__,line)(size == sizeof(code), "size = %u\n", size); sprintf(exbuf, "%u", excode); @@ -217,7 +223,10 @@ static void _test_status_code(unsigned line, HINTERNET req, DWORD excode) size = sizeof(bufa); res = HttpQueryInfoA(req, HTTP_QUERY_STATUS_CODE, bufa, &size, NULL); ok_(__FILE__,line)(res, "[3] HttpQueryInfoA(HTTP_QUERY_STATUS_CODE) failed: %u\n", GetLastError()); - ok_(__FILE__,line)(!strcmp(bufa, exbuf), "unexpected status code %s, expected %s\n", bufa, exbuf); + if (is_todo) + todo_wine ok_(__FILE__,line)(!strcmp(bufa, exbuf), "unexpected status code %s, expected %s\n", bufa, exbuf); + else + ok_(__FILE__,line)(!strcmp(bufa, exbuf), "unexpected status code %s, expected %s\n", bufa, exbuf); ok_(__FILE__,line)(size == strlen(exbuf), "unexpected size %d for \"%s\"\n", size, exbuf); size = 0; @@ -229,7 +238,10 @@ static void _test_status_code(unsigned line, HINTERNET req, DWORD excode) size = sizeof(bufw); res = HttpQueryInfoW(req, HTTP_QUERY_STATUS_CODE, bufw, &size, NULL); ok_(__FILE__,line)(res, "[5] HttpQueryInfoW(HTTP_QUERY_STATUS_CODE) failed: %u\n", GetLastError()); - ok_(__FILE__,line)(!strcmp_wa(bufw, exbuf), "unexpected status code %s, expected %s\n", bufa, exbuf); + if (is_todo) + todo_wine ok_(__FILE__,line)(!strcmp_wa(bufw, exbuf), "unexpected status code %s, expected %s\n", bufa, exbuf); + else + ok_(__FILE__,line)(!strcmp_wa(bufw, exbuf), "unexpected status code %s, expected %s\n", bufa, exbuf); ok_(__FILE__,line)(size == strlen(exbuf)*sizeof(WCHAR), "unexpected size %d for \"%s\"\n", size, exbuf); size = 0; @@ -1810,6 +1822,18 @@ static const char page1[] = "
The quick brown fox jumped over the lazy dog\r\n" "