35DEFINE_GUID(
GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
39L"<?xml version='1.0'?>"
40"<schema xmlns='http://www.w3.org/2001/XMLSchema'"
41" targetNamespace='x-schema:test1.xsd'>"
42" <element name='root'>"
44" <sequence maxOccurs='unbounded'>"
51#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
60 hr = IUnknown_QueryInterface(iface, iid, (
void **)&unk);
61 ok_(__FILE__,
line)(
hr == expected_hr,
"Got hr %#lx, expected %#lx.\n",
hr, expected_hr);
63 IUnknown_Release(unk);
90 ok(
hr ==
S_OK,
"Failed to create a document object, hr %#lx.\n",
hr);
101 ok(
hr ==
S_OK,
"Failed to create a document object, hr %#lx.\n",
hr);
109 static const WCHAR regex_doc[] =
111"<?xml version='1.0'?>"
112"<root xmlns='urn:test'>%s</root>";
114 static const WCHAR regex_schema[] =
115L"<?xml version='1.0'?>"
116"<schema xmlns='http://www.w3.org/2001/XMLSchema'"
117" targetNamespace='urn:test'>"
118" <element name='root'>"
120" <restriction base='string'>"
121" <pattern value='%s'/>"
129 BSTR namespace, bstr;
138 hr = IXMLDOMDocument2_loadXML(doc, bstr, &
b);
140 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
145 hr = IXMLDOMDocument2_loadXML(
schema, bstr, &
b);
147 ok(
b == VARIANT_TRUE,
"failed to load XML\n");
157 hr = IXMLDOMSchemaCollection_add(
cache,
namespace,
v);
171 hr = IXMLDOMDocument2_putref_schemas(doc,
v);
180 hr = IXMLDOMDocument2_validate(doc, &
err);
181 ok(
err !=
NULL,
"domdoc_validate() should always set err\n");
182 if (IXMLDOMParseError_get_reason(
err, &bstr) !=
S_FALSE)
185 IXMLDOMParseError_Release(
err);
192 static const struct regex_test
213 {
L"\\uCAFE",
L"\xCAFE" },
215 {
L"\\uD83D\\uDE00",
L"\xD83D\xDE00" },
238 IXMLDOMDocument2_Release(doc);
240 IXMLDOMDocument2_Release(
schema);
242 IXMLDOMSchemaCollection_Release(
cache);
262 IXMLDOMSchemaCollection2_Release(
cache);
278 IUnknown_Release(unk);
285 IXMLDOMSchemaCollection2_Release(
cache);
300 ok(doc !=
NULL,
"got %p\n", doc);
311 hr = IXMLDOMSchemaCollection2_get_length(
cache, &
len);
313 ok(
len == 1,
"Unexpected length %ld.\n",
len);
319 hr = IXMLDOMSchemaCollection2_remove(
cache,
_bstr_(
L"invaliduri"));
326 hr = IXMLDOMSchemaCollection2_get_length(
cache, &
len);
328 ok(
len == 1,
"Unexpected length %ld.\n",
len);
330 IXMLDOMDocument2_Release(doc);
331 IXMLDOMSchemaCollection2_Release(
cache);
345 hr = IUnknown_QueryInterface(
obj, &IID_IDispatchEx, (
void**)&dispex);
350 hr = IDispatchEx_GetTypeInfoCount(dispex, &ticnt);
352 ok(ticnt == 1,
"ticnt=%u\n", ticnt);
355 hr = IDispatchEx_DeleteMemberByName(dispex,
name, fdexNameCaseSensitive);
359 hr = IDispatchEx_DeleteMemberByDispID(dispex, dispid);
363 hr = IDispatchEx_GetMemberProperties(dispex, dispid, grfdexPropCanAll, &
props);
367 hr = IDispatchEx_GetMemberName(dispex, dispid, &
name);
375 hr = IDispatchEx_GetNameSpaceParent(dispex, &unk);
377 ok(unk == (
IUnknown*)0xdeadbeef,
"got %p\n", unk);
380 hr = IDispatchEx_GetDispID(dispex,
name, fdexNameEnsure, &dispid);
384 IDispatchEx_Release(dispex);
398 IUnknown_Release(unk);
400 IXMLDOMSchemaCollection_Release(
cache);
411 hr = IXMLDOMSchemaCollection2_get_validateOnLoad(
cache,
NULL);
415 hr = IXMLDOMSchemaCollection2_get_validateOnLoad(
cache, &
b);
417 ok(
b == VARIANT_TRUE,
"got %d\n",
b);
419 IXMLDOMSchemaCollection2_Release(
cache);
433 win_skip(
"DOMDocument60 is not supported.\n");
437 IUnknown_Release(
obj);
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
GLboolean GLboolean GLboolean b
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
static struct test_info tests[]
#define create_cache(iid)
static BSTR alloced_bstrs[256]
static int alloced_bstrs_count
static void free_bstrs(void)
static BSTR _bstr_(const WCHAR *str)
#define create_document(iid)
static void test_obj_dispex(IUnknown *obj)
static void test_dispex(void)
static const WCHAR xsd_schema1_uri[]
static HRESULT validate_regex_document(IXMLDOMDocument2 *doc, IXMLDOMDocument2 *schema, IXMLDOMSchemaCollection *cache, const WCHAR *regex, const WCHAR *input)
static const WCHAR xsd_schema1_xml[]
static void test_regex(void)
static void test_remove(void)
static void test_get(void)
static void test_validate_on_load(void)
static void test_ifaces(void)
static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported)
#define check_interface(a, b, c)
static VARIANTARG static DISPID
#define DISPID_XMLDOM_SCHEMACOLLECTION_ADD
#define DISPID_SAX_XMLREADER_GETFEATURE
GUID CLSID_XMLSchemaCache60
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
static const WCHAR props[]
#define DISP_E_UNKNOWNNAME