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 SimpleTest
.requestFlakyTimeout("Use a timeout to check that a load doesn't happen.");
12 async
function runTest() {
13 function refreshed(frame
) {
14 return new Promise((resolve
) => {
15 frame
.addEventListener("load", () => {
16 let timeout
= setTimeout(() => {
19 frame
.addEventListener("load", () => {
20 clearTimeout(timeout
);
27 let frame
= document
.getElementById("frame");
28 let result
= refreshed(frame
);
29 frame
.src
= "file_metaRefresh.xml";
30 is(await result
, true, "Meta refresh should work in iframe document created by XSLT.");
32 let sandBoxedFrame
= document
.getElementById("sandBoxedFrame");
33 result
= refreshed(sandBoxedFrame
);
34 sandBoxedFrame
.src
= "file_metaRefresh.xml";
35 is(await result
, false, "Meta refresh shouldn't work in sandboxed iframe document created by XSLT.");
41 <body onload=
"runTest();">
43 <iframe id=
"frame"></iframe>
44 <iframe sandbox=
"allow-same-origin" id=
"sandBoxedFrame"></iframe>
45 <div id=
"content" style=
"display: none"></div>