Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f9f43118
Commit
f9f43118
authored
Mar 07, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implemented get_doctype() with basic tests.
parent
46fa4791
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
7 deletions
+56
-7
domdoc.c
dlls/msxml3/domdoc.c
+21
-3
domdoc.c
dlls/msxml3/tests/domdoc.c
+35
-4
No files found.
dlls/msxml3/domdoc.c
View file @
f9f43118
...
...
@@ -1517,11 +1517,29 @@ static HRESULT WINAPI domdoc_transformNodeToObject(
static
HRESULT
WINAPI
domdoc_get_doctype
(
IXMLDOMDocument3
*
iface
,
IXMLDOMDocumentType
**
doc
umentT
ype
)
IXMLDOMDocumentType
**
doc
t
ype
)
{
domdoc
*
This
=
impl_from_IXMLDOMDocument3
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
IXMLDOMNode
*
node
;
xmlDtdPtr
dtd
;
HRESULT
hr
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
doctype
);
if
(
!
doctype
)
return
E_INVALIDARG
;
*
doctype
=
NULL
;
dtd
=
xmlGetIntSubset
(
get_doc
(
This
));
if
(
!
dtd
)
return
S_FALSE
;
node
=
create_node
((
xmlNodePtr
)
dtd
);
if
(
!
node
)
return
S_FALSE
;
hr
=
IXMLDOMNode_QueryInterface
(
node
,
&
IID_IXMLDOMDocumentType
,
(
void
**
)
doctype
);
IXMLDOMNode_Release
(
node
);
return
hr
;
}
...
...
dlls/msxml3/tests/domdoc.c
View file @
f9f43118
...
...
@@ -6009,9 +6009,9 @@ static const nodetypedvalue_t get_nodetypedvalue[] = {
static
void
test_nodeTypedValue
(
void
)
{
const
nodetypedvalue_t
*
entry
=
get_nodetypedvalue
;
IXMLDOMDocumentType
*
doctype
,
*
doctype2
;
IXMLDOMProcessingInstruction
*
pi
;
IXMLDOMDocumentFragment
*
frag
;
IXMLDOMDocumentType
*
doctype
;
IXMLDOMDocument
*
doc
,
*
doc2
;
IXMLDOMCDATASection
*
cdata
;
IXMLDOMComment
*
comment
;
...
...
@@ -6142,17 +6142,28 @@ static void test_nodeTypedValue(void)
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
b
==
VARIANT_TRUE
,
"got %d
\n
"
,
b
);
EXPECT_REF
(
doc2
,
1
);
hr
=
IXMLDOMDocument_get_doctype
(
doc2
,
&
doctype
);
todo_wine
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
EXPECT_REF
(
doc2
,
1
);
todo_wine
EXPECT_REF
(
doctype
,
2
);
{
V_VT
(
&
value
)
=
VT_EMPTY
;
hr
=
IXMLDOMDocumentType_get_nodeTypedValue
(
doctype
,
&
value
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
value
)
==
VT_NULL
,
"got %d
\n
"
,
V_VT
(
&
value
));
IXMLDOMDocumentType_Release
(
doctype
);
}
hr
=
IXMLDOMDocument_get_doctype
(
doc2
,
&
doctype2
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
doctype
!=
doctype2
,
"got %p, was %p
\n
"
,
doctype2
,
doctype
);
IXMLDOMDocumentType_Release
(
doctype2
);
IXMLDOMDocumentType_Release
(
doctype
);
IXMLDOMDocument_Release
(
doc2
);
while
(
entry
->
name
)
...
...
@@ -8383,6 +8394,25 @@ static void test_appendChild(void)
IXMLDOMDocument_Release
(
doc2
);
}
static
void
test_get_doctype
(
void
)
{
IXMLDOMDocumentType
*
doctype
;
IXMLDOMDocument
*
doc
;
HRESULT
hr
;
doc
=
create_document
(
&
IID_IXMLDOMDocument
);
hr
=
IXMLDOMDocument_get_doctype
(
doc
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
doctype
=
(
void
*
)
0xdeadbeef
;
hr
=
IXMLDOMDocument_get_doctype
(
doc
,
&
doctype
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
ok
(
doctype
==
NULL
,
"got %p
\n
"
,
doctype
);
IXMLDOMDocument_Release
(
doc
);
}
START_TEST
(
domdoc
)
{
IXMLDOMDocument
*
doc
;
...
...
@@ -8449,6 +8479,7 @@ START_TEST(domdoc)
test_get_xml
();
test_insertBefore
();
test_appendChild
();
test_get_doctype
();
test_xsltemplate
();
CoUninitialize
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment