New issue
Advanced search Search tips

Issue 707912 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 706680



Sign in to add a comment

Replace use of ahem.js with webfont

Project Member Reported by e...@chromium.org, Apr 3 2017

Issue description

A 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.

 
Blockedon: 706680
Status: Available (was: Untriaged)
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.

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.

Comment 4 by eae@google.com, 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.
Project Member

Comment 5 by sheriffbot@chromium.org, Apr 6 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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