blob: 9d1cae2e7cd7d111d25043175cf72a1a7e37f89f [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<div id="container"></div>
PASS: test did not crash.
<script>
/* Build the following shadow tree structure to verify that <svg> elements always
* receive a LayoutSVGRoot renderer when their parent is <foreignObject>:
* <svg>
* <foreignObject>
* <svg></svg>
* </foreignObject>
* </svg>
*/
function create_shadow() {
var root = document.getElementById('container').createShadowRoot();
var svg1 = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
root.appendChild(svg1);
var fo = document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject');
svg1.appendChild(fo);
var svg2 = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
fo.appendChild(svg2);
}
if (window.testRunner) {
create_shadow();
testRunner.dumpAsText();
}
</script>
</body>
</html>