summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/font-face.html
blob: a37da3c45f5fff909cf0fba670bc3ec3b914815c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<meta charset=utf-8>
<title>font face</title>
<link rel="help" href="https://html.spec.whatwg.org/#the-font-element-text-decoration-color-quirk">
<link rel="author" title="Intel" href="http://www.intel.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>

const types = ["serif", "sans-serif", "cursive", "fantasy", "monospace"];
for (let type of types) {
  test(() => {
    let elem = document.createElement("font");
    elem.setAttribute("face", type);
    document.body.appendChild(elem);
    let exp_type = window.getComputedStyle(elem, null).getPropertyValue("font-family");
    assert_equals(exp_type, type);
  }, `font face attribute ${type} is correct`);
}

</script>