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 = "

The line height of this is three times normal"line-height: 48px;", but the ruby should have 'line-height: normal'.

"; document.body.appendChild(div); shouldBeEqualToString("getLineHeight('p')", "48px"); shouldBeEqualToString("getLineHeight('r')", "normal"); shouldBeEqualToString("getLineHeight('t')", "normal");