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
91c4b4c9
Commit
91c4b4c9
authored
Dec 11, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Accept disabled on load validation.
parent
42bd2051
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
4 deletions
+42
-4
schema.c
dlls/msxml3/schema.c
+18
-4
schema.c
dlls/msxml3/tests/schema.c
+24
-0
No files found.
dlls/msxml3/schema.c
View file @
91c4b4c9
...
...
@@ -93,6 +93,8 @@ typedef struct _schema_cache
MSXML_VERSION
version
;
xmlHashTablePtr
cache
;
LONG
ref
;
VARIANT_BOOL
validateOnLoad
;
}
schema_cache
;
typedef
struct
_cache_entry
...
...
@@ -1285,6 +1287,11 @@ static HRESULT WINAPI schema_cache_put_validateOnLoad(IXMLDOMSchemaCollection2*
{
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection2
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
This
->
validateOnLoad
=
value
;
/* it's ok to disable it, cause we don't validate on load anyway */
if
(
value
==
VARIANT_FALSE
)
return
S_OK
;
return
E_NOTIMPL
;
}
...
...
@@ -1292,8 +1299,12 @@ static HRESULT WINAPI schema_cache_get_validateOnLoad(IXMLDOMSchemaCollection2*
VARIANT_BOOL
*
value
)
{
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection2
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
value
);
if
(
!
value
)
return
E_POINTER
;
*
value
=
This
->
validateOnLoad
;
return
S_OK
;
}
static
HRESULT
WINAPI
schema_cache_getSchema
(
IXMLDOMSchemaCollection2
*
iface
,
...
...
@@ -1425,18 +1436,21 @@ XDR_DT SchemaCache_get_node_dt(IXMLDOMSchemaCollection2* iface, xmlNodePtr node)
return
dt
;
}
HRESULT
SchemaCache_create
(
MSXML_VERSION
version
,
IUnknown
*
pUnkOuter
,
void
**
ppO
bj
)
HRESULT
SchemaCache_create
(
MSXML_VERSION
version
,
IUnknown
*
outer
,
void
**
o
bj
)
{
schema_cache
*
This
=
heap_alloc
(
sizeof
(
schema_cache
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
TRACE
(
"(%d %p %p)
\n
"
,
version
,
outer
,
obj
);
This
->
lpVtbl
=
&
schema_cache_vtbl
;
This
->
cache
=
xmlHashCreate
(
DEFAULT_HASHTABLE_SIZE
);
This
->
ref
=
1
;
This
->
version
=
version
;
This
->
validateOnLoad
=
VARIANT_TRUE
;
*
ppO
bj
=
&
This
->
lpVtbl
;
*
o
bj
=
&
This
->
lpVtbl
;
return
S_OK
;
}
...
...
dlls/msxml3/tests/schema.c
View file @
91c4b4c9
...
...
@@ -31,6 +31,9 @@
#include "wine/test.h"
#define EXPECT_HR(hr,hr_exp) \
ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
static
const
WCHAR
xdr_schema_uri
[]
=
{
'x'
,
'-'
,
's'
,
'c'
,
'h'
,
'e'
,
'm'
,
'a'
,
':'
,
't'
,
'e'
,
's'
,
't'
,
'.'
,
'x'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
xdr_schema_xml
[]
=
{
...
...
@@ -1973,6 +1976,26 @@ static void test_XDR_datatypes(void)
free_bstrs
();
}
static
void
test_validate_on_load
(
void
)
{
IXMLDOMSchemaCollection2
*
cache
;
VARIANT_BOOL
b
;
HRESULT
hr
;
cache
=
create_cache_version
(
40
,
&
IID_IXMLDOMSchemaCollection2
);
if
(
!
cache
)
return
;
hr
=
IXMLDOMSchemaCollection2_get_validateOnLoad
(
cache
,
NULL
);
EXPECT_HR
(
hr
,
E_POINTER
);
b
=
VARIANT_FALSE
;
hr
=
IXMLDOMSchemaCollection2_get_validateOnLoad
(
cache
,
&
b
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
b
==
VARIANT_TRUE
,
"got %d
\n
"
,
b
);
IXMLDOMSchemaCollection2_Release
(
cache
);
}
START_TEST
(
schema
)
{
HRESULT
r
;
...
...
@@ -1986,6 +2009,7 @@ START_TEST(schema)
test_collection_content
();
test_XDR_schemas
();
test_XDR_datatypes
();
test_validate_on_load
();
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