forked from Mirrors/wine-wine
mshtml: Added IHTMLInputElement::put_checked implementation.
parent
3600fb3b56
commit
fa57703266
|
@ -415,8 +415,17 @@ static HRESULT WINAPI HTMLInputElement_get_defaultChecked(IHTMLInputElement *ifa
|
||||||
static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v)
|
static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v)
|
||||||
{
|
{
|
||||||
HTMLInputElement *This = HTMLINPUT_THIS(iface);
|
HTMLInputElement *This = HTMLINPUT_THIS(iface);
|
||||||
FIXME("(%p)->(%x)\n", This, v);
|
nsresult nsres;
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("(%p)->(%x)\n", This, v);
|
||||||
|
|
||||||
|
nsres = nsIDOMHTMLInputElement_SetChecked(This->nsinput, v != VARIANT_FALSE);
|
||||||
|
if(NS_FAILED(nsres)) {
|
||||||
|
ERR("SetChecked failed: %08x\n", nsres);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p)
|
static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p)
|
||||||
|
|
|
@ -1427,6 +1427,28 @@ static void _test_input_set_defaultchecked(unsigned line, IHTMLInputElement *inp
|
||||||
_test_input_get_defaultchecked(line, input, b);
|
_test_input_get_defaultchecked(line, input, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define test_input_get_checked(i,b) _test_input_get_checked(__LINE__,i,b)
|
||||||
|
static void _test_input_get_checked(unsigned line, IHTMLInputElement *input, VARIANT_BOOL exb)
|
||||||
|
{
|
||||||
|
VARIANT_BOOL checked = 100;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
hres = IHTMLInputElement_get_checked(input, &checked);
|
||||||
|
ok_(__FILE__,line) (hres == S_OK, "get_checked failed: %08x\n", hres);
|
||||||
|
ok_(__FILE__,line) (checked == exb, "checked=%x, expected %x\n", checked, exb);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define test_input_set_checked(i,b) _test_input_set_checked(__LINE__,i,b)
|
||||||
|
static void _test_input_set_checked(unsigned line, IHTMLInputElement *input, VARIANT_BOOL b)
|
||||||
|
{
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
hres = IHTMLInputElement_put_checked(input, b);
|
||||||
|
ok_(__FILE__,line) (hres == S_OK, "get_checked failed: %08x\n", hres);
|
||||||
|
|
||||||
|
_test_input_get_checked(line, input, b);
|
||||||
|
}
|
||||||
|
|
||||||
#define test_input_value(o,t) _test_input_value(__LINE__,o,t)
|
#define test_input_value(o,t) _test_input_value(__LINE__,o,t)
|
||||||
static void _test_input_value(unsigned line, IUnknown *unk, const char *exval)
|
static void _test_input_value(unsigned line, IUnknown *unk, const char *exval)
|
||||||
{
|
{
|
||||||
|
@ -3164,6 +3186,10 @@ static void test_elems(IHTMLDocument2 *doc)
|
||||||
test_input_set_defaultchecked(input, VARIANT_TRUE);
|
test_input_set_defaultchecked(input, VARIANT_TRUE);
|
||||||
test_input_set_defaultchecked(input, VARIANT_FALSE);
|
test_input_set_defaultchecked(input, VARIANT_FALSE);
|
||||||
|
|
||||||
|
test_input_get_checked(input, VARIANT_FALSE);
|
||||||
|
test_input_set_checked(input, VARIANT_TRUE);
|
||||||
|
test_input_set_checked(input, VARIANT_FALSE);
|
||||||
|
|
||||||
IHTMLInputElement_Release(input);
|
IHTMLInputElement_Release(input);
|
||||||
IHTMLElement_Release(elem);
|
IHTMLElement_Release(elem);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue