test_bug1499169.html (1179B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1499139 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title>Test for Bug 1499169</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <script src="/tests/SimpleTest/SpecialPowers.js"></script> 11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 12 <script type="application/javascript"> 13 SimpleTest.waitForExplicitFinish(); 14 15 function test() { 16 const OBJLC = SpecialPowers.Ci.nsIObjectLoadingContent; 17 let obj = document.getElementById("pdftest"); 18 19 obj instanceof OBJLC; 20 obj = SpecialPowers.wrap(obj); 21 22 // Make sure we've set our type correctly even though the mime type isn't quite as expected. 23 ok(obj.displayedType == OBJLC.TYPE_DOCUMENT, "expected document type"); 24 SimpleTest.finish(); 25 } 26 </script> 27 </head> 28 <body> 29 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1499169">Mozilla Bug 1499169</a> 30 <object id="pdftest" onload="test()" data="file_pdfjs_test.pdf" type="application/pdf;charset=UTF-8" width="90%" height="600"></object> 31 </body> 32 </html>