<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("This test makes sure that the CSS Font Loading API works properly with local() fonts.");
window.jsTestIsAsync = true;
var fontFace = new FontFace("WebFont", "local('Helvetica')");
fontFace.load().then(function() {
	testPassed("Local font loaded correctly");
	fontFace = new FontFace("WebFont", "local('garbage')");
	return fontFace.load();
}, function() {
	testFailed("Should not fail");
    finishJSTest();
}).then(function() {
	testFailed("Should not succeed");
    finishJSTest();
}, function() {
	testPassed("Garbage local font didn't load");
    finishJSTest();
});
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>