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

Unified Diff: LayoutTests/fast/css/font-shorthand-line-height.html

Issue 678483005: Add a test for font/line-height cascade. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/css/font-shorthand-line-height-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/font-shorthand-line-height.html
diff --git a/LayoutTests/fast/css/font-shorthand-line-height.html b/LayoutTests/fast/css/font-shorthand-line-height.html
new file mode 100644
index 0000000000000000000000000000000000000000..0e4160963101e91dd9e850d70227b400b6441edb
--- /dev/null
+++ b/LayoutTests/fast/css/font-shorthand-line-height.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<style>
+ #system_font_1 { font: caption; line-height: 100px; }
+ #system_font_2 { line-height: 100px; font: caption; }
+
+ #shorthand_normal_1 { font: 10px monospace; line-height: 100px; }
+ #shorthand_normal_2 { line-height: 100px; font: 10px monospace; }
+
+ #shorthand_line_height_1 { font: 10px/200px monospace; line-height: 100px; }
+ #shorthand_line_height_2 { line-height: 100px; font: 10px/200px monospace; }
+</style>
+<div id="system_font_1"></div>
+<div id="system_font_2"></div>
+<div id="shorthand_normal_1"></div>
+<div id="shorthand_normal_2"></div>
+<div id="shorthand_line_height_1"></div>
+<div id="shorthand_line_height_2"></div>
+<script>
+ description("Test that line-height in font shorthands cascades correctly.");
+
+ function lineHeight(target) {
+ return getComputedStyle(target).lineHeight;
+ }
+
+ shouldBe("lineHeight(system_font_1)", "'100px'");
+ shouldBe("lineHeight(system_font_2)", "'normal'");
+ shouldBe("lineHeight(shorthand_normal_1)", "'100px'");
+ shouldBe("lineHeight(shorthand_normal_2)", "'normal'");
+ shouldBe("lineHeight(shorthand_line_height_1)", "'100px'");
+ shouldBe("lineHeight(shorthand_line_height_2)", "'200px'");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/font-shorthand-line-height-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698