mshtml: Add IHTMLXMLHttpRequest::status property implementation.
This commit is contained in:
parent
4ea5d00e58
commit
21043e5acf
|
@ -449,12 +449,12 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const char *xml_url)
|
||||||
ok(val == 0, "Expect UNSENT, got %d\n", val);
|
ok(val == 0, "Expect UNSENT, got %d\n", val);
|
||||||
|
|
||||||
hres = IHTMLXMLHttpRequest_get_status(xhr, NULL);
|
hres = IHTMLXMLHttpRequest_get_status(xhr, NULL);
|
||||||
todo_wine ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
|
ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
|
||||||
|
|
||||||
val = 0xdeadbeef;
|
val = 0xdeadbeef;
|
||||||
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
|
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
|
||||||
todo_wine ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
|
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
|
||||||
todo_wine ok(val == 0, "Expect 0, got %d\n", val);
|
ok(val == 0, "Expect 0, got %d\n", val);
|
||||||
|
|
||||||
hres = IHTMLXMLHttpRequest_get_statusText(xhr, NULL);
|
hres = IHTMLXMLHttpRequest_get_statusText(xhr, NULL);
|
||||||
todo_wine ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
|
todo_wine ok(hres == E_POINTER, "Expect E_POINTER, got %08x\n", hres);
|
||||||
|
@ -561,8 +561,8 @@ static void test_async_xhr(IHTMLDocument2 *doc, const char *xml_url)
|
||||||
|
|
||||||
val = 0xdeadbeef;
|
val = 0xdeadbeef;
|
||||||
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
|
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
|
||||||
todo_wine ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
|
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
|
||||||
todo_wine ok(val == 0, "Expect 0, got %d\n", val);
|
ok(val == 0, "Expect 0, got %d\n", val);
|
||||||
|
|
||||||
text = (BSTR)0xdeadbeef;
|
text = (BSTR)0xdeadbeef;
|
||||||
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
|
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
|
||||||
|
@ -596,8 +596,8 @@ static void test_async_xhr(IHTMLDocument2 *doc, const char *xml_url)
|
||||||
|
|
||||||
val = 0xdeadbeef;
|
val = 0xdeadbeef;
|
||||||
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
|
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
|
||||||
todo_wine ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
|
ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
|
||||||
todo_wine ok(val == 0, "Expect 0, got %d\n", val);
|
ok(val == 0, "Expect 0, got %d\n", val);
|
||||||
|
|
||||||
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
|
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
|
||||||
todo_wine ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
|
todo_wine ok(hres == E_FAIL, "Expect E_FAIL, got: %08x\n", hres);
|
||||||
|
@ -630,8 +630,8 @@ static void test_async_xhr(IHTMLDocument2 *doc, const char *xml_url)
|
||||||
|
|
||||||
val = 0xdeadbeef;
|
val = 0xdeadbeef;
|
||||||
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
|
hres = IHTMLXMLHttpRequest_get_status(xhr, &val);
|
||||||
todo_wine ok(hres == S_OK, "get_status failed: %08x\n", hres);
|
ok(hres == S_OK, "get_status failed: %08x\n", hres);
|
||||||
todo_wine ok(val == 200, "Expect 200, got %d\n", val);
|
ok(val == 200, "Expect 200, got %d\n", val);
|
||||||
|
|
||||||
text = NULL;
|
text = NULL;
|
||||||
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
|
hres = IHTMLXMLHttpRequest_get_statusText(xhr, &text);
|
||||||
|
|
|
@ -312,8 +312,23 @@ static HRESULT WINAPI HTMLXMLHttpRequest_get_responseXML(IHTMLXMLHttpRequest *if
|
||||||
static HRESULT WINAPI HTMLXMLHttpRequest_get_status(IHTMLXMLHttpRequest *iface, LONG *p)
|
static HRESULT WINAPI HTMLXMLHttpRequest_get_status(IHTMLXMLHttpRequest *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface);
|
HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
DWORD val;
|
||||||
return E_NOTIMPL;
|
nsresult nsres;
|
||||||
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
if(!p)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
nsres = nsIXMLHttpRequest_GetStatus(This->nsxhr, &val);
|
||||||
|
if(NS_FAILED(nsres)) {
|
||||||
|
ERR("nsIXMLHttpRequest_GetStatus failed: %08x\n", nsres);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
*p = val;
|
||||||
|
if(val == 0)
|
||||||
|
return E_FAIL; /* WinAPI thinks this is an error */
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLXMLHttpRequest_get_statusText(IHTMLXMLHttpRequest *iface, BSTR *p)
|
static HRESULT WINAPI HTMLXMLHttpRequest_get_statusText(IHTMLXMLHttpRequest *iface, BSTR *p)
|
||||||
|
|
Loading…
Reference in New Issue