Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ae80430f
Commit
ae80430f
authored
Sep 16, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Sep 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ieframe/tests: Some tests require that the user interface be in English.
parent
19e2c157
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
webbrowser.c
dlls/ieframe/tests/webbrowser.c
+25
-1
No files found.
dlls/ieframe/tests/webbrowser.c
View file @
ae80430f
...
...
@@ -159,6 +159,30 @@ static const char *current_url;
static
DWORD
dwl_flags
;
/* Returns true if the user interface is in English. Note that this does not
* presume of the formatting of dates, numbers, etc.
*/
static
BOOL
is_lang_english
(
void
)
{
static
HMODULE
hkernel32
=
NULL
;
static
LANGID
(
WINAPI
*
pGetThreadUILanguage
)(
void
)
=
NULL
;
static
LANGID
(
WINAPI
*
pGetUserDefaultUILanguage
)(
void
)
=
NULL
;
if
(
!
hkernel32
)
{
hkernel32
=
GetModuleHandleA
(
"kernel32.dll"
);
pGetThreadUILanguage
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetThreadUILanguage"
);
pGetUserDefaultUILanguage
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetUserDefaultUILanguage"
);
}
if
(
pGetThreadUILanguage
)
return
PRIMARYLANGID
(
pGetThreadUILanguage
())
==
LANG_ENGLISH
;
if
(
pGetUserDefaultUILanguage
)
return
PRIMARYLANGID
(
pGetUserDefaultUILanguage
())
==
LANG_ENGLISH
;
return
PRIMARYLANGID
(
GetUserDefaultLangID
())
==
LANG_ENGLISH
;
}
static
int
strcmp_wa
(
LPCWSTR
strw
,
const
char
*
stra
)
{
CHAR
buf
[
512
];
...
...
@@ -2080,7 +2104,7 @@ static void test_ie_funcs(IUnknown *unk)
/* Name */
hres
=
IWebBrowser2_get_Name
(
wb
,
&
sName
);
ok
(
hres
==
S_OK
,
"getName failed: %08x, expected S_OK
\n
"
,
hres
);
if
(
PRIMARYLANGID
(
LANGIDFROMLCID
(
GetThreadLocale
()))
==
LANG_ENGLISH
)
if
(
is_lang_english
()
)
ok
(
!
strcmp_wa
(
sName
,
"Microsoft Web Browser Control"
),
"got '%s', expected 'Microsoft Web Browser Control'
\n
"
,
wine_dbgstr_w
(
sName
));
else
/* Non-English cannot be blank. */
ok
(
sName
!=
NULL
,
"get_Name return a NULL string.
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment