blob: b7efdfd93a5f40b7bb11f7d5216df2531d3a8497 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Setting a new font-family should reset the fallback list to empty before adding the new family.");
var wrapperDiv = document.createElement('div');
document.body.appendChild(wrapperDiv)
wrapperDiv.innerHTML =
'<div id="outerDiv" style="font-family: courier new, cursive;">' +
'should be Courier New' +
'<div id="timesDiv" style="font-family: foo;">should be Times (default font)</div>' +
'<div id="cursiveDiv" style="font-family: cursive;">should be cursive</div>' +
'</div>';
shouldBeEqualToString("window.getComputedStyle(outerDiv, null).fontFamily", `"courier new", cursive`);
shouldBeEqualToString("window.getComputedStyle(timesDiv, null).fontFamily", "foo");
shouldBeEqualToString("window.getComputedStyle(cursiveDiv, null).fontFamily", "cursive");
document.body.removeChild(wrapperDiv);
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>