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

This commit is contained in:
Nikolay Sivov 2014-10-07 18:15:42 +04:00 committed by Alexandre Julliard
parent 379b9f6775
commit d7eec962e2
2 changed files with 29 additions and 4 deletions

View File

@ -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(

View File

@ -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);
}