mshtml: Added IHTMLWindow6::postMessage semi-stub implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
feed9d4750
commit
6fd383e8df
|
@ -2134,8 +2134,16 @@ static HRESULT WINAPI HTMLWindow6_get_maxConnectionsPerServer(IHTMLWindow6 *ifac
|
|||
static HRESULT WINAPI HTMLWindow6_postMessage(IHTMLWindow6 *iface, BSTR msg, VARIANT targetOrigin)
|
||||
{
|
||||
HTMLWindow *This = impl_from_IHTMLWindow6(iface);
|
||||
FIXME("(%p)->(%s %s)\n", This, debugstr_w(msg), debugstr_variant(&targetOrigin));
|
||||
return E_NOTIMPL;
|
||||
|
||||
FIXME("(%p)->(%s %s) semi-stub\n", This, debugstr_w(msg), debugstr_variant(&targetOrigin));
|
||||
|
||||
if(!This->inner_window->doc) {
|
||||
FIXME("No document\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
fire_event(This->inner_window->doc, EVENTID_MESSAGE, TRUE, &This->inner_window->doc->node, NULL, NULL);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLWindow6_toStaticHTML(IHTMLWindow6 *iface, BSTR bstrHTML, BSTR *pbstrStaticHTML)
|
||||
|
|
|
@ -362,6 +362,15 @@ function test_xhr() {
|
|||
ok(typeof(xhr) === "object", "typeof(xhr) = " + typeof(xhr));
|
||||
}
|
||||
|
||||
function test_sendMessage() {
|
||||
var onmessage_called = false;
|
||||
window.onmessage = function() {
|
||||
onmessage_called = true;
|
||||
}
|
||||
window.postMessage("test", "*");
|
||||
ok(onmessage_called, "onmessage not called");
|
||||
}
|
||||
|
||||
var globalVar = false;
|
||||
|
||||
function runTests() {
|
||||
|
@ -388,6 +397,7 @@ function runTests() {
|
|||
test_language_attribute();
|
||||
test_text_node();
|
||||
test_xhr();
|
||||
test_sendMessage();
|
||||
|
||||
var r = window.execScript("globalVar = true;");
|
||||
ok(r === undefined, "execScript returned " + r);
|
||||
|
|
Loading…
Reference in New Issue