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
a0e7b3b9
Commit
a0e7b3b9
authored
Aug 30, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/tests: Tests for IXMLDOMText::splitText(), stub is extended a bit.
parent
92a574b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
3 deletions
+56
-3
domdoc.c
dlls/msxml3/tests/domdoc.c
+41
-1
text.c
dlls/msxml3/text.c
+15
-2
No files found.
dlls/msxml3/tests/domdoc.c
View file @
a0e7b3b9
...
...
@@ -5614,7 +5614,7 @@ static void test_splitText(void)
IXMLDOMCDATASection
*
cdata
;
IXMLDOMElement
*
root
;
IXMLDOMDocument
*
doc
;
IXMLDOMText
*
text
;
IXMLDOMText
*
text
,
*
text2
;
IXMLDOMNode
*
node
;
VARIANT
var
;
VARIANT_BOOL
success
;
...
...
@@ -5684,6 +5684,46 @@ static void test_splitText(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IXMLDOMNode_Release
(
node
);
/* split new text node */
hr
=
IXMLDOMText_get_length
(
text
,
&
length
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
node
=
(
void
*
)
0xdeadbeef
;
hr
=
IXMLDOMText_get_nextSibling
(
text
,
&
node
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
ok
(
node
==
0
,
"got %p
\n
"
,
text
);
hr
=
IXMLDOMText_splitText
(
text
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
text2
=
(
void
*
)
0xdeadbeef
;
/* negative offset */
hr
=
IXMLDOMText_splitText
(
text
,
-
1
,
&
text2
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
ok
(
text2
==
(
void
*
)
0xdeadbeef
,
"got %p
\n
"
,
text2
);
text2
=
(
void
*
)
0xdeadbeef
;
/* offset outside data */
hr
=
IXMLDOMText_splitText
(
text
,
length
+
1
,
&
text2
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
ok
(
text2
==
0
,
"got %p
\n
"
,
text2
);
text2
=
(
void
*
)
0xdeadbeef
;
/* offset outside data */
hr
=
IXMLDOMText_splitText
(
text
,
length
,
&
text2
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
ok
(
text2
==
0
,
"got %p
\n
"
,
text
);
text2
=
0
;
hr
=
IXMLDOMText_splitText
(
text
,
4
,
&
text2
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
text2
)
IXMLDOMText_Release
(
text2
);
node
=
0
;
hr
=
IXMLDOMText_get_nextSibling
(
text
,
&
node
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
node
)
IXMLDOMNode_Release
(
node
);
IXMLDOMText_Release
(
text
);
IXMLDOMElement_Release
(
root
);
IXMLDOMCDATASection_Release
(
cdata
);
...
...
dlls/msxml3/text.c
View file @
a0e7b3b9
...
...
@@ -726,11 +726,24 @@ static HRESULT WINAPI domtext_splitText(
LONG
offset
,
IXMLDOMText
**
txtNode
)
{
domtext
*
This
=
impl_from_IXMLDOMText
(
iface
);
FIXME
(
"(%p)->(%d %p)
\n
"
,
This
,
offset
,
txtNode
);
LONG
length
=
0
;
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
offset
,
txtNode
);
if
(
!
txtNode
||
offset
<
0
)
return
E_INVALIDARG
;
*
txtNode
=
NULL
;
IXMLDOMText_get_length
(
iface
,
&
length
);
if
(
offset
>
length
)
return
E_INVALIDARG
;
if
(
offset
==
length
)
return
S_FALSE
;
FIXME
(
"adjacent text nodes are not supported
\n
"
);
return
E_NOTIMPL
;
}
static
const
struct
IXMLDOMTextVtbl
domtext_vtbl
=
{
domtext_QueryInterface
,
...
...
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