Skip to content

Commit 646c6ef

Browse files
authored
Avoid harness error in font-face-range-order.html (#26089)
There's current a harness error + timeout in Edge and Safari: https://wpt.fyi/results/css/css-fonts/font-face-range-order.html?run_id=703650002&run_id=695420001&run_id=717940003&run_id=710590002 With this change, the error will instead fail the test.
1 parent cbbc487 commit 646c6ef

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

css/css-fonts/font-face-range-order.html

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,12 @@
2020
}
2121
</style>
2222
<script>
23-
async_test(function(t) {
24-
document.fonts.load("12px reversed-range-test").then((fonts) => {
25-
t.step( () => {
26-
assert_equals(fonts[0].stretch, "200% 50%", "Stretch value must be returned as specified.");
27-
assert_equals(fonts[0].style, "oblique 90deg -90deg", "Style value must be returned as specified.");
28-
assert_equals(fonts[0].weight, "900 100", "Weight value must be returned as specified.");
29-
});
30-
t.done()
31-
})});
23+
promise_test(async (t) => {
24+
const fonts = await document.fonts.load("12px reversed-range-test");
25+
assert_equals(fonts[0].stretch, "200% 50%", "Stretch value must be returned as specified.");
26+
assert_equals(fonts[0].style, "oblique 90deg -90deg", "Style value must be returned as specified.");
27+
assert_equals(fonts[0].weight, "900 100", "Weight value must be returned as specified.");
28+
});
3229
</script>
3330
</body>
3431
</html>

0 commit comments

Comments
 (0)