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
39f86db5
Commit
39f86db5
authored
Dec 06, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Dec 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Expose the other IHTMLEventObj* interfaces.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
457a6fd4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
8 deletions
+59
-8
htmlevent.c
dlls/mshtml/htmlevent.c
+0
-0
events.c
dlls/mshtml/tests/events.c
+50
-8
events.html
dlls/mshtml/tests/events.html
+9
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
39f86db5
This diff is collapsed.
Click to expand it.
dlls/mshtml/tests/events.c
View file @
39f86db5
...
...
@@ -394,6 +394,9 @@ static void _elem_fire_event(unsigned line, IUnknown *unk, const WCHAR *event, V
static
void
_test_event_args
(
unsigned
line
,
const
IID
*
dispiid
,
DISPID
id
,
WORD
wFlags
,
DISPPARAMS
*
pdp
,
VARIANT
*
pvarRes
,
EXCEPINFO
*
pei
,
IServiceProvider
*
pspCaller
)
{
IHTMLEventObj
*
window_event
,
*
event_obj
=
NULL
;
HRESULT
hres
;
ok_
(
__FILE__
,
line
)
(
id
==
DISPID_VALUE
,
"id = %ld
\n
"
,
id
);
ok_
(
__FILE__
,
line
)
(
wFlags
==
DISPATCH_METHOD
,
"wFlags = %x
\n
"
,
wFlags
);
ok_
(
__FILE__
,
line
)
(
pdp
!=
NULL
,
"pdp == NULL
\n
"
);
...
...
@@ -411,10 +414,11 @@ static void _test_event_args(unsigned line, const IID *dispiid, DISPID id, WORD
if
(
dispiid
)
_test_disp
(
line
,
(
IUnknown
*
)
V_DISPATCH
(
pdp
->
rgvarg
),
dispiid
);
hres
=
IHTMLWindow2_get_event
(
window
,
&
window_event
);
ok
(
hres
==
S_OK
,
"get_event failed: %08lx
\n
"
,
hres
);
if
(
pdp
->
cArgs
>
1
)
{
IHTMLEventObj
*
window_event
,
*
event_obj
;
IDOMEvent
*
event
;
HRESULT
hres
;
hres
=
IDispatch_QueryInterface
(
V_DISPATCH
(
pdp
->
rgvarg
+
1
),
&
IID_IDOMEvent
,
(
void
**
)
&
event
);
if
(
in_fire_event
)
...
...
@@ -424,24 +428,62 @@ static void _test_event_args(unsigned line, const IID *dispiid, DISPID id, WORD
hres
=
IDispatch_QueryInterface
(
V_DISPATCH
(
pdp
->
rgvarg
+
1
),
&
IID_IHTMLEventObj
,
(
void
**
)
&
event_obj
);
if
(
in_fire_event
)
ok
(
hres
==
S_OK
,
"Could not get I
DOM
EventObj iface: %08lx
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Could not get I
HTML
EventObj iface: %08lx
\n
"
,
hres
);
else
ok
(
hres
==
E_NOINTERFACE
,
"QI(IID_IHTMLEventObj) returned %08lx
\n
"
,
hres
);
if
(
event
)
IDOMEvent_Release
(
event
);
if
(
event_obj
)
IHTMLEventObj_Release
(
event_obj
);
hres
=
IHTMLWindow2_get_event
(
window
,
&
window_event
);
ok
(
hres
==
S_OK
,
"get_event failed: %08lx
\n
"
,
hres
);
if
(
window_event
)
{
todo_wine_if
(
in_fire_event
)
ok
(
!
iface_cmp
((
IUnknown
*
)
V_DISPATCH
(
pdp
->
rgvarg
+
1
),
(
IUnknown
*
)
window_event
),
"window_event != event arg
\n
"
);
IHTMLEventObj_Release
(
window_event
);
}
}
if
(
window_event
)
{
if
(
!
event_obj
)
event_obj
=
window_event
;
else
IHTMLEventObj_Release
(
window_event
);
}
if
(
event_obj
)
{
IHTMLEventObj5
*
event_obj5
;
IDispatch
*
disp
;
BSTR
bstr
;
hres
=
IHTMLEventObj_QueryInterface
(
event_obj
,
&
IID_IHTMLEventObj5
,
(
void
**
)
&
event_obj5
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLEventObj5: %08lx
\n
"
,
hres
);
IHTMLEventObj_Release
(
event_obj
);
hres
=
IHTMLEventObj5_get_data
(
event_obj5
,
&
bstr
);
ok
(
hres
==
S_OK
,
"get_data failed: %08lx
\n
"
,
hres
);
ok
(
!
bstr
,
"data = %s
\n
"
,
wine_dbgstr_w
(
bstr
));
hres
=
IHTMLEventObj5_get_origin
(
event_obj5
,
&
bstr
);
ok
(
hres
==
S_OK
,
"get_origin failed: %08lx
\n
"
,
hres
);
ok
(
!
bstr
,
"origin = %s
\n
"
,
wine_dbgstr_w
(
bstr
));
hres
=
IHTMLEventObj5_get_source
(
event_obj5
,
&
disp
);
ok
(
hres
==
S_OK
,
"get_source failed: %08lx
\n
"
,
hres
);
ok
(
!
disp
,
"source != NULL
\n
"
);
hres
=
IHTMLEventObj5_get_url
(
event_obj5
,
&
bstr
);
ok
(
hres
==
S_OK
,
"get_url failed: %08lx
\n
"
,
hres
);
ok
(
!
bstr
,
"url = %s
\n
"
,
wine_dbgstr_w
(
bstr
));
bstr
=
SysAllocString
(
L"foobar"
);
hres
=
IHTMLEventObj5_put_origin
(
event_obj5
,
bstr
);
ok
(
hres
==
DISP_E_MEMBERNOTFOUND
,
"put_origin returned: %08lx
\n
"
,
hres
);
hres
=
IHTMLEventObj5_put_url
(
event_obj5
,
bstr
);
ok
(
hres
==
DISP_E_MEMBERNOTFOUND
,
"put_url returned: %08lx
\n
"
,
hres
);
SysFreeString
(
bstr
);
IHTMLEventObj5_Release
(
event_obj5
);
}
}
#define test_attached_event_args(a,b,c,d,e) _test_attached_event_args(__LINE__,a,b,c,d,e)
...
...
dlls/mshtml/tests/events.html
View file @
39f86db5
...
...
@@ -283,7 +283,16 @@ function test_attach_in_attach() {
document
.
body
.
removeChild
(
div
);
}
function
test_event_obj_props
(
e
)
{
var
i
,
props
;
props
=
[
"imeCompositionChange"
,
"imeNotifyCommand"
,
"imeNotifyData"
,
"imeRequest"
,
"imeRequestData"
,
"issession"
,
"keyboardLayout"
];
for
(
i
=
0
;
i
<
props
.
length
;
i
++
)
ok
(
!
(
props
[
i
]
in
e
),
props
[
i
]
+
" in event obj"
);
}
window
.
onload
=
function
()
{
test_event_obj_props
(
window
.
event
);
try
{
ok
(
inlscr_complete_called
,
"onreadystatechange not fired"
);
ok
(
extern_res_script_rs
===
"eval,complete1,"
||
extern_res_script_rs
==
"loaded0,eval,complete1,"
,
...
...
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