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
398e6494
Commit
398e6494
authored
Sep 06, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/tests: Basic test for ::setAttributeNode().
parent
97e78d9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
1 deletion
+56
-1
element.c
dlls/msxml3/element.c
+4
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+52
-1
No files found.
dlls/msxml3/element.c
View file @
398e6494
...
...
@@ -661,7 +661,11 @@ static HRESULT WINAPI domelem_setAttributeNode(
IXMLDOMAttribute
**
attributeNode
)
{
domelem
*
This
=
impl_from_IXMLDOMElement
(
iface
);
FIXME
(
"(%p)->(%p %p)
\n
"
,
This
,
domAttribute
,
attributeNode
);
if
(
!
domAttribute
)
return
E_INVALIDARG
;
return
E_NOTIMPL
;
}
...
...
dlls/msxml3/tests/domdoc.c
View file @
398e6494
...
...
@@ -5932,6 +5932,57 @@ static void test_get_ownerDocument(void)
free_bstrs
();
}
static
void
test_setAttributeNode
(
void
)
{
IXMLDOMDocument
*
doc
;
IXMLDOMElement
*
elem
;
IXMLDOMAttribute
*
attr
,
*
attr2
,
*
ret_attr
;
VARIANT_BOOL
b
;
HRESULT
hr
;
BSTR
str
;
doc
=
create_document
(
&
IID_IXMLDOMDocument
);
if
(
!
doc
)
return
;
str
=
SysAllocString
(
szComplete4
);
hr
=
IXMLDOMDocument2_loadXML
(
doc
,
str
,
&
b
);
ok
(
hr
==
S_OK
,
"loadXML failed
\n
"
);
ok
(
b
==
VARIANT_TRUE
,
"failed to load XML string
\n
"
);
SysFreeString
(
str
);
hr
=
IXMLDOMDocument_get_documentElement
(
doc
,
&
elem
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ret_attr
=
(
void
*
)
0xdeadbeef
;
hr
=
IXMLDOMElement_setAttributeNode
(
elem
,
NULL
,
&
ret_attr
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
ok
(
ret_attr
==
(
void
*
)
0xdeadbeef
,
"got %p
\n
"
,
ret_attr
);
hr
=
IXMLDOMDocument_createAttribute
(
doc
,
_bstr_
(
"attr"
),
&
attr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ret_attr
=
(
void
*
)
0xdeadbeef
;
hr
=
IXMLDOMElement_setAttributeNode
(
elem
,
attr
,
&
ret_attr
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
ret_attr
==
NULL
,
"got %p
\n
"
,
ret_attr
);
attr2
=
NULL
;
hr
=
IXMLDOMElement_getAttributeNode
(
elem
,
_bstr_
(
"attr"
),
&
attr2
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
attr2
)
IXMLDOMAttribute_Release
(
attr2
);
/* try to add it another time */
ret_attr
=
(
void
*
)
0xdeadbeef
;
hr
=
IXMLDOMElement_setAttributeNode
(
elem
,
attr
,
&
ret_attr
);
todo_wine
ok
(
hr
==
E_FAIL
,
"got 0x%08x
\n
"
,
hr
);
ok
(
ret_attr
==
(
void
*
)
0xdeadbeef
,
"got %p
\n
"
,
ret_attr
);
IXMLDOMAttribute_Release
(
attr
);
IXMLDOMElement_Release
(
elem
);
IXMLDOMDocument_Release
(
doc
);
free_bstrs
();
}
START_TEST
(
domdoc
)
{
IXMLDOMDocument
*
doc
;
...
...
@@ -5951,7 +6002,6 @@ START_TEST(domdoc)
return
;
}
IXMLDOMDocument_Release
(
doc
);
test_domdoc
();
...
...
@@ -5985,6 +6035,7 @@ START_TEST(domdoc)
test_getQualifiedItem
();
test_removeQualifiedItem
();
test_get_ownerDocument
();
test_setAttributeNode
();
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