Commit d7eec962 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Implement 'name' and 'nodeName' properties for doctype node.

parent 379b9f67
......@@ -155,8 +155,8 @@ static HRESULT WINAPI domdoctype_get_nodeName(
BSTR* p )
{
domdoctype *This = impl_from_IXMLDOMDocumentType( iface );
FIXME("(%p)->(%p): stub\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return node_get_nodeName(&This->node, p);
}
static HRESULT WINAPI domdoctype_get_nodeValue(
......@@ -489,8 +489,8 @@ static HRESULT WINAPI domdoctype_get_name(
BSTR *p)
{
domdoctype *This = impl_from_IXMLDOMDocumentType( iface );
FIXME("(%p)->(%p): stub\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return node_get_nodeName(&This->node, p);
}
static HRESULT WINAPI domdoctype_get_entities(
......
......@@ -8912,9 +8912,12 @@ static void test_appendChild(void)
static void test_get_doctype(void)
{
static const WCHAR emailW[] = {'e','m','a','i','l',0};
IXMLDOMDocumentType *doctype;
IXMLDOMDocument *doc;
VARIANT_BOOL b;
HRESULT hr;
BSTR s;
doc = create_document(&IID_IXMLDOMDocument);
......@@ -8926,6 +8929,28 @@ static void test_get_doctype(void)
ok(hr == S_FALSE, "got 0x%08x\n", hr);
ok(doctype == NULL, "got %p\n", doctype);
hr = IXMLDOMDocument_loadXML(doc, _bstr_(szEmailXML), &b);
ok(b == VARIANT_TRUE, "failed to load XML string\n");
doctype = NULL;
hr = IXMLDOMDocument_get_doctype(doc, &doctype);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(doctype != NULL, "got %p\n", doctype);
hr = IXMLDOMDocumentType_get_name(doctype, NULL);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
hr = IXMLDOMDocumentType_get_name(doctype, &s);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(!lstrcmpW(emailW, s), "got name %s\n", wine_dbgstr_w(s));
SysFreeString(s);
hr = IXMLDOMDocumentType_get_nodeName(doctype, &s);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(!lstrcmpW(emailW, s), "got name %s\n", wine_dbgstr_w(s));
SysFreeString(s);
IXMLDOMDocumentType_Release(doctype);
IXMLDOMDocument_Release(doc);
}
......
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