Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ca046f9e
Commit
ca046f9e
authored
Jan 20, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: IXMLDOMSchemaCollection::get() is a stub for version 6.
parent
1ec21e32
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
127 additions
and
4 deletions
+127
-4
domdoc.c
dlls/msxml3/domdoc.c
+5
-2
schema.c
dlls/msxml3/schema.c
+5
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+81
-0
schema.c
dlls/msxml3/tests/schema.c
+36
-0
No files found.
dlls/msxml3/domdoc.c
View file @
ca046f9e
...
...
@@ -2508,10 +2508,13 @@ static HRESULT WINAPI domdoc_put_onTransformNode(
static
HRESULT
WINAPI
domdoc_get_namespaces
(
IXMLDOMDocument3
*
iface
,
IXMLDOMSchemaCollection
**
schemaC
ollection
)
IXMLDOMSchemaCollection
**
c
ollection
)
{
domdoc
*
This
=
impl_from_IXMLDOMDocument3
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
schemaCollection
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
collection
);
if
(
!
collection
)
return
E_POINTER
;
return
E_NOTIMPL
;
}
...
...
dlls/msxml3/schema.c
View file @
ca046f9e
...
...
@@ -1139,10 +1139,13 @@ static HRESULT WINAPI schema_cache_get(IXMLDOMSchemaCollection2* iface, BSTR uri
IXMLDOMNode
**
node
)
{
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection2
(
iface
);
xmlChar
*
name
;
cache_entry
*
entry
;
xmlChar
*
name
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
wine_dbgstr_w
(
uri
),
node
);
if
(
This
->
version
==
MSXML6
)
return
E_NOTIMPL
;
if
(
!
node
)
return
E_POINTER
;
...
...
@@ -1438,7 +1441,7 @@ HRESULT SchemaCache_create(MSXML_VERSION version, IUnknown* outer, void** obj)
#else
HRESULT
SchemaCache_create
(
MSXML_VERSION
version
,
IUnknown
*
pUnkOuter
,
void
**
ppO
bj
)
HRESULT
SchemaCache_create
(
MSXML_VERSION
version
,
IUnknown
*
outer
,
void
**
o
bj
)
{
MESSAGE
(
"This program tried to use a SchemaCache object, but
\n
"
"libxml2 support was not present at compile time.
\n
"
);
...
...
dlls/msxml3/tests/domdoc.c
View file @
ca046f9e
...
...
@@ -11140,6 +11140,86 @@ static void test_nodeValue(void)
IXMLDOMDocument_Release
(
doc
);
}
static
char
namespacesA
[]
=
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>"
" <ns1:elem1 xmlns:ns1=
\"
http://blah.org
\"
>"
" <ns1:elem2/>"
" <ns1:elem3/>"
" <ns1:elem4/>"
" <elem5 xmlns=
\"
http://blahblah.org
\"
/>"
" <ns1:elem6>true</ns1:elem6>"
" </ns1:elem1>"
;
static
void
test_get_namespaces
(
void
)
{
IXMLDOMSchemaCollection
*
collection
,
*
collection2
;
IXMLDOMDocument2
*
doc
;
IXMLDOMNode
*
node
;
VARIANT_BOOL
b
;
HRESULT
hr
;
LONG
len
;
doc
=
create_document
(
&
IID_IXMLDOMDocument2
);
if
(
!
doc
)
return
;
/* null pointer */
hr
=
IXMLDOMDocument2_get_namespaces
(
doc
,
NULL
);
EXPECT_HR
(
hr
,
E_POINTER
);
/* no document loaded */
collection
=
(
void
*
)
0xdeadbeef
;
hr
=
IXMLDOMDocument2_get_namespaces
(
doc
,
&
collection
);
todo_wine
EXPECT_HR
(
hr
,
S_OK
);
if
(
hr
!=
S_OK
)
{
IXMLDOMDocument_Release
(
doc
);
return
;
}
EXPECT_REF
(
collection
,
2
);
collection2
=
(
void
*
)
0xdeadbeef
;
hr
=
IXMLDOMDocument2_get_namespaces
(
doc
,
&
collection2
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
collection
==
collection2
,
"got %p
\n
"
,
collection2
);
EXPECT_REF
(
collection
,
3
);
IXMLDOMSchemaCollection_Release
(
collection
);
len
=
-
1
;
hr
=
IXMLDOMSchemaCollection_get_length
(
collection
,
&
len
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
len
==
0
,
"got %d
\n
"
,
len
);
IXMLDOMSchemaCollection_Release
(
collection
);
/* now with document */
hr
=
IXMLDOMDocument2_loadXML
(
doc
,
_bstr_
(
namespacesA
),
&
b
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
IXMLDOMDocument2_get_namespaces
(
doc
,
&
collection
);
EXPECT_HR
(
hr
,
S_OK
);
len
=
-
1
;
hr
=
IXMLDOMSchemaCollection_get_length
(
collection
,
&
len
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
len
==
2
,
"got %d
\n
"
,
len
);
/* try to lookup some uris */
node
=
(
void
*
)
0xdeadbeef
;
hr
=
IXMLDOMSchemaCollection_get
(
collection
,
_bstr_
(
"http://blah.org"
),
&
node
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
node
==
NULL
,
"got %p
\n
"
,
node
);
node
=
(
void
*
)
0xdeadbeef
;
hr
=
IXMLDOMSchemaCollection_get
(
collection
,
_bstr_
(
"http://blah1.org"
),
&
node
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
node
==
NULL
,
"got %p
\n
"
,
node
);
IXMLDOMSchemaCollection_Release
(
collection
);
IXMLDOMDocument2_Release
(
doc
);
free_bstrs
();
}
START_TEST
(
domdoc
)
{
IXMLDOMDocument
*
doc
;
...
...
@@ -11216,6 +11296,7 @@ START_TEST(domdoc)
test_getAttributeNode
();
test_supporterrorinfo
();
test_nodeValue
();
test_get_namespaces
();
test_xsltemplate
();
...
...
dlls/msxml3/tests/schema.c
View file @
ca046f9e
...
...
@@ -2061,6 +2061,41 @@ static void test_dispex(void)
IXMLDOMSchemaCollection_Release
(
cache
);
}
static
void
test_get
(
void
)
{
static
const
WCHAR
uriW
[]
=
{
'u'
,
'r'
,
'i'
,
0
};
IXMLDOMSchemaCollection2
*
cache
;
IXMLDOMNode
*
node
;
HRESULT
hr
;
BSTR
s
;
cache
=
create_cache_version
(
60
,
&
IID_IXMLDOMSchemaCollection2
);
if
(
!
cache
)
return
;
hr
=
IXMLDOMSchemaCollection2_get
(
cache
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_NOTIMPL
);
s
=
SysAllocString
(
uriW
);
hr
=
IXMLDOMSchemaCollection2_get
(
cache
,
s
,
&
node
);
EXPECT_HR
(
hr
,
E_NOTIMPL
);
SysFreeString
(
s
);
IXMLDOMSchemaCollection2_Release
(
cache
);
cache
=
create_cache_version
(
40
,
&
IID_IXMLDOMSchemaCollection2
);
if
(
!
cache
)
return
;
hr
=
IXMLDOMSchemaCollection2_get
(
cache
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_POINTER
);
s
=
SysAllocString
(
uriW
);
hr
=
IXMLDOMSchemaCollection2_get
(
cache
,
s
,
&
node
);
EXPECT_HR
(
hr
,
S_OK
);
SysFreeString
(
s
);
IXMLDOMSchemaCollection2_Release
(
cache
);
}
START_TEST
(
schema
)
{
HRESULT
r
;
...
...
@@ -2076,6 +2111,7 @@ START_TEST(schema)
test_XDR_datatypes
();
test_validate_on_load
();
test_dispex
();
test_get
();
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