Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /font-access/font_access_sorted.tentative.https.window.html - WPT Dashboard Interop Dashboard
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
// META: script=resources/font-asserts.js
// META: script=resources/font-test-utils.js
// META: timeout=long
'use strict';
font_access_test(async t => {
// The following tests that fonts are sorted. Postscript names are expected to
// be encoded in a subset of the ASCII character set.
// Should the Postscript name contain characters that are multi-byte, this
// test may erroneously fail.
const fonts = await self.queryLocalFonts();
const fontNames = fonts.map(fontData => fontData.postscriptName);
const expectedFontNames = [...fontNames].sort();
assert_array_equals(fontNames, expectedFontNames);
}, 'queryLocalFonts(): fonts are sorted');