mshtml/tests: Some tests require that the user interface be in English.
Francois Gouget
fgouget at free.fr
Tue Sep 13 10:35:53 CDT 2011
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.
---
Well, I don't see how the system language id would be relevant and it's
not needed in my French NT4 or Windows 7 VMs. So I'd like a good
rationale to leave it in.
dlls/mshtml/tests/htmldoc.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
index 7791b73..0a7541b 100644
--- a/dlls/mshtml/tests/htmldoc.c
+++ b/dlls/mshtml/tests/htmldoc.c
@@ -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
--
1.7.5.4
More information about the wine-patches
mailing list