mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
Bug 1586713 - Making the test 'browser/components/originattributes/test/browser/browser_postMessage.js' working in Fission. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D48699 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
197f5544a3
commit
732a29d64f
@ -102,7 +102,6 @@ fail-if = fission
|
||||
[browser_permissions.js]
|
||||
fail-if = fission
|
||||
[browser_postMessage.js]
|
||||
skip-if = fission
|
||||
[browser_sanitize.js]
|
||||
fail-if = fission
|
||||
skip-if = (os == 'win') || (os == "mac" && os_version == "10.14") || (os == "linux" && bits == 64) #Bug 1544810
|
||||
|
@ -43,7 +43,7 @@ async function runTestWithOptions(
|
||||
senderURL,
|
||||
true
|
||||
);
|
||||
ContentTask.spawn(tab.linkedBrowser, senderURL, aSenderPath => {
|
||||
SpecialPowers.spawn(tab.linkedBrowser, [senderURL], aSenderPath => {
|
||||
content.open(aSenderPath, "_blank");
|
||||
});
|
||||
|
||||
@ -56,18 +56,18 @@ async function runTestWithOptions(
|
||||
// 'privacy.firstparty.isolate.block_post_message' is true.
|
||||
let shouldBlock = aDifferentFPD && (!aStarTargetOrigin || aBlockAcrossFPD);
|
||||
|
||||
await ContentTask.spawn(tab.linkedBrowser, shouldBlock, async aValue => {
|
||||
await SpecialPowers.spawn(tab.linkedBrowser, [shouldBlock], async aValue => {
|
||||
await new Promise(resolve => {
|
||||
content.addEventListener("message", function eventHandler(aEvent) {
|
||||
if (aEvent.data === "Self") {
|
||||
if (aValue) {
|
||||
is(
|
||||
Assert.equal(
|
||||
content.document.getElementById("display").innerHTML,
|
||||
"",
|
||||
"It should not get a message from other OA."
|
||||
);
|
||||
} else {
|
||||
is(
|
||||
Assert.equal(
|
||||
content.document.getElementById("display").innerHTML,
|
||||
"Message",
|
||||
"It should get a message from the same OA."
|
||||
|
Loading…
Reference in New Issue
Block a user