W3C home > Mailing lists > Public > public-test-infra@w3.org > January to March 2017

Re: Ref-test image flakiness when web fonts are used

From: Koji Ishii <kojii@chromium.org>
Date: Tue, 14 Mar 2017 16:38:34 +0900
Message-ID: <CACQRE+SagfBBL_QrduUovsPc=Ykx+CyoJb8+m19za7SCpqxJcQ@mail.gmail.com>
To: Geoffrey Sneddon <me@gsnedders.com>
Cc: Koji Ishii <kojii@chromium.org>, public-test-infra <public-test-infra@w3.org>, James Graham <james@hoppipolla.co.uk>, Philip Jägenstedt <foolip@chromium.org>, Dominik Röttsches <drott@chromium.org>, Kunihiko Sakamoto <ksakamoto@chromium.org>
Apologies that I was late to reply to the thread I asked...

​Thank you Geoffrey for sharing the background, and I'm surprised I'm
sometimes there ;-O

On Thu, Mar 9, 2017 at 1:17 AM, Geoffrey Sneddon <me@gsnedders.com> wrote:

>> I think what we need to define for web-platform-tests is that for
>> reftests the screenshot should be taken after the last of the
> >> following:
> >>
> >>  * after the document's load event has been fired
> >>  * the document.fonts.ready promise being fulfilled
> >>  * all @imports from stylesheets have been loaded and style recomputed
> >> etc.
> >>  * after all <uri> subresources in all stylesheets have been loaded
> >> etc. (so background-image, content, etc.)
> >>
> >> I think that's it?

​Yes, I think the list is correct. The font loading spec says the
document.fonts.ready promise implies layout completes, if my reading is

> The user agent has actually painted (there seems to be a bug in blink
> where
> > we sometimes take a screenshot before images have painted, even though
> load
> > has fired).

​Yeah, obviously we need to wait for paint, but I think it's even less
defined and obvious?

> > Are there actually web apis to determine all these things?
> No. Which yes, makes this awkward.

​So...is this something we can define or recommend somewhere? It won't be a
great situation where one vendor assumes that tests include "
/common/reftest-wait-for-fonts.js", while another vendor assumes the test
runner waits for these condition, no?
Received on Tuesday, 14 March 2017 07:39:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:34:13 UTC