32 lines
790 B
HTML
32 lines
790 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
@font-face {
|
|
font-family: "WebFont";
|
|
font-weight: 400;
|
|
src: url("../../resources/Ahem.otf");
|
|
}
|
|
@font-face {
|
|
font-family: "WebFont";
|
|
font-weight: 500;
|
|
src: local("Helvetica");
|
|
}
|
|
</style>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="target" style="font: 48px 'WebFont';">Hello</div>
|
|
<script>
|
|
window.jsTestIsAsync = true;
|
|
description("This test makes sure the ready promise is fired when a local font is loaded successfully with a policy of ExternalResourceDownloadPolicy::Forbid.");
|
|
let target = document.getElementById("target");
|
|
target.offsetWidth;
|
|
document.fonts.ready.then(function() {
|
|
finishJSTest();
|
|
});
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|