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
286e4a86
Commit
286e4a86
authored
Jan 22, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added OLECMDID_OPTICAL_ZOOM tests and stub.
parent
23d74d3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
8 deletions
+43
-8
olecmd.c
dlls/mshtml/olecmd.c
+11
-3
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+32
-5
No files found.
dlls/mshtml/olecmd.c
View file @
286e4a86
...
...
@@ -546,6 +546,12 @@ static HRESULT exec_get_print_template(HTMLDocument *This, DWORD nCmdexecopt, VA
return
E_NOTIMPL
;
}
static
HRESULT
exec_optical_zoom
(
HTMLDocument
*
This
,
DWORD
nCmdexecopt
,
VARIANT
*
pvaIn
,
VARIANT
*
pvaOut
)
{
FIXME
(
"(%p)->(%d %p %p)
\n
"
,
This
,
nCmdexecopt
,
pvaIn
,
pvaOut
);
return
E_NOTIMPL
;
}
static
HRESULT
query_mshtml_copy
(
HTMLDocument
*
This
,
OLECMD
*
cmd
)
{
FIXME
(
"(%p)
\n
"
,
This
);
...
...
@@ -695,7 +701,7 @@ static HRESULT query_enabled_stub(HTMLDocument *This, OLECMD *cmd)
static
const
struct
{
OLECMDF
cmdf
;
HRESULT
(
*
func
)(
HTMLDocument
*
,
DWORD
,
VARIANT
*
,
VARIANT
*
);
}
exec_table
[
OLECMDID_GETPRINTTEMPLATE
+
1
]
=
{
}
exec_table
[]
=
{
{
0
},
{
OLECMDF_SUPPORTED
,
exec_open
},
/* OLECMDID_OPEN */
{
OLECMDF_SUPPORTED
,
exec_new
},
/* OLECMDID_NEW */
...
...
@@ -735,7 +741,9 @@ static const struct {
{
OLECMDF_SUPPORTED
,
exec_close
},
/* OLECMDID_CLOSE */
{
0
},{
0
},{
0
},
{
OLECMDF_SUPPORTED
,
exec_set_print_template
},
/* OLECMDID_SETPRINTTEMPLATE */
{
OLECMDF_SUPPORTED
,
exec_get_print_template
}
/* OLECMDID_GETPRINTTEMPLATE */
{
OLECMDF_SUPPORTED
,
exec_get_print_template
},
/* OLECMDID_GETPRINTTEMPLATE */
{
0
},{
0
},{
0
},{
0
},{
0
},{
0
},{
0
},{
0
},{
0
},{
0
},
{
0
,
/* not reported as supported */
exec_optical_zoom
}
/* OLECMDID_OPTICAL_ZOOM */
};
static
const
cmdtable_t
base_cmds
[]
=
{
...
...
@@ -874,7 +882,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
HTMLDocument
*
This
=
impl_from_IOleCommandTarget
(
iface
);
if
(
!
pguidCmdGroup
)
{
if
(
nCmdID
<
OLECMDID_OPEN
||
nCmdID
>
OLECMDID_GETPRINTTEMPLATE
||
!
exec_table
[
nCmdID
].
func
)
{
if
(
nCmdID
<
OLECMDID_OPEN
||
nCmdID
>=
sizeof
(
exec_table
)
/
sizeof
(
*
exec_table
)
||
!
exec_table
[
nCmdID
].
func
)
{
WARN
(
"Unsupported cmdID = %d
\n
"
,
nCmdID
);
return
OLECMDERR_E_NOTSUPPORTED
;
}
...
...
dlls/mshtml/tests/htmldoc.c
View file @
286e4a86
...
...
@@ -6292,7 +6292,7 @@ static void test_clear(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"clear failed: %08x
\n
"
,
hres
);
}
static
const
OLECMDF
expect_cmds
[
OLECMDID_GETPRINTTEMPLATE
+
1
]
=
{
static
const
OLECMDF
expect_cmds
[]
=
{
0
,
OLECMDF_SUPPORTED
,
/* OLECMDID_OPEN */
OLECMDF_SUPPORTED
,
/* OLECMDID_NEW */
...
...
@@ -6347,7 +6347,7 @@ static void _test_QueryStatus(unsigned line, IUnknown *unk, REFIID cgid, ULONG c
return
;
hres
=
IOleCommandTarget_QueryStatus
(
cmdtrg
,
cgid
,
1
,
&
olecmd
,
NULL
);
ok
(
hres
==
S_OK
,
"QueryStatus(%u) failed: %08x
\n
"
,
cmdid
,
hres
);
ok
(
hres
==
cmdf
?
S_OK
:
OLECMDERR_E_NOTSUPPORTED
,
"QueryStatus(%u) failed: %08x
\n
"
,
cmdid
,
hres
);
IOleCommandTarget_Release
(
cmdtrg
);
...
...
@@ -6380,7 +6380,7 @@ static void test_MSHTML_QueryStatus(IHTMLDocument2 *doc, DWORD cmdf)
static
void
test_OleCommandTarget
(
IHTMLDocument2
*
doc
)
{
IOleCommandTarget
*
cmdtrg
;
OLECMD
cmds
[
OLECMDID_GETPRINTTEMPLATE
];
OLECMD
cmds
[
sizeof
(
expect_cmds
)
/
sizeof
(
*
expect_cmds
)
-
1
];
int
i
;
HRESULT
hres
;
...
...
@@ -6389,7 +6389,7 @@ static void test_OleCommandTarget(IHTMLDocument2 *doc)
if
(
FAILED
(
hres
))
return
;
for
(
i
=
0
;
i
<
OLECMDID_GETPRINTTEMPLATE
;
i
++
)
{
for
(
i
=
0
;
i
<
sizeof
(
cmds
)
/
sizeof
(
*
cmds
)
;
i
++
)
{
cmds
[
i
].
cmdID
=
i
+
1
;
cmds
[
i
].
cmdf
=
0xf0f0
;
}
...
...
@@ -6401,7 +6401,7 @@ static void test_OleCommandTarget(IHTMLDocument2 *doc)
CHECK_CALLED
(
QueryStatus_OPEN
);
CHECK_CALLED
(
QueryStatus_NEW
);
for
(
i
=
0
;
i
<
OLECMDID_GETPRINTTEMPLATE
;
i
++
)
{
for
(
i
=
0
;
i
<
sizeof
(
cmds
)
/
sizeof
(
*
cmds
)
;
i
++
)
{
ok
(
cmds
[
i
].
cmdID
==
i
+
1
,
"cmds[%d].cmdID canged to %x
\n
"
,
i
,
cmds
[
i
].
cmdID
);
if
(
i
+
1
==
OLECMDID_FIND
)
continue
;
...
...
@@ -6624,6 +6624,31 @@ static void test_exec_noargs(IUnknown *unk, DWORD cmdid)
IOleCommandTarget_Release
(
cmdtrg
);
}
static
void
test_exec_optical_zoom
(
IHTMLDocument2
*
doc
,
int
factor
)
{
IOleCommandTarget
*
cmdtrg
;
VARIANT
v
;
HRESULT
hres
;
hres
=
IHTMLDocument2_QueryInterface
(
doc
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IOleCommandTarget) failed: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
factor
;
SET_EXPECT
(
GetOverrideKeyPath
);
hres
=
IOleCommandTarget_Exec
(
cmdtrg
,
NULL
,
OLECMDID_OPTICAL_ZOOM
,
OLECMDEXECOPT_DODEFAULT
,
&
v
,
NULL
);
todo_wine
ok
(
hres
==
S_OK
||
broken
(
hres
==
OLECMDERR_E_NOTSUPPORTED
)
/* IE6 */
,
"Exec failed: %08x
\n
"
,
hres
);
CLEAR_CALLED
(
GetOverrideKeyPath
);
IOleCommandTarget_Release
(
cmdtrg
);
test_QueryStatus
((
IUnknown
*
)
doc
,
NULL
,
OLECMDID_OPTICAL_ZOOM
,
0
);
}
static
void
test_IsDirty
(
IHTMLDocument2
*
doc
,
HRESULT
exhres
)
{
IPersistStreamInit
*
perinit
;
...
...
@@ -7489,6 +7514,8 @@ static void test_HTMLDocument(BOOL do_load, BOOL mime)
test_MSHTML_QueryStatus
(
doc
,
OLECMDF_SUPPORTED
);
test_OleCommandTarget_fail
(
doc
);
test_OleCommandTarget
(
doc
);
test_exec_optical_zoom
(
doc
,
200
);
test_exec_optical_zoom
(
doc
,
100
);
test_OnAmbientPropertyChange
(
doc
);
test_Window
(
doc
,
TRUE
);
test_external
(
doc
,
TRUE
);
...
...
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