Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c4bc5be2
Commit
c4bc5be2
authored
Sep 02, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IOmNavigator::get_userAgent implementation.
parent
4eead9d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
omnavigator.c
dlls/mshtml/omnavigator.c
+18
-2
dom.c
dlls/mshtml/tests/dom.c
+12
-0
No files found.
dlls/mshtml/omnavigator.c
View file @
c4bc5be2
...
...
@@ -179,8 +179,24 @@ static HRESULT WINAPI OmNavigator_get_appVersion(IOmNavigator *iface, BSTR *p)
static
HRESULT
WINAPI
OmNavigator_get_userAgent
(
IOmNavigator
*
iface
,
BSTR
*
p
)
{
OmNavigator
*
This
=
OMNAVIGATOR_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
char
user_agent
[
512
];
DWORD
size
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
size
=
sizeof
(
user_agent
);
hres
=
ObtainUserAgentString
(
0
,
user_agent
,
&
size
);
if
(
FAILED
(
hres
))
return
hres
;
size
=
MultiByteToWideChar
(
CP_ACP
,
0
,
user_agent
,
-
1
,
NULL
,
0
);
*
p
=
SysAllocStringLen
(
NULL
,
size
-
1
);
if
(
!*
p
)
return
E_OUTOFMEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
user_agent
,
-
1
,
*
p
,
size
);
return
S_OK
;
}
static
HRESULT
WINAPI
OmNavigator_javaEnabled
(
IOmNavigator
*
iface
,
VARIANT_BOOL
*
enabled
)
...
...
dlls/mshtml/tests/dom.c
View file @
c4bc5be2
...
...
@@ -2444,6 +2444,8 @@ static void test_navigator(IHTMLDocument2 *doc)
{
IHTMLWindow2
*
window
;
IOmNavigator
*
navigator
,
*
navigator2
;
char
buf
[
512
];
DWORD
size
;
ULONG
ref
;
BSTR
bstr
;
HRESULT
hres
;
...
...
@@ -2501,6 +2503,16 @@ static void test_navigator(IHTMLDocument2 *doc)
ok
(
!
strcmp_wa
(
bstr
,
"[object]"
),
"toString returned %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
size
=
sizeof
(
buf
);
hres
=
ObtainUserAgentString
(
0
,
buf
,
&
size
);
ok
(
hres
==
S_OK
,
"ObtainUserAgentString failed: %08x
\n
"
,
hres
);
bstr
=
NULL
;
hres
=
IOmNavigator_get_userAgent
(
navigator
,
&
bstr
);
ok
(
hres
==
S_OK
,
"get_userAgent failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
bstr
,
buf
),
"userAgent returned %s, expected
\"
%s
\"\n
"
,
wine_dbgstr_w
(
bstr
),
buf
);
SysFreeString
(
bstr
);
ref
=
IOmNavigator_Release
(
navigator
);
ok
(
!
ref
,
"navigator should be destroyed here
\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