mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 754202 - Fix content->chrome postMessage mochitest. r=bz
This isn't something we actually support, and were using enablePrivilege to do it before. When we switch this to SpecialPowers wrapping, the sender origin becomes a chrome URL (not very interesting) and the source window becomes null (which we do explicitly in nsGlobalWindow for chrome callers). So those tests stop being useful.
This commit is contained in:
parent
8e29601934
commit
c4dfbb7e93
@ -37,9 +37,7 @@
|
|||||||
|
|
||||||
function respond(msg)
|
function respond(msg)
|
||||||
{
|
{
|
||||||
// ...so get privileges and test that this works with privileges
|
SpecialPowers.wrap(window).parent.postMessage(msg, "*");
|
||||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
||||||
window.parent.postMessage(msg, "*");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("message", receiveMessage, false);
|
window.addEventListener("message", receiveMessage, false);
|
||||||
|
@ -93,10 +93,6 @@ function chromePathIsSet(evt)
|
|||||||
function receiveContent(evt)
|
function receiveContent(evt)
|
||||||
{
|
{
|
||||||
is(evt.isTrusted, true, "should have sent a trusted event");
|
is(evt.isTrusted, true, "should have sent a trusted event");
|
||||||
is(evt.origin, "http://example.org", "content response event has wrong URI");
|
|
||||||
is(evt.source, window.frames.contentDomain,
|
|
||||||
"wrong source for same-domain message!");
|
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user