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="./">« 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> |