mshtml/tests: Some tests require that the user interface be in English.

With MUI versions of Windows checking for the default user language id is insufficient.
Skip the system language id check as it is irrelevant here.
This commit is contained in:
Francois Gouget 2011-09-13 17:35:53 +02:00 committed by Alexandre Julliard
parent c571be83da
commit e931ebc704
1 changed files with 12 additions and 2 deletions

View File

@ -285,8 +285,18 @@ static BSTR a2bstr(const char *str)
static BOOL is_english(void)
{
return PRIMARYLANGID(GetSystemDefaultLangID()) == LANG_ENGLISH
&& PRIMARYLANGID(GetUserDefaultLangID()) == LANG_ENGLISH;
static HMODULE hkernel32 = NULL;
static LANGID (WINAPI *pGetUserDefaultUILanguage)(void) = NULL;
if (!hkernel32)
{
hkernel32 = GetModuleHandleA("kernel32.dll");
pGetUserDefaultUILanguage = (void*)GetProcAddress(hkernel32, "GetUserDefaultUILanguage");
}
if (pGetUserDefaultUILanguage)
return PRIMARYLANGID(pGetUserDefaultUILanguage()) == LANG_ENGLISH;
return PRIMARYLANGID(GetUserDefaultLangID()) == LANG_ENGLISH;
}
#define EXPECT_UPDATEUI 1