mshtml/tests: GetUserDefaultUILanguage() is not available in NT4.

This commit is contained in:
Francois Gouget 2011-09-13 17:32:25 +02:00 committed by Alexandre Julliard
parent 3b7fb23ca7
commit c571be83da
1 changed files with 14 additions and 6 deletions

View File

@ -35,6 +35,7 @@
#include "objsafe.h"
static INT (WINAPI *pLCIDToLocaleName)(LCID,LPWSTR,INT,DWORD);
static LANGID (WINAPI *pGetUserDefaultUILanguage)(void);
static const char doc_blank[] = "<html></html>";
static const char doc_str1[] = "<html><body>test</body></html>";
@ -4133,11 +4134,16 @@ static void test_navigator(IHTMLDocument2 *doc)
test_language_string(bstr, LOCALE_SYSTEM_DEFAULT);
SysFreeString(bstr);
bstr = NULL;
hres = IOmNavigator_get_browserLanguage(navigator, &bstr);
ok(hres == S_OK, "get_browserLanguage failed: %08x\n", hres);
test_language_string(bstr, GetUserDefaultUILanguage());
SysFreeString(bstr);
if (pGetUserDefaultUILanguage)
{
bstr = NULL;
hres = IOmNavigator_get_browserLanguage(navigator, &bstr);
ok(hres == S_OK, "get_browserLanguage failed: %08x\n", hres);
test_language_string(bstr, pGetUserDefaultUILanguage());
SysFreeString(bstr);
}
else
win_skip("GetUserDefaultUILanguage not available\n");
bstr = NULL;
hres = IOmNavigator_get_userLanguage(navigator, &bstr);
@ -6155,7 +6161,9 @@ static void run_domtest(const char *str, domtest_t test)
START_TEST(dom)
{
pLCIDToLocaleName = (void*)GetProcAddress(GetModuleHandleA("kernel32.dll"), "LCIDToLocaleName");
HMODULE hkernel32 = GetModuleHandleA("kernel32.dll");
pLCIDToLocaleName = (void*)GetProcAddress(hkernel32, "LCIDToLocaleName");
pGetUserDefaultUILanguage = (void*)GetProcAddress(hkernel32, "GetUserDefaultUILanguage");
CoInitialize(NULL);