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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-lineHeight.html

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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <div id="target">Test</div>
5 <script>
6 test(function() {
7 var values = [
8 {input: "0.5in", expected: "48px"},
9 {input: "1.27cm", expected: "48px"},
10 {input: "12.7mm", expected: "48px"},
11 {input: "2cm", expected: "75.5906px"},
12 {input: "20mm", expected: "75.5906px"},
13 {input: "24pt", expected: "32px"},
14 {input: "2pc", expected: "32px"},
15 {input: "2em", expected: "32px"},
16 {input: "3ex", expected: "21px"},
17 {input: "200%", expected: "32px"},
18 {input: "2", expected: "32px"},
19 {input: "50px", expected: "50px"},
20 {input: "-1em", expected: "50px"},
21 {input: "normal", expected: "20px"},
22 {input: "inherit", expected: "20px"},
23 ];
24 for (let {input, expected} of values) {
25 target.style.lineHeight = input;
26 assert_equals(getComputedStyle(target).lineHeight, expected);
27 }
28 target.textContent = "";
29 }, 'getComputedStyle(element) should return a length (the used value)');
30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698