msxml3/tests: Added invalid host XHR tests.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2018-03-27 18:20:19 +02:00 committed by Alexandre Julliard
parent f6b5b31083
commit 35bd57ec5e
1 changed files with 24 additions and 0 deletions

View File

@ -1786,6 +1786,18 @@ static void test_XMLHTTP(void)
ok(str && *str, "Expected response headers.\n");
SysFreeString(str);
IXMLHttpRequest_Release(xhr);
/* invalid host */
xhr = create_xhr();
test_open(xhr, "GET", "http://invalid.host.test.winehq.org/test/path", S_OK);
V_VT(&varbody) = VT_EMPTY;
hr = IXMLHttpRequest_send(xhr, varbody);
todo_wine
ok(hr == INET_E_RESOURCE_NOT_FOUND, "send to invalid host returned %#x.\n", hr);
IXMLHttpRequest_Release(xhr);
free_bstrs();
}
@ -1818,6 +1830,18 @@ static void test_server_xhr(void)
ok(!strcmp_wa(response, xmltestbodyA), "got %s\n", wine_dbgstr_w(response));
SysFreeString(response);
IServerXMLHTTPRequest_Release(xhr);
/* invalid host */
xhr = create_server_xhr();
test_server_open(xhr, "GET", "http://invalid.host.test.winehq.org/test/path", S_OK);
V_VT(&body) = VT_EMPTY;
hr = IServerXMLHTTPRequest_send(xhr, body);
todo_wine
ok(hr == WININET_E_NAME_NOT_RESOLVED, "send to invalid host returned %#x.\n", hr);
IServerXMLHTTPRequest_Release(xhr);
free_bstrs();
}