2 <script src="../../resources/js-test.js"></script>
3 <svg viewBox="0 0 250 250">
4 <foreignObject width="250" height="250">
5 <svg style="height:100%; background: blue">
10 description("Test use of percentages inside foreignObject");
12 var nestedSvg = document.querySelectorAll('svg')[1];
13 shouldBe("nestedSvg.offsetHeight", "250");
15 nestedSvg.style.height = "50%";
16 shouldBe("nestedSvg.offsetHeight", "125");
18 var foreignObject = nestedSvg.parentNode;
19 foreignObject.height.baseVal.value = 400;
20 shouldBe("nestedSvg.offsetHeight", "200");