mshtml: Added IOmNavigator::get_cpuClass implementation.

This commit is contained in:
Jacek Caban 2011-05-11 14:58:35 +00:00 committed by Alexandre Julliard
parent 75916ffe7a
commit ebac489c49
2 changed files with 20 additions and 7 deletions

View File

@ -443,8 +443,18 @@ static HRESULT WINAPI OmNavigator_toString(IOmNavigator *iface, BSTR *String)
static HRESULT WINAPI OmNavigator_get_cpuClass(IOmNavigator *iface, BSTR *p) static HRESULT WINAPI OmNavigator_get_cpuClass(IOmNavigator *iface, BSTR *p)
{ {
OmNavigator *This = impl_from_IOmNavigator(iface); OmNavigator *This = impl_from_IOmNavigator(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; static const WCHAR cpu_classW[] =
#ifdef _WIN64
{'x','6','4',0};
#else
{'x','8','6',0};
#endif
TRACE("(%p)->(%p)\n", This, p);
*p = SysAllocString(cpu_classW);
return *p ? S_OK : E_OUTOFMEMORY;
} }
static HRESULT WINAPI OmNavigator_get_systemLanguage(IOmNavigator *iface, BSTR *p) static HRESULT WINAPI OmNavigator_get_systemLanguage(IOmNavigator *iface, BSTR *p)

View File

@ -3865,11 +3865,14 @@ 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_platform failed: %08x\n", hres); ok(hres == S_OK, "get_platform failed: %08x\n", hres);
#ifdef _WIN64 ok(!strcmp_wa(bstr, sizeof(void*) == 8 ? "Win64" : "Win32")
ok(!strcmp_wa(bstr, "Win64") || broken(!strcmp_wa(bstr, "Win32") /* IE6 */), "unexpected platform %s\n", wine_dbgstr_w(bstr)); || (sizeof(void*) == 8 && broken(!strcmp_wa(bstr, "Win32") /* IE6 */)), "unexpected platform %s\n", wine_dbgstr_w(bstr));
#else SysFreeString(bstr);
ok(!strcmp_wa(bstr, "Win32"), "unexpected platform %s\n", wine_dbgstr_w(bstr));
#endif bstr = NULL;
hres = IOmNavigator_get_cpuClass(navigator, &bstr);
ok(hres == S_OK, "get_cpuClass failed: %08x\n", hres);
ok(!strcmp_wa(bstr, sizeof(void*) == 8 ? "x64" : "x86"), "unexpected cpuClass %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr); SysFreeString(bstr);
bstr = NULL; bstr = NULL;