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

Unified Diff: LayoutTests/svg/css/display-computed.html

Issue 379463002: Display property as specified on svg elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « LayoutTests/svg/css/display.html ('k') | LayoutTests/svg/css/display-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/css/display-computed.html
diff --git a/LayoutTests/svg/css/display-computed.html b/LayoutTests/svg/css/display-computed.html
new file mode 100644
index 0000000000000000000000000000000000000000..839b2de37b9c018c2db7a7fa0d5ddc4c323b68f5
--- /dev/null
+++ b/LayoutTests/svg/css/display-computed.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+svg { width: 0; height: 0; }
+#t1, #t1 g { display: inline }
+#t2, #t2 g { display: block; }
+#t3, #t3 g { display: inline-block; }
+#t4, #t4 g { display: inline-table; }
+#t5, #t5 g { display: table; }
+#t6, #t6 g { display: table-cell; }
+</style>
+<svg id="t1"><g/></svg>
+<svg id="t2"><g/></svg>
+<svg id="t3"><g/></svg>
+<svg id="t4"><g/></svg>
+<svg id="t5"><g/></svg>
+<svg id="t6"><g/></svg>
+<script>
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t1")).display, "inline"); }, "svg:svg display inline");
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t1 g")).display, "inline"); }, "svg:g display inline");
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t2")).display, "block"); }, "svg:svg display block");
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t2 g")).display, "block"); }, "svg:g display block");
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t3")).display, "inline-block"); }, "svg:svg display inline-block");
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t3 g")).display, "inline-block"); }, "svg:g display inline-block");
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t4")).display, "inline-table"); }, "svg:svg display inline-table");
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t4 g")).display, "inline-table"); }, "svg:g display inline-table");
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t5")).display, "table"); }, "svg:svg display table");
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t5 g")).display, "table"); }, "svg:g display table");
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t6")).display, "table-cell"); }, "svg:svg display table-cell");
+test(function(){ assert_equals(getComputedStyle(document.querySelector("#t6 g")).display, "table-cell"); }, "svg:g display table-cell");
+</script>
« no previous file with comments | « LayoutTests/svg/css/display.html ('k') | LayoutTests/svg/css/display-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698