Replace use of ahem.js with webfont |
|||
Issue descriptionA number of tests that use the Ahem font load it by including <script src="../../resources/ahem.js"></script> which loads it using a resource url. This was done in an attempt to deflake the tests. Sadly that approach does not work and is still rather flaky. The only way we've found to reliable load webfonts in tests without introducing flakiness is to load them as a webfont and to wait until documents.fonts.ready fires. Another possible approach would be to use "font-display: block" however that has not shipped yet and thus may not be used in reftests.
,
Apr 4 2017
AFAICT resources/ahem.js works reliably, as it synchronously loads Ahem font using FontFace's BinaryData constructor. In the above case, -expected.html didn't use ahen.js and Ahem font wasn't applied in the expected image: https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Mac10_10/32166/layout-test-results/fast/text/whitespace/text-align-justify-and-whitespace-pre-diffs.html Waiting document.fonts.ready explicitly is probably a better way though.
,
Apr 4 2017
ahem.js hack somehow works, but was tricky actually. It completely depends on Blink implementation. That was an acceptable choice to stabilize flaky tests with a minimum change, but if we can, using fonts.ready should be better.
,
Apr 4 2017
It works better than what we had before but even tests that use it for both the test and reference are still flaky. Not as flaky as before but failing ~1-10% of the runs. I'm not quite sure why as it tries to load is synchronously but in some cases that request is delayed. I'd argue we should use font-display: block but that's not quite ready yet so for particularly flaky tests I've been replacing ahem.js with fonts.ready.
,
Apr 6 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Apr 3 2017