blob: 8c27785ece44381b00cdc7eea232e42f10e0b635 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="font-src 'none'">
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("This test makes sure that the promise of a FontFace with no FontFaceSources gets rejected.")
window.jsTestIsAsync = true;
var face = new FontFace("WebFont", "url(../../resources/Ahem.woff) format('woff')", { });
var rejectedException;
var loading = face.load().then(function() {
testFailed("Promise should not resolve successfully.");
finishJSTest();
}, function(e) {
rejectedException = e;
shouldBe("rejectedException.code", "rejectedException.NETWORK_ERR");
finishJSTest();
});
</script>
<script src="../../resources/js-test-post.js"></script>
</body>