Ref-test image flakiness when web fonts are used

Hi all, I'm new to this ML, apologies in advance if I'm not doing good,
appreciate to point them out.

I've been long troubled and wondering how to solve the subject, assuming
this is our specific problem. I happened to talk to foolip about this, who
suggested to talk to Geoffrey and James, who suggested to move the
discussion here. So...allow me to start by forward the first a couple of
e-mails with their approvals.


Hi James, Geoffrey,

We were talking about this for a while, and when I talked to foolip, he
suggested to reach to you two experts. Could you mind to help us?

The problem is, when we run ref-tests that use web fonts, our bots often
report flakiness of images. Here's an example screenshots
<https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux_Trusty/23985/layout-test-results/fast/text/line-break-8bit-after-16bit-diffs.html>
 of a test
<https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/fast/text/line-break-8bit-after-16bit.html?q=8bit-after&sq=package:chromium&dr>.
Probably, on heavy load or under some conditions, web fonts are not loaded
yet, but test runner thinks layout is finished and takes screenshots.

We haven't reached a conclusion how it happens and how to fix it, but
adding a script that waits for document.fonts.ready promise to resolve
after window.onload seems to work.

Is this something you have seen before? Could you mind to share your
thoughts?

Received on Monday, 6 March 2017 10:24:13 UTC