blob: 97e5cb1b2d14539959afc20d2707c93d84156dd3 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Test that the CSS property 'line-height' is not applied to ruby base and annotation texts.");
function getLineHeight(id)
{
var element = document.getElementById(id);
shouldBeNonNull(element);
var lineHeight = window.getComputedStyle(element, null).getPropertyValue("line-height");
return lineHeight;
}
var div = document.createElement("div");
div.innerHTML = "<p style='line-height: 300%' id='p'>The line height of this is <ruby id='r'>three times normal<rt id='t'>&quot;line-height: 48px;&quot;</rt></ruby>.</p>";
document.body.appendChild(div);
shouldBeEqualToString("getLineHeight('p')", "48px");
shouldBeEqualToString("getLineHeight('r')", "48px");
shouldBeEqualToString("getLineHeight('t')", "10px");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>