<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
    font-family: "SpecialFont";
    src: local("Skia");
    font-weight: 700 800;
}
</style>
</head>
<body>
<canvas width="400" height="400"></canvas>
<script>
if (window.testRunner)
    testRunner.waitUntilDone();

let canvas = document.querySelector("canvas")
addEventListener("load", async function() {
    document.fonts.load("80px SpecialFont").then(function() {
        const context = canvas.getContext("2d");
        context.font = "80px SpecialFont";
        context.fillText("aaa", 100, 100);
        if (window.testRunner)
            testRunner.notifyDone();
    }, function() {
        let textNode = document.createTextNode("Skia does not exist.");
        document.body.insertBefore(textNode, canvas);
        if (window.testRunner)
            testRunner.notifyDone();
    });
});
</script>
</body>
</html>
