Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / fast / css / font-family-builtins.html
blob8445274a9c79deb3ce6aa15d48594027ce8b1069
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 if (window.layoutTestController)
6 layoutTestController.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>