Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/custom/svg-image-intrinsic-size-with-cssstyle-auto-dynamic-image-change.html |
| diff --git a/third_party/WebKit/LayoutTests/svg/custom/svg-image-intrinsic-size-with-cssstyle-auto-dynamic-image-change.html b/third_party/WebKit/LayoutTests/svg/custom/svg-image-intrinsic-size-with-cssstyle-auto-dynamic-image-change.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5503fcdea88e661a48cf24784dafdc0e6e6c6905 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/svg/custom/svg-image-intrinsic-size-with-cssstyle-auto-dynamic-image-change.html |
| @@ -0,0 +1,23 @@ |
| +<!DOCTYPE html> |
| +<title>Test <svg:image>'s sizing with css size as auto, with dynamic image change</title> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<svg height="0"> |
| + <image width="200" height="200" xlink:href="resources/square-green-checker.png" style="width:auto; height:auto"/> |
| +</svg> |
| +<script> |
| +async_test(function(t) { |
| + var image = document.querySelector('image'); |
| + window.onload = t.step_func(function() { |
| + var rectBBox = image.getBBox(); |
| + assert_equals(rectBBox.width, 400); |
| + assert_equals(rectBBox.height, 400); |
| + image.setAttributeNS("http://www.w3.org/1999/xlink","href","data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'></svg>"); |
| + image.onload = t.step_func_done(function() { |
| + var rectBBox = image.getBBox(); |
| + assert_equals(rectBBox.width, 100); |
| + assert_equals(rectBBox.height, 100); |
| + }); |
| + }); |
| +}, document.title); |
|
fs
2016/09/14 11:31:52
document.title not needed here (it's the default.)
Shanmuga Pandi
2016/09/14 13:15:36
Done.
|
| +</script> |