OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style>iframe { border:none }</style> |
| 3 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharnessreport.js"></script> |
| 5 <iframe src="../as-image/resources/200x200-blue-rect.svg"> |
| 6 </iframe> |
| 7 <script> |
| 8 t = async_test("Test <iframe> and <svg> size"); |
| 9 function check() { |
| 10 var iframe = document.querySelector('iframe'); |
| 11 var svg = iframe.contentDocument.documentElement; |
| 12 |
| 13 assert_equals(iframe.offsetWidth, 300, "width should be fallback width."
); |
| 14 assert_equals(iframe.offsetHeight, 150, "height should be the fallback h
eight 150."); |
| 15 assert_equals(svg.offsetWidth, svg.width.baseVal.value, "width should be
what the <svg> requests."); |
| 16 assert_equals(svg.offsetHeight, svg.height.baseVal.value, "height should
be what the <svg> requests."); |
| 17 |
| 18 t.done(); |
| 19 } |
| 20 t.step(function() { |
| 21 addEventListener('load', t.step_func(check)); |
| 22 }); |
| 23 </script> |
| 24 <div id="log"></div> |
OLD | NEW |