Commit 266ac9a8 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Implement `data` getter for MessageEvent objs.

parent 69d4be9f
...@@ -1831,11 +1831,19 @@ static HRESULT WINAPI HTMLEventObj5_put_data(IHTMLEventObj5 *iface, BSTR v) ...@@ -1831,11 +1831,19 @@ static HRESULT WINAPI HTMLEventObj5_put_data(IHTMLEventObj5 *iface, BSTR v)
static HRESULT WINAPI HTMLEventObj5_get_data(IHTMLEventObj5 *iface, BSTR *p) static HRESULT WINAPI HTMLEventObj5_get_data(IHTMLEventObj5 *iface, BSTR *p)
{ {
HTMLEventObj *This = impl_from_IHTMLEventObj5(iface); HTMLEventObj *This = impl_from_IHTMLEventObj5(iface);
IDOMMessageEvent *message_event;
HRESULT hres;
FIXME("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
*p = NULL; if(!This->event || FAILED(IDOMEvent_QueryInterface(&This->event->IDOMEvent_iface, &IID_IDOMMessageEvent, (void**)&message_event))) {
return S_OK; *p = NULL;
return S_OK;
}
hres = IDOMMessageEvent_get_data(message_event, p);
IDOMMessageEvent_Release(message_event);
return hres;
} }
static HRESULT WINAPI HTMLEventObj5_get_source(IHTMLEventObj5 *iface, IDispatch **p) static HRESULT WINAPI HTMLEventObj5_get_source(IHTMLEventObj5 *iface, IDispatch **p)
......
...@@ -1537,6 +1537,11 @@ static HRESULT WINAPI onmessage(IDispatchEx *iface, DISPID id, LCID lcid, WORD w ...@@ -1537,6 +1537,11 @@ static HRESULT WINAPI onmessage(IDispatchEx *iface, DISPID id, LCID lcid, WORD w
ok(hres == S_OK, "get_url failed: %08lx\n", hres); ok(hres == S_OK, "get_url failed: %08lx\n", hres);
ok(!bstr, "url = %s\n", wine_dbgstr_w(bstr)); ok(!bstr, "url = %s\n", wine_dbgstr_w(bstr));
hres = IHTMLEventObj5_get_data(event_obj5, &bstr);
ok(hres == S_OK, "get_data failed: %08lx\n", hres);
ok(!wcscmp(bstr, L"foobar"), "data = %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr);
hres = IHTMLEventObj5_get_source(event_obj5, &disp); hres = IHTMLEventObj5_get_source(event_obj5, &disp);
ok(hres == S_OK, "get_source failed: %08lx\n", hres); ok(hres == S_OK, "get_source failed: %08lx\n", hres);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment