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)
|
static HRESULT WINAPI HTMLDocument_toString(IHTMLDocument2 *iface, BSTR *String)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IHTMLDocument2(iface);
|
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,
|
static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR bstrHref,
|
||||||
|
@ -5243,10 +5243,17 @@ static void test_doc_elem(IHTMLDocument2 *doc)
|
|||||||
IHTMLElement *elem;
|
IHTMLElement *elem;
|
||||||
IHTMLDocument3 *doc3;
|
IHTMLDocument3 *doc3;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
BSTR bstr;
|
||||||
|
|
||||||
hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (void**)&doc3);
|
hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (void**)&doc3);
|
||||||
ok(hres == S_OK, "QueryInterface(IID_IHTMLDocument3) failed: %08x\n", hres);
|
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);
|
hres = IHTMLDocument3_get_documentElement(doc3, &elem);
|
||||||
IHTMLDocument3_Release(doc3);
|
IHTMLDocument3_Release(doc3);
|
||||||
ok(hres == S_OK, "get_documentElement failed: %08x\n", hres);
|
ok(hres == S_OK, "get_documentElement failed: %08x\n", hres);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user