Chromium Code Reviews| Index: LayoutTests/svg/in-html/sizing/svg-inline-vertical.html |
| diff --git a/LayoutTests/svg/in-html/sizing/svg-inline-vertical.html b/LayoutTests/svg/in-html/sizing/svg-inline-vertical.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1addc2dc73a85538ae01cfb25a6d7a758fbc1764 |
| --- /dev/null |
| +++ b/LayoutTests/svg/in-html/sizing/svg-inline-vertical.html |
| @@ -0,0 +1,40 @@ |
| +<!doctype html> |
| +<title>Test SVG sizing in vertical writing mode</title> |
| +<script src="../../../resources/testharness.js"></script> |
| +<script src="../../../resources/testharnessreport.js"></script> |
| +<style> |
| + div { |
| + -webkit-writing-mode: vertical-rl; |
| + writing-mode: vertical-rl; |
| + height: 200px; |
| + } |
| +</style> |
| +<div> |
| + <!-- All SVGs expected size is 100x200 --> |
| + <svg width="100" height="200"> |
| + <rect x="0" y="0" width="100" height="200" fill="lime" stroke="black" stroke-width="10"/> |
| + </svg> |
| + <svg style="width: auto !important; height: auto !important" width="100" height="200"> |
| + <rect x="0" y="0" width="100" height="200" fill="lime" stroke="black" stroke-width="10"/> |
| + </svg> |
| + <svg viewBox="0 0 100 200"> |
| + <rect x="0" y="0" width="100" height="200" fill="lime" stroke="black" stroke-width="10"/> |
| + </svg> |
| + <svg width="100" viewBox="0 0 100 200"> |
| + <rect x="0" y="0" width="100" height="200" fill="lime" stroke="black" stroke-width="10"/> |
| + </svg> |
| + <svg heigth="200" viewBox="0 0 100 200"> |
|
fs
2015/05/07 08:33:31
heigth
|
| + <rect x="0" y="0" width="100" height="200" fill="lime" stroke="black" stroke-width="10"/> |
| + </svg> |
| +</div> |
| +<script> |
| + var svgs = document.querySelectorAll('svg'); |
| + [].forEach.call(svgs, function (svg) { |
| + test(function() { |
| + var bounds = svg.getBoundingClientRect(); |
| + assert_equals(bounds.height, 200, "Height"); |
| + assert_equals(bounds.width, 100, "Width"); |
| + |
| + }, "Test size calculation in vertical writing mode"); |
| + }); |
| +</script> |