msxml3: Stub domdoc_get_readyState().

This commit is contained in:
Adam Martinson 2010-09-30 17:01:44 -05:00 committed by Alexandre Julliard
parent 4a69fa34e9
commit 679dbe6f31
2 changed files with 19 additions and 7 deletions

View File

@ -1911,8 +1911,13 @@ static HRESULT WINAPI domdoc_get_readyState(
LONG *value )
{
domdoc *This = impl_from_IXMLDOMDocument3(iface);
FIXME("(%p)->(%p)\n", This, value);
return E_NOTIMPL;
FIXME("stub! (%p)->(%p)\n", This, value);
if (!value)
return E_INVALIDARG;
*value = READYSTATE_COMPLETE;
return S_OK;
}

View File

@ -3028,21 +3028,28 @@ static void test_IXMLDOMDocument2(void)
VARIANT_BOOL b;
VARIANT var;
HRESULT r;
LONG ref;
LONG ref, res;
BSTR str;
doc = create_document(&IID_IXMLDOMDocument);
if (!doc) return;
r = IXMLDOMDocument_QueryInterface( doc, &IID_IXMLDOMDocument2, (void**)&doc2 );
ok( r == S_OK, "ret %08x\n", r );
ok( doc == (IXMLDOMDocument*)doc2, "interfaces differ\n");
ole_expect(IXMLDOMDocument2_get_readyState(doc2, NULL), E_INVALIDARG);
ole_check(IXMLDOMDocument2_get_readyState(doc2, &res));
ok(res == READYSTATE_COMPLETE, "expected READYSTATE_COMPLETE (4), got %i\n", res);
str = SysAllocString( szComplete4 );
r = IXMLDOMDocument_loadXML( doc, str, &b );
r = IXMLDOMDocument_loadXML( doc2, str, &b );
ok( r == S_OK, "loadXML failed\n");
ok( b == VARIANT_TRUE, "failed to load XML string\n");
SysFreeString( str );
r = IXMLDOMDocument_QueryInterface( doc, &IID_IXMLDOMDocument2, (void**)&doc2 );
ok( r == S_OK, "ret %08x\n", r );
ok( doc == (IXMLDOMDocument*)doc2, "interfaces differ\n");
ole_check(IXMLDOMDocument2_get_readyState(doc, &res));
ok(res == READYSTATE_COMPLETE, "expected READYSTATE_COMPLETE (4), got %i\n", res);
r = IXMLDOMDocument_QueryInterface( doc, &IID_IDispatchEx, (void**)&dispex );
ok( r == S_OK, "ret %08x\n", r );