chromium/third_party/blink/web_tests/svg/dom/SVGStyleElement.html

<!doctype html>
<title>SVGStyleElement tests</title>
<script src=../../resources/testharness.js></script>
<script src=../../resources/testharnessreport.js></script>
<div id="testcontainer">
<svg width="1" height="1" visibility="hidden">
<defs><style>.test { fill: green; }</style></defs>
</svg>
</div>
<div id=log></div>
<script>
var svg = document.querySelector("svg"),
    style = document.querySelector("style");

test(function() {
    // FIXME: This assertion should be replaced with
    // assert_idl_attribute(style, "sheet", description);
    // http://crbug.com/43394
    assert_true("sheet" in style, "");
}, "SVGStyleElement implements LinkStyle");

test(function() {
    assert_equals(document.styleSheets[0], style.sheet);
}, "document.styleSheets contains style.sheet");

test(function() {
    assert_equals(document.styleSheets[0].ownerNode, style);
}, "sheet has correct ownerNode #1");

test(function() {
    assert_equals(style.sheet.ownerNode, style);
}, "sheet has correct ownerNode #2");

</script>