Commit 06ce49c8 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLImgElement::get_complete implementation.

parent 1dae62f0
......@@ -358,8 +358,19 @@ static HRESULT WINAPI HTMLImgElement_get_readyState(IHTMLImgElement *iface, BSTR
static HRESULT WINAPI HTMLImgElement_get_complete(IHTMLImgElement *iface, VARIANT_BOOL *p)
{
HTMLImgElement *This = impl_from_IHTMLImgElement(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
cpp_bool complete;
nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsres = nsIDOMHTMLImageElement_GetComplete(This->nsimg, &complete);
if(NS_FAILED(nsres)) {
ERR("GetComplete failed: %08x\n", nsres);
return E_FAIL;
}
*p = complete ? VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
}
static HRESULT WINAPI HTMLImgElement_put_loop(IHTMLImgElement *iface, VARIANT v)
......
......@@ -2504,6 +2504,19 @@ static void _test_img_name(unsigned line, IUnknown *unk, const char *pValue)
SysFreeString(sName);
}
#define test_img_complete(a,b) _test_img_complete(__LINE__,a,b)
static void _test_img_complete(unsigned line, IHTMLElement *elem, VARIANT_BOOL exb)
{
IHTMLImgElement *img = _get_img_iface(line, (IUnknown*)elem);
VARIANT_BOOL b = 100;
HRESULT hres;
hres = IHTMLImgElement_get_complete(img, &b);
ok_(__FILE__,line) (hres == S_OK, "get_complete failed: %08x\n", hres);
ok_(__FILE__,line) (b == exb, "complete = %x, expected %x\n", b, exb);
IHTMLImgElement_Release(img);
}
static void test_dynamic_properties(IHTMLElement *elem)
{
static const WCHAR attr1W[] = {'a','t','t','r','1',0};
......@@ -5703,6 +5716,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_img_alt((IUnknown*)elem, NULL);
test_img_set_alt((IUnknown*)elem, "alt test");
test_img_name((IUnknown*)elem, "WineImg");
test_img_complete(elem, VARIANT_FALSE);
IHTMLElement_Release(elem);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment