| OLD | NEW |
| 1 description("Test that the CSS property 'line-height' is not applied to ruby bas
e and annotation texts."); | 1 description("Test that the CSS property 'line-height' is not applied to ruby bas
e and annotation texts."); |
| 2 | 2 |
| 3 function getLineHeight(id) | 3 function getLineHeight(id) |
| 4 { | 4 { |
| 5 var element = document.getElementById(id); | 5 var element = document.getElementById(id); |
| 6 shouldBeNonNull(element); | 6 shouldBeNonNull(element); |
| 7 var lineHeight = window.getComputedStyle(element, null).getPropertyValue("li
ne-height"); | 7 var lineHeight = window.getComputedStyle(element, null).getPropertyValue("li
ne-height"); |
| 8 return lineHeight; | 8 return lineHeight; |
| 9 } | 9 } |
| 10 | 10 |
| 11 var div = document.createElement("div"); | 11 var div = document.createElement("div"); |
| 12 div.innerHTML = "<p style='line-height: 300%' id='p'>The line height of this is
<ruby id='r'>three times normal<rt id='t'>"line-height: 48px;"</rt></r
uby>, but the ruby should have 'line-height: normal'.</p>"; | 12 div.innerHTML = "<p style='line-height: 300%' id='p'>The line height of this is
<ruby id='r'>three times normal<rt id='t'>"line-height: 48px;"</rt></r
uby>, but the ruby should have 'line-height: normal'.</p>"; |
| 13 document.body.appendChild(div); | 13 document.body.appendChild(div); |
| 14 | 14 |
| 15 shouldBeEqualToString("getLineHeight('p')", "48px"); | 15 shouldBeEqualToString("getLineHeight('p')", "48px"); |
| 16 shouldBeEqualToString("getLineHeight('r')", "normal"); | 16 shouldBeEqualToString("getLineHeight('r')", "normal"); |
| 17 shouldBeEqualToString("getLineHeight('t')", "normal"); | 17 shouldBeEqualToString("getLineHeight('t')", "12px"); |
| OLD | NEW |