Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests to check that generic font families rely on internal settings.
There are already internal tests verifying this kind of things, but ensure there is at least one test for each supported generic font family. Bug: 1240117 Change-Id: I3cfdc40da3a8ebe8ac73378c614c0eab7639a7c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3578679 Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Frédéric Wang <fwang@igalia.com> Cr-Commit-Position: refs/heads/main@{#990726}
- Loading branch information
Showing
7 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...arty/blink/web_tests/wpt_internal/css/css-fonts/generic-families/font-family-cursive.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#valdef-font-family-math"> | ||
<link rel="assert" href="'font-family: cursive' uses cursive font family from internal settings."> | ||
<link rel="match" href="font-family-ref.html"/> | ||
<script> | ||
if (window.internals) | ||
internals.settings.setCursiveFontFamily("Ahem", "Zyyy"); | ||
</script> | ||
</head> | ||
<body> | ||
<div style="font-family: monospace"> | ||
<div style="font: 25px/1 cursive">A</div> | ||
</div> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
...arty/blink/web_tests/wpt_internal/css/css-fonts/generic-families/font-family-fantasy.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#valdef-font-family-math"> | ||
<link rel="assert" href="'font-family: fantasy' uses fantasy font family from internal settings."> | ||
<link rel="match" href="font-family-ref.html"/> | ||
<script> | ||
if (window.internals) | ||
internals.settings.setFantasyFontFamily("Ahem", "Zyyy"); | ||
</script> | ||
</head> | ||
<body> | ||
<div style="font-family: monospace"> | ||
<div style="font: 25px/1 fantasy">A</div> | ||
</div> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
...ty/blink/web_tests/wpt_internal/css/css-fonts/generic-families/font-family-monospace.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#valdef-font-family-math"> | ||
<link rel="assert" href="'font-family: monospace' uses fixed font family from internal settings."> | ||
<link rel="match" href="font-family-ref.html"/> | ||
<script> | ||
if (window.internals) | ||
internals.settings.setFixedFontFamily("Ahem", "Zyyy"); | ||
</script> | ||
</head> | ||
<body> | ||
<div style="font-family: sans-serif"> | ||
<div style="font: 25px/1 monospace">A</div> | ||
</div> | ||
</body> | ||
</html> |
11 changes: 11 additions & 0 deletions
11
third_party/blink/web_tests/wpt_internal/css/css-fonts/generic-families/font-family-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
</head> | ||
<body> | ||
<div style="font-family: monospace"> | ||
<div style="font: 25px/1 Ahem">B</div> | ||
</div> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
...y/blink/web_tests/wpt_internal/css/css-fonts/generic-families/font-family-sans-serif.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#valdef-font-family-math"> | ||
<link rel="assert" href="'font-family: sans-serif' uses sans-serif font family from internal settings."> | ||
<link rel="match" href="font-family-ref.html"/> | ||
<script> | ||
if (window.internals) | ||
internals.settings.setSansSerifFontFamily("Ahem", "Zyyy"); | ||
</script> | ||
</head> | ||
<body> | ||
<div style="font-family: monospace"> | ||
<div style="font: 25px/1 sans-serif">A</div> | ||
</div> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
..._party/blink/web_tests/wpt_internal/css/css-fonts/generic-families/font-family-serif.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#valdef-font-family-math"> | ||
<link rel="assert" href="'font-family: serif' uses serif font family from inyternal settings."> | ||
<link rel="match" href="font-family-ref.html"/> | ||
<script> | ||
if (window.internals) | ||
internals.settings.setSerifFontFamily("Ahem", "Zyyy"); | ||
</script> | ||
</head> | ||
<body> | ||
<div style="font-family: monospace"> | ||
<div style="font: 25px/1 serif">A</div> | ||
</div> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
...rty/blink/web_tests/wpt_internal/css/css-fonts/generic-families/font-family-standard.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#valdef-font-family-math"> | ||
<link rel="assert" href="'font-family: initial' uses standard font family from internal settings."> | ||
<link rel="match" href="font-family-ref.html"/> | ||
<script> | ||
if (window.internals) | ||
internals.settings.setStandardFontFamily("Ahem", "Zyyy"); | ||
</script> | ||
</head> | ||
<body> | ||
<div style="font-family: monospace"> | ||
<div style="font-size: 25px; line-height: 1; font-family: initial">A</div> | ||
</div> | ||
</body> | ||
</html> |