mshtml: Added IHTMLFormElement::reset method implementation.

This commit is contained in:
Zhenbo Li 2014-07-17 23:48:36 +08:00 committed by Alexandre Julliard
parent 1b1ea639cd
commit d734935a2c
2 changed files with 22 additions and 2 deletions

View File

@ -436,8 +436,16 @@ static HRESULT WINAPI HTMLFormElement_submit(IHTMLFormElement *iface)
static HRESULT WINAPI HTMLFormElement_reset(IHTMLFormElement *iface) static HRESULT WINAPI HTMLFormElement_reset(IHTMLFormElement *iface)
{ {
HTMLFormElement *This = impl_from_IHTMLFormElement(iface); HTMLFormElement *This = impl_from_IHTMLFormElement(iface);
FIXME("(%p)->()\n", This); nsresult nsres;
return E_NOTIMPL;
TRACE("(%p)->()\n", This);
nsres = nsIDOMHTMLFormElement_Reset(This->nsform);
if (NS_FAILED(nsres)) {
ERR("Reset failed: %08x\n", nsres);
return E_FAIL;
}
return S_OK;
} }
static HRESULT WINAPI HTMLFormElement_put_length(IHTMLFormElement *iface, LONG v) static HRESULT WINAPI HTMLFormElement_put_length(IHTMLFormElement *iface, LONG v)

View File

@ -3764,6 +3764,17 @@ static void _test_form_elements(unsigned line, IUnknown *unk)
IHTMLFormElement_Release(form); IHTMLFormElement_Release(form);
} }
#define test_form_reset(a) _test_form_reset(__LINE__,a)
static void _test_form_reset(unsigned line, IUnknown *unk)
{
IHTMLFormElement *form = _get_form_iface(line, unk);
HRESULT hres;
hres = IHTMLFormElement_reset(form);
ok_(__FILE__,line)(hres == S_OK, "reset failed: %08x\n", hres);
IHTMLFormElement_Release(form);
}
#define test_meta_name(a,b) _test_meta_name(__LINE__,a,b) #define test_meta_name(a,b) _test_meta_name(__LINE__,a,b)
static void _test_meta_name(unsigned line, IUnknown *unk, const char *exname) static void _test_meta_name(unsigned line, IUnknown *unk, const char *exname)
{ {
@ -7330,6 +7341,7 @@ static void test_elems2(IHTMLDocument2 *doc)
test_form_put_encoding((IUnknown*)elem, E_INVALIDARG, "image/png"); test_form_put_encoding((IUnknown*)elem, E_INVALIDARG, "image/png");
test_form_encoding((IUnknown*)elem, "multipart/form-data"); test_form_encoding((IUnknown*)elem, "multipart/form-data");
test_form_elements((IUnknown*)elem); test_form_elements((IUnknown*)elem);
test_form_reset((IUnknown*)elem);
IHTMLElement_Release(elem); IHTMLElement_Release(elem);
} }