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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/font-shorthand-line-height.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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script> 2 <script src="../../resources/js-test.js"></script>
3 <style> 3 <style>
4 #system_font_1 { font: caption; line-height: 100px; } 4 #system_font_1 { font: caption; line-height: 100px; }
5 #system_font_2 { line-height: 100px; font: caption; } 5 #system_font_2 { line-height: 100px; font: caption; }
6 6
7 #shorthand_normal_1 { font: 10px monospace; line-height: 100px; } 7 #shorthand_normal_1 { font: 10px monospace; line-height: 100px; }
8 #shorthand_normal_2 { line-height: 100px; font: 10px monospace; } 8 #shorthand_normal_2 { line-height: 100px; font: 10px monospace; }
9 9
10 #shorthand_line_height_1 { font: 10px/200px monospace; line-height: 100px; } 10 #shorthand_line_height_1 { font: 10px/200px monospace; line-height: 100px; }
11 #shorthand_line_height_2 { line-height: 100px; font: 10px/200px monospace; } 11 #shorthand_line_height_2 { line-height: 100px; font: 10px/200px monospace; }
12 </style> 12 </style>
13 <div id="system_font_1"></div> 13 <div id="system_font_1"></div>
14 <div id="system_font_2"></div> 14 <div id="system_font_2"></div>
15 <div id="shorthand_normal_1"></div> 15 <div id="shorthand_normal_1"></div>
16 <div id="shorthand_normal_2"></div> 16 <div id="shorthand_normal_2"></div>
17 <div id="shorthand_line_height_1"></div> 17 <div id="shorthand_line_height_1"></div>
18 <div id="shorthand_line_height_2"></div> 18 <div id="shorthand_line_height_2"></div>
19 <script> 19 <script>
20 description("Test that line-height in font shorthands cascades correctly."); 20 description("Test that line-height in font shorthands cascades correctly.");
21 21
22 function lineHeight(target) { 22 function lineHeight(target) {
23 return getComputedStyle(target).lineHeight; 23 return getComputedStyle(target).lineHeight;
24 } 24 }
25 25
26 shouldBe("lineHeight(system_font_1)", "'100px'"); 26 shouldBe("lineHeight(system_font_1)", "'100px'");
27 shouldBe("lineHeight(system_font_2)", "'normal'"); 27 shouldNotBe("lineHeight(system_font_2)", "'100px'");
28 shouldBe("lineHeight(shorthand_normal_1)", "'100px'"); 28 shouldBe("lineHeight(shorthand_normal_1)", "'100px'");
29 shouldBe("lineHeight(shorthand_normal_2)", "'normal'"); 29 shouldNotBe("lineHeight(shorthand_normal_2)", "'100px'");
30 shouldBe("lineHeight(shorthand_line_height_1)", "'100px'"); 30 shouldBe("lineHeight(shorthand_line_height_1)", "'100px'");
31 shouldBe("lineHeight(shorthand_line_height_2)", "'200px'"); 31 shouldBe("lineHeight(shorthand_line_height_2)", "'200px'");
32 </script> 32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698