6 <title>PDFjs: Load a PDF in an iframe.
</title>
7 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
8 <script src=
"/tests/SimpleTest/EventUtils.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
14 <script type=
"text/javascript">
17 async
function test() {
18 await SpecialPowers
.pushPrefEnv({
19 "set": [["pdfjs.disabled", false]],
22 const iframe
= document
.createElement("iframe");
23 document
.body
.append(iframe
);
24 iframe
.src
= "file_pdfjs_test.pdf";
25 iframe
.onload
= async () => {
26 const hasViewerContainer
= await SpecialPowers
.spawn(
29 () => !!this.content
.document
.getElementById("viewerContainer")
33 "The iframe with a pdf must have a `viewerContainer`"
39 window
.onload
= () => {
40 SimpleTest
.waitForExplicitFinish();