5 <title><!-- TODO: insert title here --></title>
6 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel=
"stylesheet" href=
"/tests/SimpleTest/test.css"/>
9 SimpleTest
.waitForExplicitFinish();
10 async
function runTest() {
11 let frame
= document
.getElementById("frame");
12 let loaded
= new Promise((resolve
) => {
13 frame
.addEventListener("load", () => {
14 let failed
= JSON
.parse(frame
.contentDocument
.title
);
15 ok(failed
instanceof Array
, "Frame's title is expected to be a JSON representation of the array of failed conditions.");
16 is(failed
.length
, 0, "No scripts should run in sandboxed iframe document created by XSLT.");
17 for (let desc
of failed
) {
23 frame
.src
= "file_bug1729517.xml";
26 let results
= new Promise((resolve
) => {
27 addEventListener("message", ({ data
}) => {
32 let win
= window
.open(`https://example.com/tests/dom/xslt/tests/mochitest/file_bug1729517_2.xml`);
33 for (const [header
, result
] of await results
) {
34 is(result
, "PASS", `${header} of the source document should apply to document created by XSLT.`);
42 <body onload=
"runTest();">
44 <iframe sandbox=
"allow-same-origin" id=
"frame"></iframe>
45 <div id=
"content" style=
"display: none"></div>