msxml3: Implement schema_cache_remove().
This commit is contained in:
parent
f8bdf8b5af
commit
eac6ed018c
|
@ -448,8 +448,13 @@ static HRESULT WINAPI schema_cache_get(IXMLDOMSchemaCollection *iface, BSTR uri,
|
|||
|
||||
static HRESULT WINAPI schema_cache_remove(IXMLDOMSchemaCollection *iface, BSTR uri)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
return E_NOTIMPL;
|
||||
schema_cache *This = impl_from_IXMLDOMSchemaCollection(iface);
|
||||
xmlChar* name = xmlChar_from_wchar(uri);
|
||||
TRACE("(%p)->(%s)\n", This, wine_dbgstr_w(uri));
|
||||
|
||||
xmlHashRemoveEntry(This->cache, name, cache_free);
|
||||
heap_free(name);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI schema_cache_get_length(IXMLDOMSchemaCollection *iface, LONG *length)
|
||||
|
|
|
@ -461,6 +461,10 @@ static void test_length(void)
|
|||
|
||||
ole_expect(IXMLDOMSchemaCollection_get_length(cache, NULL), E_POINTER);
|
||||
|
||||
/* MSDN lies; removing a non-existant entry produces no error */
|
||||
ole_check(IXMLDOMSchemaCollection_remove(cache, NULL));
|
||||
ole_check(IXMLDOMSchemaCollection_remove(cache, _bstr_(xdr_schema1_uri)));
|
||||
|
||||
length = -1;
|
||||
ole_check(IXMLDOMSchemaCollection_get_length(cache, &length));
|
||||
ok(length == 0, "expected length 0, got %i\n", length);
|
||||
|
@ -491,13 +495,13 @@ static void test_length(void)
|
|||
ole_check(IXMLDOMSchemaCollection_get_length(cache, &length));
|
||||
ok(length == 2, "expected length 2, got %i\n", length);
|
||||
|
||||
ole_check(IXMLDOMSchemaCollection_add(cache, _bstr_(xdr_schema2_uri), v));
|
||||
ole_check(IXMLDOMSchemaCollection_remove(cache, _bstr_(xdr_schema2_uri)));
|
||||
|
||||
length = -1;
|
||||
ole_check(IXMLDOMSchemaCollection_get_length(cache, &length));
|
||||
ok(length == 1, "expected length 1, got %i\n", length);
|
||||
|
||||
ole_check(IXMLDOMSchemaCollection_add(cache, _bstr_(xdr_schema3_uri), v));
|
||||
ole_check(IXMLDOMSchemaCollection_remove(cache, _bstr_(xdr_schema3_uri)));
|
||||
|
||||
length = -1;
|
||||
ole_check(IXMLDOMSchemaCollection_get_length(cache, &length));
|
||||
|
|
Loading…
Reference in New Issue