Chromium Code Reviews| Index: LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html |
| diff --git a/LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html b/LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e7f8cf7b0e87936a78b0cae55dee9cec9d7f9acf |
| --- /dev/null |
| +++ b/LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html |
| @@ -0,0 +1,34 @@ |
| +<!DOCTYPE html> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<style type="text/css"> |
| + body > div { width: 100px } |
| + #stf1 { float: left } |
| + #stf2 { position: absolute } |
| + #stf3 { display: table-cell } |
| +</style> |
| +<div> |
| + <div id="stf1"> |
| + <svg viewBox='0 0 1 1'></svg> |
| + </div> |
| + <div id="stf2"> |
| + <svg viewBox='0 0 1 1'></svg> |
| + </div> |
| + <div id="stf3"> |
| + <svg viewBox='0 0 1 1'></svg> |
| + </div> |
| +</div> |
| +<script> |
| + test(function() { |
| + var r = document.getElementById('stf1').getBoundingClientRect(); |
| + assert_equals(r.width, 0); |
| + }, "Test floated element width with replaced element with intrinsic ratio but no dimensions"); |
| + test(function() { |
| + var r = document.getElementById('stf2').getBoundingClientRect(); |
| + assert_equals(r.width, 0); |
| + }, "Test absolute positioned element width with replaced element with intrinsic ratio but no dimensions"); |
| + test(function() { |
| + var r = document.getElementById('stf3').getBoundingClientRect(); |
| + assert_true(r.width == 1 || r.width == 0); // Unclear if width should be 0 or 1. (Firefox and Blink doesn't agree) |
|
pdr.
2014/06/18 17:48:43
Lets pick one but leave the comment. This will let
davve
2014/06/18 19:16:47
Fair. Will fix grammar in the comment though :)
|
| + }, "Test table cell width with replaced element with intrinsic ratio but no dimensions"); |
| +</script> |