blob: e0f9570801fc9b9b129ac72c43da267f9c2e1816 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Test that setting a font with size in 'ex' units doesn't crash.");
ctx = document.createElement('canvas').getContext('2d');
ctx.font = "5ex sans-serif";
size = parseInt(ctx.font.substr(0, 2));
family = ctx.font.substr(5);
shouldBeCloseTo("size", 25, 10);
shouldBe("family", "'sans-serif'");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>