mshtml: Implement HTMLDOMAttribute2's name property.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2022-05-19 21:06:36 +03:00 committed by Alexandre Julliard
parent 2a1aaa7e6c
commit 76f5875c9f
2 changed files with 12 additions and 2 deletions

View File

@ -285,8 +285,10 @@ static HRESULT WINAPI HTMLDOMAttribute2_Invoke(IHTMLDOMAttribute2 *iface, DISPID
static HRESULT WINAPI HTMLDOMAttribute2_get_name(IHTMLDOMAttribute2 *iface, BSTR *p) static HRESULT WINAPI HTMLDOMAttribute2_get_name(IHTMLDOMAttribute2 *iface, BSTR *p)
{ {
HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface); HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, p);
return IHTMLDOMAttribute_get_nodeName(&This->IHTMLDOMAttribute_iface, p);
} }
static HRESULT WINAPI HTMLDOMAttribute2_put_value(IHTMLDOMAttribute2 *iface, BSTR v) static HRESULT WINAPI HTMLDOMAttribute2_put_value(IHTMLDOMAttribute2 *iface, BSTR v)

View File

@ -3614,6 +3614,7 @@ static void test_dynamic_properties(IHTMLElement *elem)
#define test_attr_node_name(a,b) _test_attr_node_name(__LINE__,a,b) #define test_attr_node_name(a,b) _test_attr_node_name(__LINE__,a,b)
static void _test_attr_node_name(unsigned line, IHTMLDOMAttribute *attr, const WCHAR *exname) static void _test_attr_node_name(unsigned line, IHTMLDOMAttribute *attr, const WCHAR *exname)
{ {
IHTMLDOMAttribute2 *attr2 = _get_attr2_iface(line, (IUnknown*)attr);
BSTR str; BSTR str;
HRESULT hres; HRESULT hres;
@ -3621,6 +3622,13 @@ static void _test_attr_node_name(unsigned line, IHTMLDOMAttribute *attr, const W
ok_(__FILE__,line)(hres == S_OK, "get_nodeName failed: %08lx\n", hres); ok_(__FILE__,line)(hres == S_OK, "get_nodeName failed: %08lx\n", hres);
ok_(__FILE__,line)(!lstrcmpW(str, exname), "node name is %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(exname)); ok_(__FILE__,line)(!lstrcmpW(str, exname), "node name is %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(exname));
SysFreeString(str); SysFreeString(str);
hres = IHTMLDOMAttribute2_get_name(attr2, &str);
ok_(__FILE__,line)(hres == S_OK, "get_name failed: %08lx\n", hres);
ok_(__FILE__,line)(!lstrcmpW(str, exname), "name is %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(exname));
SysFreeString(str);
IHTMLDOMAttribute2_Release(attr2);
} }
#define test_attr_parent(a) _test_attr_parent(__LINE__,a) #define test_attr_parent(a) _test_attr_parent(__LINE__,a)