Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: layout/style/test/mochitest.toml
<!DOCTYPE html>
<meta charset=utf-8>
<script src=/tests/SimpleTest/SimpleTest.js></script>
<link rel=stylesheet type=text/css href=/tests/SimpleTest/test.css>
<script>
function forceGC() {
SpecialPowers.gc();
SpecialPowers.forceShrinkingGC();
SpecialPowers.forceCC();
SpecialPowers.gc();
SpecialPowers.forceShrinkingGC();
SpecialPowers.forceCC();
}
add_task(async function() {
let face = new FontFace('foo', `url("slow_load.sjs")`);
let p = face.load();
// Comment out the following line to fix it.
face = null;
forceGC();
try {
await p;
ok(false, "Resolved text/plain request?");
} catch (ex) {
ok(true, "Expect rejection due to wrong content-type");
}
})
</script>