mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-17 08:32:54 +00:00
Having to go through multiple levels of .. is not ideal, but less odd than reaching into another test type's data files.
33 lines
917 B
HTML
33 lines
917 B
HTML
<script src="../include.js"></script>
|
|
<script type="text/javascript">
|
|
asyncTest(async done => {
|
|
const fontFaceSet = document.fonts;
|
|
|
|
const fontFace = new FontFace("Hash Sans", "url(../../../../Assets/HashSans.woff)");
|
|
fontFaceSet.add(fontFace);
|
|
|
|
try {
|
|
await fontFaceSet.load("invalid");
|
|
println("Load invalid font: FAIL");
|
|
} catch (e) {
|
|
println("Load invalid font: PASS");
|
|
}
|
|
|
|
try {
|
|
await fontFaceSet.load("revert");
|
|
println("Load CSS keyword as font: FAIL");
|
|
} catch (e) {
|
|
println("Load CSS keyword as font: PASS");
|
|
}
|
|
|
|
try {
|
|
await fontFaceSet.load("1em Hash Sans");
|
|
println("Load valid font: PASS");
|
|
} catch (e) {
|
|
println("Load valid font: FAIL");
|
|
println(e);
|
|
}
|
|
|
|
done();
|
|
});
|
|
</script>
|