mshtml: Added IOmNavigator::toString implementation.
This commit is contained in:
parent
fc26a1c4bd
commit
f6b846414a
|
@ -226,8 +226,16 @@ static HRESULT WINAPI OmNavigator_get_opsProfile(IOmNavigator *iface, IHTMLOpsPr
|
||||||
static HRESULT WINAPI OmNavigator_toString(IOmNavigator *iface, BSTR *String)
|
static HRESULT WINAPI OmNavigator_toString(IOmNavigator *iface, BSTR *String)
|
||||||
{
|
{
|
||||||
OmNavigator *This = OMNAVIGATOR_THIS(iface);
|
OmNavigator *This = OMNAVIGATOR_THIS(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 OmNavigator_get_cpuClass(IOmNavigator *iface, BSTR *p)
|
static HRESULT WINAPI OmNavigator_get_cpuClass(IOmNavigator *iface, BSTR *p)
|
||||||
|
|
|
@ -2492,6 +2492,15 @@ static void test_navigator(IHTMLDocument2 *doc)
|
||||||
ok(!memcmp(bstr, v40, sizeof(v40)), "appVersion is %s\n", wine_dbgstr_w(bstr));
|
ok(!memcmp(bstr, v40, sizeof(v40)), "appVersion is %s\n", wine_dbgstr_w(bstr));
|
||||||
SysFreeString(bstr);
|
SysFreeString(bstr);
|
||||||
|
|
||||||
|
hres = IOmNavigator_toString(navigator, NULL);
|
||||||
|
ok(hres == E_INVALIDARG, "toString failed: %08x\n", hres);
|
||||||
|
|
||||||
|
bstr = NULL;
|
||||||
|
hres = IOmNavigator_toString(navigator, &bstr);
|
||||||
|
ok(hres == S_OK, "toString failed: %08x\n", hres);
|
||||||
|
ok(!strcmp_wa(bstr, "[object]"), "toString returned %s\n", wine_dbgstr_w(bstr));
|
||||||
|
SysFreeString(bstr);
|
||||||
|
|
||||||
ref = IOmNavigator_Release(navigator);
|
ref = IOmNavigator_Release(navigator);
|
||||||
ok(!ref, "navigator should be destroyed here\n");
|
ok(!ref, "navigator should be destroyed here\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue