Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Unified Diff: LayoutTests/svg/in-html/sizing/svg-inline-vertical.html

Issue 1129763002: Add tests for SVG sizing inside vertical writing mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Full change with updated expected file Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/svg/in-html/sizing/svg-inline-vertical-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9335e520075d6415d11120b383a09ab4d9b2c075
--- /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 height="200" viewBox="0 0 100 200">
+ <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>
« no previous file with comments | « no previous file | LayoutTests/svg/in-html/sizing/svg-inline-vertical-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698