test_bug1325080.html (1065B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1325080 5 --> 6 <head> 7 <title>Test for Bug 1325080</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> 12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1325080">Mozilla Bug 1325080</a> 13 <pre id="test"> 14 <script type="application/javascript"> 15 /** Test for Bug 1325080 */ 16 17 SimpleTest.waitForExplicitFinish(); 18 19 function createImage() { 20 // This function's code comes from the Acid3 test #72 21 document.open(); 22 document.write('<!DOCTYPE html><head><style>img { height: 10px; }</style></head><body><img src="data:image/gif;base64,R0lGODlhAQABAID%2FAMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw%3D%3D" alt="alt-text"></body>'); 23 document.close(); 24 } 25 26 window.onload = function() { 27 createImage(); 28 SimpleTest.executeSoon(() => { 29 ok(document.images[0].height == 10, "Style should set height of image."); 30 SimpleTest.finish(); 31 }); 32 } 33 34 </script> 35 </pre> 36 </body> 37 </html>