Commit c97d498f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IOmNavigator::get_appVersion implementation.

parent 53d6b661
...@@ -146,8 +146,21 @@ static HRESULT WINAPI OmNavigator_get_appName(IOmNavigator *iface, BSTR *p) ...@@ -146,8 +146,21 @@ static HRESULT WINAPI OmNavigator_get_appName(IOmNavigator *iface, BSTR *p)
static HRESULT WINAPI OmNavigator_get_appVersion(IOmNavigator *iface, BSTR *p) static HRESULT WINAPI OmNavigator_get_appVersion(IOmNavigator *iface, BSTR *p)
{ {
OmNavigator *This = OMNAVIGATOR_THIS(iface); OmNavigator *This = OMNAVIGATOR_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; /* FIXME: Should we return something smarter? */
static const WCHAR app_verW[] =
{'4','.','0',' ','(','c','o','m','p','a','t','i','b','l','e',';',
' ','M','S','I','E',' ','7','.','0',';',
' ','W','i','n','d','o','w','s',' ','N','T',' ','5','.','1',';',
' ','M','o','z','i','l','l','a','/','4','.','0',')',0};
TRACE("(%p)->(%p)\n", This, p);
*p = SysAllocString(app_verW);
if(!*p)
return E_OUTOFMEMORY;
return S_OK;
} }
static HRESULT WINAPI OmNavigator_get_userAgent(IOmNavigator *iface, BSTR *p) static HRESULT WINAPI OmNavigator_get_userAgent(IOmNavigator *iface, BSTR *p)
......
...@@ -2152,6 +2152,8 @@ static void test_navigator(IHTMLDocument2 *doc) ...@@ -2152,6 +2152,8 @@ static void test_navigator(IHTMLDocument2 *doc)
BSTR bstr; BSTR bstr;
HRESULT hres; HRESULT hres;
static const WCHAR v40[] = {'4','.','0'};
hres = IHTMLDocument2_get_parentWindow(doc, &window); hres = IHTMLDocument2_get_parentWindow(doc, &window);
ok(hres == S_OK, "parentWidnow failed: %08x\n", hres); ok(hres == S_OK, "parentWidnow failed: %08x\n", hres);
...@@ -2174,10 +2176,16 @@ static void test_navigator(IHTMLDocument2 *doc) ...@@ -2174,10 +2176,16 @@ static void test_navigator(IHTMLDocument2 *doc)
bstr = NULL; bstr = NULL;
hres = IOmNavigator_get_platform(navigator, &bstr); hres = IOmNavigator_get_platform(navigator, &bstr);
ok(hres == S_OK, "get_appMinorVersion failed: %08x\n", hres); ok(hres == S_OK, "get_platform failed: %08x\n", hres);
ok(!strcmp_wa(bstr, "Win32"), "unexpected platform %s\n", dbgstr_w(bstr)); ok(!strcmp_wa(bstr, "Win32"), "unexpected platform %s\n", dbgstr_w(bstr));
SysFreeString(bstr); SysFreeString(bstr);
bstr = NULL;
hres = IOmNavigator_get_appVersion(navigator, &bstr);
ok(hres == S_OK, "get_appVersion failed: %08x\n", hres);
ok(!memcmp(bstr, v40, sizeof(v40)), "appVersion is %s\n", 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");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment