mshtml: Added IOmNavigator::get_appCodeName implementation.

This commit is contained in:
Jacek Caban 2008-07-23 13:17:48 +02:00 committed by Alexandre Julliard
parent e629e049db
commit 2609e45c31
2 changed files with 14 additions and 2 deletions

View File

@ -127,8 +127,13 @@ static HRESULT WINAPI OmNavigator_Invoke(IOmNavigator *iface, DISPID dispIdMembe
static HRESULT WINAPI OmNavigator_get_appCodeName(IOmNavigator *iface, BSTR *p)
{
OmNavigator *This = OMNAVIGATOR_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
static const WCHAR mozillaW[] = {'M','o','z','i','l','l','a',0};
TRACE("(%p)->(%p)\n", This, p);
*p = SysAllocString(mozillaW);
return S_OK;
}
static HRESULT WINAPI OmNavigator_get_appName(IOmNavigator *iface, BSTR *p)

View File

@ -1799,6 +1799,7 @@ static void test_navigator(IHTMLDocument2 *doc)
IHTMLWindow2 *window;
IOmNavigator *navigator, *navigator2;
ULONG ref;
BSTR bstr;
HRESULT hres;
hres = IHTMLDocument2_get_parentWindow(doc, &window);
@ -1815,6 +1816,12 @@ static void test_navigator(IHTMLDocument2 *doc)
IHTMLWindow2_Release(window);
IOmNavigator_Release(navigator2);
hres = IOmNavigator_get_appCodeName(navigator, &bstr);
ok(hres == S_OK, "get_appCodeName failed: %08x\n", hres);
ok(!strcmp_wa(bstr, "Mozilla"), "Unexpected appCodeName %s\n", dbgstr_w(bstr));
SysFreeString(bstr);
ref = IOmNavigator_Release(navigator);
ok(!ref, "navigator should be destroyed here\n");
}