Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / font-family-builtins.html
blob8d4f8e2ff3eff7a122e8aba75596b7632db9d809
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
8 function log(msg)
10 document.getElementById('console').appendChild(document.createTextNode(msg + "\n"));
13 var families = [
14 "serif",
15 "sans-serif",
16 "cursive",
17 "fantasy",
18 "monospace"
21 window.onload = function()
23 for (var i = 0; i < families.length; i++) {
24 var family = families[i];
25 var div = document.createElement("div");
26 div.setAttribute("style", "font-family: " + family);
27 document.body.appendChild(div);
29 var returnedFamily = window.getComputedStyle(div).fontFamily
30 if (family == returnedFamily)
31 log("PASS: The computed style for a specified font-family of '" + family + "' matched.");
32 else
33 log("FAIL: The computed style for a specified font-family of '" + family + "' did not match. Actual result was '" + returnedFamily + "'.");
36 </script>
37 </head>
38 <body>
39 <pre id="console"></pre>
40 </body>
41 </html>