mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
LibWeb: Support <custom-ident> in FontFaceSet::load()
This exposed a false positive in our test suite which has been fixed and made more robust
This commit is contained in:
Notes:
github-actions[bot]
2026-01-13 10:41:47 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/e114c7341e1 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7420 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -4,7 +4,7 @@
|
||||
asyncTest(async done => {
|
||||
const fontFaceSet = document.fonts;
|
||||
|
||||
const fontFace = new FontFace("Hash Sans", "url(../../../../Assets/HashSans.woff)");
|
||||
const fontFace = new FontFace("Hash Sans", "url(../../../Assets/HashSans.woff)");
|
||||
fontFaceSet.add(fontFace);
|
||||
|
||||
try {
|
||||
@@ -22,8 +22,15 @@
|
||||
}
|
||||
|
||||
try {
|
||||
await fontFaceSet.load("1em Hash Sans");
|
||||
println("Load valid font: PASS");
|
||||
const result = await fontFaceSet.load("10px NonExistentFont");
|
||||
println(`Load non-existent font: ${result.length == 0 ? "PASS" : "FAIL"}`);
|
||||
} catch {
|
||||
println("Load non-existent font: FAIL");
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await fontFaceSet.load("1em Hash Sans");
|
||||
println(`Load valid font: ${result.length > 0 ? "PASS" : "FAIL"}`);
|
||||
} catch (e) {
|
||||
println("Load valid font: FAIL");
|
||||
println(e);
|
||||
|
||||
Reference in New Issue
Block a user