mshtml: Added IHTMLDocument2:toString method.
This commit is contained in:
parent
0547c0d236
commit
4719c438a9
|
@ -1578,8 +1578,17 @@ static HRESULT WINAPI HTMLDocument_get_onerrorupdate(IHTMLDocument2 *iface, VARI
|
|||
static HRESULT WINAPI HTMLDocument_toString(IHTMLDocument2 *iface, BSTR *String)
|
||||
{
|
||||
HTMLDocument *This = impl_from_IHTMLDocument2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, String);
|
||||
return E_NOTIMPL;
|
||||
|
||||
static const WCHAR objectW[] = {'[','o','b','j','e','c','t',']',0};
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, String);
|
||||
|
||||
if(!String)
|
||||
return E_INVALIDARG;
|
||||
|
||||
*String = SysAllocString(objectW);
|
||||
return *String ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR bstrHref,
|
||||
|
|
|
@ -5243,10 +5243,17 @@ static void test_doc_elem(IHTMLDocument2 *doc)
|
|||
IHTMLElement *elem;
|
||||
IHTMLDocument3 *doc3;
|
||||
HRESULT hres;
|
||||
BSTR bstr;
|
||||
|
||||
hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (void**)&doc3);
|
||||
ok(hres == S_OK, "QueryInterface(IID_IHTMLDocument3) failed: %08x\n", hres);
|
||||
|
||||
hres = IHTMLDocument2_toString(doc, &bstr);
|
||||
ok(hres == S_OK, "toString failed: %08x\n", hres);
|
||||
ok(!strcmp_wa(bstr, "[object]"),
|
||||
"toString returned %s, expected [object]\n", wine_dbgstr_w(bstr));
|
||||
SysFreeString(bstr);
|
||||
|
||||
hres = IHTMLDocument3_get_documentElement(doc3, &elem);
|
||||
IHTMLDocument3_Release(doc3);
|
||||
ok(hres == S_OK, "get_documentElement failed: %08x\n", hres);
|
||||
|
|
Loading…
Reference in New Issue