Commit 423b7ba1 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLDOMAttribute2::get_parentNode implementation.

parent 7ad4aeb7
...@@ -347,8 +347,11 @@ static HRESULT WINAPI HTMLDOMAttribute2_get_nodeType(IHTMLDOMAttribute2 *iface, ...@@ -347,8 +347,11 @@ static HRESULT WINAPI HTMLDOMAttribute2_get_nodeType(IHTMLDOMAttribute2 *iface,
static HRESULT WINAPI HTMLDOMAttribute2_get_parentNode(IHTMLDOMAttribute2 *iface, IHTMLDOMNode **p) static HRESULT WINAPI HTMLDOMAttribute2_get_parentNode(IHTMLDOMAttribute2 *iface, IHTMLDOMNode **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);
*p = NULL;
return S_OK;
} }
static HRESULT WINAPI HTMLDOMAttribute2_get_childNodes(IHTMLDOMAttribute2 *iface, IDispatch **p) static HRESULT WINAPI HTMLDOMAttribute2_get_childNodes(IHTMLDOMAttribute2 *iface, IDispatch **p)
......
...@@ -3402,6 +3402,19 @@ static void _test_attr_node_name(unsigned line, IHTMLDOMAttribute *attr, const c ...@@ -3402,6 +3402,19 @@ static void _test_attr_node_name(unsigned line, IHTMLDOMAttribute *attr, const c
SysFreeString(str); SysFreeString(str);
} }
#define test_attr_parent(a) _test_attr_parent(__LINE__,a)
static void _test_attr_parent(unsigned line, IHTMLDOMAttribute *attr)
{
IHTMLDOMAttribute2 *attr2 = _get_attr2_iface(line, (IUnknown*)attr);
IHTMLDOMNode *parent = (void*)0xdeadbeef;
HRESULT hres;
hres = IHTMLDOMAttribute2_get_parentNode(attr2, &parent);
ok_(__FILE__,line)(hres == S_OK, "get_parentNode failed: %08x\n", hres);
ok_(__FILE__,line)(!parent, "parent != NULL\n");
IHTMLDOMAttribute2_Release(attr2);
}
static void test_attr_collection_disp(IDispatch *disp) static void test_attr_collection_disp(IDispatch *disp)
{ {
IDispatchEx *dispex; IDispatchEx *dispex;
...@@ -8522,6 +8535,7 @@ static void test_attr(IHTMLDocument2 *doc, IHTMLElement *elem) ...@@ -8522,6 +8535,7 @@ static void test_attr(IHTMLDocument2 *doc, IHTMLElement *elem)
test_ifaces((IUnknown*)attr, attr_iids); test_ifaces((IUnknown*)attr, attr_iids);
test_no_iface((IUnknown*)attr, &IID_IHTMLDOMNode); test_no_iface((IUnknown*)attr, &IID_IHTMLDOMNode);
test_attr_specified(attr, VARIANT_TRUE); test_attr_specified(attr, VARIANT_TRUE);
test_attr_parent(attr);
attr2 = get_elem_attr_node((IUnknown*)elem, "id", TRUE); attr2 = get_elem_attr_node((IUnknown*)elem, "id", TRUE);
ok(iface_cmp((IUnknown*)attr, (IUnknown*)attr2), "attr != attr2\n"); ok(iface_cmp((IUnknown*)attr, (IUnknown*)attr2), "attr != attr2\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment