From 73dee94cc567ade341c9d159989101bcf8035bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wilken=20D=C3=B6rrie?= Date: Fri, 25 Sep 2020 10:40:16 +0000 Subject: [PATCH] Revert "FontAccess: Sort fonts in lexicographical order" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 404b7cc426e259c11276d673630c9f094628259f. Reason for revert: Breaks tests on Win 7 Builder: https://ci.chromium.org/p/chromium/builders/ci/Win7%20Tests%20%281%29/108048 Original change's description: > FontAccess: Sort fonts in lexicographical order > > This change ensures fonts are sorted before being cached. This change is > due to a concern about fingerprinting: > https://github.com/w3ctag/design-reviews/issues/399#issuecomment-530679815 > > This change ensures that fonts are sorted in lexicographical order. > > Bug: 1043306 > Change-Id: Ia3acf2a45cb473124df4e489683bdc7bac15dde4 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427040 > Commit-Queue: Olivier Yiptong > Reviewed-by: Joshua Bell > Cr-Commit-Position: refs/heads/master@{#810519} TBR=jsbell@chromium.org,oyiptong@chromium.org Change-Id: I75926b99ebb7e663875e0eae3d89d877f623a6ae No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 1043306 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2431025 Reviewed-by: Jan Wilken Dörrie Commit-Queue: Jan Wilken Dörrie Cr-Commit-Position: refs/heads/master@{#810547} GitOrigin-RevId: 1117bd9f0c2c79301ea57956b1cba8bd34d8dc1e --- .../resources/window-tests-enumeration.js | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/blink/web_tests/external/wpt/font-access/resources/window-tests-enumeration.js b/blink/web_tests/external/wpt/font-access/resources/window-tests-enumeration.js index 7ced06c527a..441199c8ecf 100644 --- a/blink/web_tests/external/wpt/font-access/resources/window-tests-enumeration.js +++ b/blink/web_tests/external/wpt/font-access/resources/window-tests-enumeration.js @@ -31,31 +31,3 @@ font_access_test(async t => { assert_fonts_exist(availableFonts, getEnumerationTestSet()); }, 'query(): standard fonts returned'); - -font_access_test(async t => { - const iterator = navigator.fonts.query(); - - if (!isPlatformSupported()) { - await promise_rejects_dom(t, 'NotSupportedError', (async () => { - for await (const f of iterator) { - } - })()); - return; - } - - // The following tests that fonts are sorted. Postscript names are expected to - // be encoded in a subset of the ASCII character set. - // See: https://docs.microsoft.com/en-us/typography/opentype/spec/name - // Should the Postscript name contain characters that are multi-byte, this - // test may erroneously fail. - let previousFont = null; - for await (const font of iterator) { - if (previousFont) { - assert_true( - previousFont.postscriptName < font.postscriptName, - 'fonts are sorted'); - } - - previousFont = font; - } -}, 'query(): fonts are sorted');