Commit 732a29d6 authored by Tim Huang's avatar Tim Huang
Browse files

Bug 1586713 - Making the test...

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
parent 197f5544
......@@ -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."
......
Supports Markdown
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