Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<title>Request URL Modifiers: cross-origin(anonymous) negative test for @font-face</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
@font-face {
font-family: "TestFont";
}
.test { font-family: "TestFont" }
</style>
<div class="test">X</div>
<script>
promise_test(async t => {
await document.fonts.ready;
const loaded = document.fonts.check("16px TestFont");
assert_false(loaded, "Cross-origin font without CORS headers should not load with cross-origin(anonymous)");
}, "cross-origin(anonymous) blocks cross-origin font loading without CORS headers");
</script>