test_object-delayed-intrinsic-size.html (1250B)
1 <!DOCTYPE html> 2 <!-- 3 https://bugzilla.mozilla.org/show_bug.cgi?id=1063073 4 --> 5 <html> 6 <head> 7 <title>Test that <object> embedding SVG and using its intrinsic 8 size will resize if the <object> gets a reflow before the 9 root-<svg> gets its nsSVGOuterSVGFrame 10 </title> 11 <script src="/tests/SimpleTest/SimpleTest.js"></script> 12 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 13 <script> 14 15 // This test checks for a race condition. If it fails intermittently then it 16 // may actually be a full failure. 17 18 SimpleTest.waitForExplicitFinish(); 19 20 function runTest() { 21 var object = document.querySelector("object"); 22 var cs = document.defaultView.getComputedStyle(object); 23 var width = cs.getPropertyValue("width"); 24 is(width, "70px", "Check that the <object> size updated"); 25 SimpleTest.finish(); 26 } 27 28 </script> 29 </head> 30 <body onload="runTest();"> 31 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1063073">Mozilla Bug 1063073</a> 32 <p id="display"></p> 33 <div id="content"> 34 <object style="border:1px solid black" type="image/svg+xml" 35 data="object-delayed-intrinsic-size.sjs"></object> 36 </div> 37 </body> 38 </html>