summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/css2-system-fonts.html
blob: 301c677160dabb8e8613abcb646d5ec3847a74ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!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>