test_bug1180105.html (1135B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1180105 5 --> 6 <head> 7 <title>Test for Bug 1180105</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 10 </head> 11 <body onload="initializeOnload()"> 12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1180105">Mozilla Bug 1180105</a> 13 <p id="display"></p> 14 <pre id="test"> 15 <script type="application/javascript"> 16 17 SimpleTest.waitForExplicitFinish(); 18 19 const WAITER_URL = "bug1180105-waiter.sjs"; 20 21 function initializeOnload() { 22 var firstimg = document.createElement('img'); 23 firstimg.src = "bug1180105.sjs"; 24 document.getElementById('content').appendChild(firstimg); 25 26 waitForFinish(); 27 } 28 29 function waitForFinish() { 30 var loader = document.getElementById("loader"); 31 loader.src = WAITER_URL; 32 loader.onload = function() { 33 var img = document.getElementsByTagName('img')[0]; 34 ok(img.width > 0, "Image should be loaded by now"); 35 SimpleTest.finish(); 36 }; 37 } 38 39 </script> 40 </pre> 41 <div id="content">> 42 <iframe id="loader"></iframe> 43 </div> 44 </body> 45 </html>