| <!DOCTYPE html> | |
| <html> | |
| <title>Constructing a FontFace from an ArrayBuffer should reject with a SyntaxError</title> | |
| <link rel="help" href="https://drafts.csswg.org/css-font-loading/#font-face-constructor"> | |
| <link rel="author" title="Simon Wülker" href="simon.wuelker@arcor.de"> | |
| <script src="/resources/testharness.js"></script> | |
| <script src="/resources/testharnessreport.js"></script> | |
| <script> | |
| promise_test(function(t) { | |
| const bogus_font = new FontFace( | |
| "FontFamily AhemTest", | |
| new ArrayBuffer(8), | |
| ); | |
| document.fonts.add(bogus_font); | |
| return promise_rejects_dom(t, 'SyntaxError', bogus_font.loaded); | |
| }) | |
| </script> | |
| </html> |