mshtml: Added IHTMLSelectElement::get_options implementation.

This commit is contained in:
Jacek Caban 2010-04-29 18:28:57 +02:00 committed by Alexandre Julliard
parent 78cf4e30b5
commit 21d7f6a7e6
2 changed files with 17 additions and 3 deletions

View File

@ -170,8 +170,12 @@ static HRESULT WINAPI HTMLSelectElement_get_name(IHTMLSelectElement *iface, BSTR
static HRESULT WINAPI HTMLSelectElement_get_options(IHTMLSelectElement *iface, IDispatch **p)
{
HTMLSelectElement *This = HTMLSELECT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
*p = (IDispatch*)HTMLSELECT(This);
IDispatch_AddRef(*p);
return S_OK;
}
static HRESULT WINAPI HTMLSelectElement_put_onchange(IHTMLSelectElement *iface, VARIANT v)

View File

@ -508,7 +508,7 @@ static void _test_ifaces(unsigned line, IUnknown *iface, REFIID *iids)
}
}
#define test_get_dispid(u,id) _test_disp(__LINE__,u,id)
#define test_get_dispid(u,id) _test_get_dispid(__LINE__,u,id)
static BOOL _test_get_dispid(unsigned line, IUnknown *unk, IID *iid)
{
IDispatchEx *dispex;
@ -2776,6 +2776,9 @@ static IHTMLElement *get_doc_elem_by_id(IHTMLDocument2 *doc, const char *id)
static void test_select_elem(IHTMLSelectElement *select)
{
IDispatch *disp;
HRESULT hres;
test_select_type(select, "select-one");
test_select_length(select, 2);
test_select_selidx(select, 0);
@ -2787,6 +2790,13 @@ static void test_select_elem(IHTMLSelectElement *select)
test_select_get_disabled(select, VARIANT_FALSE);
test_select_set_disabled(select, VARIANT_TRUE);
test_select_set_disabled(select, VARIANT_FALSE);
disp = NULL;
hres = IHTMLSelectElement_get_options(select, &disp);
ok(hres == S_OK, "get_options failed: %08x\n", hres);
ok(disp != NULL, "options == NULL\n");
ok(iface_cmp((IUnknown*)disp, (IUnknown*)select), "disp != select\n");
IDispatch_Release(disp);
}
static void test_create_option_elem(IHTMLDocument2 *doc)