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

Unified Diff: LayoutTests/fast/css/css2-system-fonts.html

Issue 204113007: Rewrite the fast/css/css2-system-fonts.html test (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Undelete Mac expectation, delete Win-XP expectation Created 6 years, 9 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/platform/linux/fast/css/css2-system-fonts-expected.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/css2-system-fonts.html
diff --git a/LayoutTests/fast/css/css2-system-fonts.html b/LayoutTests/fast/css/css2-system-fonts.html
index 17d42ba1a95587497f45fa3e095c4174a247d923..301c677160dabb8e8613abcb646d5ec3847a74ae 100644
--- a/LayoutTests/fast/css/css2-system-fonts.html
+++ b/LayoutTests/fast/css/css2-system-fonts.html
@@ -1,15 +1,23 @@
-<html>
- <body>
- <h1>CSS2 System Fonts</h1>
- <p>The following should appear with the fonts specified, per the <a href="http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font">CSS2 specs</a>. If they appear in a monospace font, the test has failed.</p>
- <ul style="font-family: monospace;">
- <li style="font: caption;">Caption (on Mac will be Lucida Grande 13.0 Regular)</li>
- <li style="font: icon;">Icon (on Mac will be Lucida Grande 13.0 Regular for now, not sure how to get this info from Finder)
- <li style="font: menu;">Menu (on Mac will be Lucida Grande 13.0 Regular)</li>
- <li style="font: message-box;">Message-Box (on Mac will be Lucida Grande 13.0 Regular)</li>
- <li style="font: small-caption;">Small-Caption (on Mac will be Lucida Grande 11.0 Regular)</li>
- <li style="font: status-bar;">Status-Bar (on Mac will be Lucida Grande 10.0 Regular)</li>
- </ul>
- <p><a href="./">&laquo; Return to Safari Bugs page</a></p>
- </body>
-</html>
+<!DOCTYPE html>
+This tests platform specific system font styles. If any of the styles appear in monospace the test fails.
+<hr>
+<div style="font-family: monospace;" id="container"></div>
+<script>
+var systemFontStyles = [
+ 'caption',
+ 'icon',
+ 'menu',
+ 'message-box',
+ 'small-caption',
+ 'status-bar',
+];
+systemFontStyles.forEach(function(systemFont) {
+ var item = document.createElement('div');
+ container.appendChild(item);
+ item.style.font = systemFont;
+ item.textContent = systemFont + ': ' + getComputedStyle(item).font;
+});
+if (window.testRunner) {
+ testRunner.dumpAsText();
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/platform/linux/fast/css/css2-system-fonts-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698