Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/ruby/script-tests/ruby-line-height.js

Issue 1820773002: getComputedStyle() should return used value for 'line-height' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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'>&quot;line-height: 48px;&quot;</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'>&quot;line-height: 48px;&quot;</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");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698