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
cdd09ba1
Commit
cdd09ba1
authored
Jul 31, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IOmNavigator::get_*Language tests.
parent
e36d0d2e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
dom.c
dlls/mshtml/tests/dom.c
+38
-0
No files found.
dlls/mshtml/tests/dom.c
View file @
cdd09ba1
...
...
@@ -34,6 +34,8 @@
#include "mshtml_test.h"
#include "objsafe.h"
static
INT
(
WINAPI
*
pLCIDToLocaleName
)(
LCID
,
LPWSTR
,
INT
,
DWORD
);
static
const
char
doc_blank
[]
=
"<html></html>"
;
static
const
char
doc_str1
[]
=
"<html><body>test</body></html>"
;
static
const
char
range_test_str
[]
=
...
...
@@ -3820,6 +3822,22 @@ static void test_mime_types_col(IOmNavigator *nav)
ok
(
!
ref
,
"ref=%d
\n
"
,
ref
);
}
#define test_language_string(a,b) _test_language_string(__LINE__,a,b)
static
void
_test_language_string
(
unsigned
line
,
const
WCHAR
*
lang
,
LCID
lcid
)
{
WCHAR
buf
[
64
];
int
res
;
if
(
pLCIDToLocaleName
)
{
res
=
pLCIDToLocaleName
(
lcid
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
),
0
);
ok_
(
__FILE__
,
line
)(
res
,
"LCIDToLocaleName failed: %u
\n
"
,
GetLastError
());
ok_
(
__FILE__
,
line
)(
!
lstrcmpW
(
lang
,
buf
),
"lang = %s, expected %s
\n
"
,
wine_dbgstr_w
(
lang
),
wine_dbgstr_w
(
buf
));
}
else
{
win_skip
(
"LCIDToLocaleName not available, unable to test language string
\n
"
);
ok_
(
__FILE__
,
line
)(
lang
!=
NULL
,
"lang == NULL
\n
"
);
}
}
static
void
test_navigator
(
IHTMLDocument2
*
doc
)
{
IHTMLWindow2
*
window
;
...
...
@@ -3877,6 +3895,24 @@ static void test_navigator(IHTMLDocument2 *doc)
ok
(
!
memcmp
(
bstr
,
v40
,
sizeof
(
v40
)),
"appVersion is %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
bstr
=
NULL
;
hres
=
IOmNavigator_get_systemLanguage
(
navigator
,
&
bstr
);
ok
(
hres
==
S_OK
,
"get_systemLanguage failed: %08x
\n
"
,
hres
);
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
);
bstr
=
NULL
;
hres
=
IOmNavigator_get_userLanguage
(
navigator
,
&
bstr
);
ok
(
hres
==
S_OK
,
"get_userLanguage failed: %08x
\n
"
,
hres
);
test_language_string
(
bstr
,
LOCALE_USER_DEFAULT
);
SysFreeString
(
bstr
);
hres
=
IOmNavigator_toString
(
navigator
,
NULL
);
ok
(
hres
==
E_INVALIDARG
,
"toString failed: %08x
\n
"
,
hres
);
...
...
@@ -5868,6 +5904,8 @@ static void run_domtest(const char *str, domtest_t test)
START_TEST
(
dom
)
{
pLCIDToLocaleName
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32.dll"
),
"LCIDToLocaleName"
);
CoInitialize
(
NULL
);
run_domtest
(
doc_str1
,
test_doc_elem
);
...
...
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