<!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; }
#t7, #t7 g { display: contents; }
</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>
<svg id="t7"><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");
test(function(){ assert_equals(getComputedStyle(document.querySelector("#t7")).display, "none"); }, "svg:svg display contents computes to none");
test(function(){ assert_equals(getComputedStyle(document.querySelector("#t7 g")).display, "contents"); }, "svg:g display contents computes to contents");
</script>