mshtml: Added IHTMLTextAreaElement_get_type implementation.

This commit is contained in:
Piotr Caban 2010-10-28 00:30:55 +02:00 committed by Alexandre Julliard
parent ac7e096c00
commit 90edfe08d4
2 changed files with 24 additions and 2 deletions

View File

@ -97,9 +97,16 @@ static HRESULT WINAPI HTMLTextAreaElement_Invoke(IHTMLTextAreaElement *iface, DI
static HRESULT WINAPI HTMLTextAreaElement_get_type(IHTMLTextAreaElement *iface, BSTR *p)
{
static const WCHAR textareaW[] = {'t','e','x','t','a','r','e','a',0};
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
*p = SysAllocString(textareaW);
if(!*p)
return E_OUTOFMEMORY;
return S_OK;
}
static HRESULT WINAPI HTMLTextAreaElement_put_value(IHTMLTextAreaElement *iface, BSTR v)

View File

@ -1240,6 +1240,20 @@ static void _test_textarea_put_readonly(unsigned line, IUnknown *unk, VARIANT_BO
_test_textarea_readonly(line, unk, b);
}
#define test_textarea_type(t) _test_textarea_type(__LINE__,t)
static void _test_textarea_type(unsigned line, IUnknown *unk)
{
IHTMLTextAreaElement *textarea = _get_textarea_iface(line, unk);
BSTR type = (void*)0xdeadbeef;
HRESULT hres;
hres = IHTMLTextAreaElement_get_type(textarea, &type);
IHTMLTextAreaElement_Release(textarea);
ok_(__FILE__,line)(hres == S_OK, "get_type failed: %08x\n", hres);
ok_(__FILE__,line)(!strcmp_wa(type, "textarea"), "type = %s, expected textarea\n", wine_dbgstr_w(type));
SysFreeString(type);
}
#define test_comment_text(c,t) _test_comment_text(__LINE__,c,t)
static void _test_comment_text(unsigned line, IUnknown *unk, const char *extext)
{
@ -6380,6 +6394,7 @@ static void test_elems2(IHTMLDocument2 *doc)
test_textarea_readonly((IUnknown*)elem, VARIANT_FALSE);
test_textarea_put_readonly((IUnknown*)elem, VARIANT_TRUE);
test_textarea_put_readonly((IUnknown*)elem, VARIANT_FALSE);
test_textarea_type((IUnknown*)elem);
IHTMLElement_Release(elem);
}