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
383564ab
Commit
383564ab
authored
Apr 05, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLImgElement::onerror tests.
parent
8ac7e950
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
events.c
dlls/mshtml/tests/events.c
+35
-0
No files found.
dlls/mshtml/tests/events.c
View file @
383564ab
...
...
@@ -72,6 +72,7 @@ DEFINE_EXPECT(iframe_onreadystatechange_interactive);
DEFINE_EXPECT
(
iframe_onreadystatechange_complete
);
DEFINE_EXPECT
(
iframedoc_onreadystatechange
);
DEFINE_EXPECT
(
img_onload
);
DEFINE_EXPECT
(
img_onerror
);
DEFINE_EXPECT
(
input_onfocus
);
DEFINE_EXPECT
(
form_onsubmit
);
DEFINE_EXPECT
(
form_onclick
);
...
...
@@ -927,6 +928,17 @@ static HRESULT WINAPI img_onload(IDispatchEx *iface, DISPID id, LCID lcid, WORD
EVENT_HANDLER_FUNC_OBJ
(
img_onload
);
static
HRESULT
WINAPI
img_onerror
(
IDispatchEx
*
iface
,
DISPID
id
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pdp
,
VARIANT
*
pvarRes
,
EXCEPINFO
*
pei
,
IServiceProvider
*
pspCaller
)
{
CHECK_EXPECT
(
img_onerror
);
test_event_args
(
&
DIID_DispHTMLImg
,
id
,
wFlags
,
pdp
,
pvarRes
,
pei
,
pspCaller
);
test_event_src
(
"IMG"
);
return
S_OK
;
}
EVENT_HANDLER_FUNC_OBJ
(
img_onerror
);
static
HRESULT
WINAPI
input_onfocus
(
IDispatchEx
*
iface
,
DISPID
id
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pdp
,
VARIANT
*
pvarRes
,
EXCEPINFO
*
pei
,
IServiceProvider
*
pspCaller
)
{
...
...
@@ -1675,6 +1687,18 @@ static void test_imgload(IHTMLDocument2 *doc)
ok
(
V_DISPATCH
(
&
v
)
==
(
IDispatch
*
)
&
img_onload_obj
,
"V_DISPATCH(onload) != onloadkFunc
\n
"
);
VariantClear
(
&
v
);
V_VT
(
&
v
)
=
VT_DISPATCH
;
V_DISPATCH
(
&
v
)
=
(
IDispatch
*
)
&
img_onerror_obj
;
hres
=
IHTMLImgElement_put_onerror
(
img
,
v
);
ok
(
hres
==
S_OK
,
"put_onerror failed: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_EMPTY
;
hres
=
IHTMLImgElement_get_onerror
(
img
,
&
v
);
ok
(
hres
==
S_OK
,
"get_onerror failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_DISPATCH
,
"V_VT(onerror) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_DISPATCH
(
&
v
)
==
(
IDispatch
*
)
&
img_onerror_obj
,
"V_DISPATCH(onerror) != onerrorFunc
\n
"
);
VariantClear
(
&
v
);
str
=
a2bstr
(
"http://www.winehq.org/images/winehq_logo_text.png"
);
hres
=
IHTMLImgElement_put_src
(
img
,
str
);
ok
(
hres
==
S_OK
,
"put_src failed: %08x
\n
"
,
hres
);
...
...
@@ -1684,6 +1708,17 @@ static void test_imgload(IHTMLDocument2 *doc)
pump_msgs
(
&
called_img_onload
);
CHECK_CALLED
(
img_onload
);
SET_EXPECT
(
img_onerror
);
str
=
a2bstr
(
"about:blank"
);
hres
=
IHTMLImgElement_put_src
(
img
,
str
);
ok
(
hres
==
S_OK
,
"put_src failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
pump_msgs
(
&
called_img_onerror
);
/* FIXME: should not be needed */
CHECK_CALLED
(
img_onerror
);
IHTMLImgElement_Release
(
img
);
}
...
...
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