2 <script src=
"../../resources/js-test.js"></script>
4 description('Test FontFace constructor with invalid parameters');
6 window
.jsTestIsAsync
= true;
9 faceWithWrongSrc
= new FontFace('test', 'invalid_src');
10 shouldBeEqualToString('faceWithWrongSrc.status', 'error');
11 faceWithWrongSrc
.loaded
.catch(function(e
) {
13 shouldBeEqualToString('rejectionValue.name', 'SyntaxError');
19 faceWithWrongDescriptors
= new FontFace('test', 'local(Arial)', {
24 'featureSettings': 'x'
26 shouldBeEqualToString('faceWithWrongDescriptors.status', 'error');
27 shouldBeEqualToString('faceWithWrongDescriptors.style', 'normal');
28 shouldBeEqualToString('faceWithWrongDescriptors.weight', 'normal');
29 shouldBeEqualToString('faceWithWrongDescriptors.unicodeRange', 'U+0-10FFFF');
30 shouldBeEqualToString('faceWithWrongDescriptors.variant', 'normal');
31 shouldBeEqualToString('faceWithWrongDescriptors.featureSettings', 'normal');
32 faceWithWrongDescriptors
.loaded
.catch(function(e
) {
34 shouldBeEqualToString('rejectionValue.name', 'SyntaxError');