Join GitHub today
[css-fonts] Avoid race condition #11082
The modified test primes the document's font source by declaring a
Prior to this patch, the test assumed that the declaration of the second
Practically speaking, this caused the Firefox and Chrome browsers to
Update the test to define a unique FontFace for every subtest and to
 > A CSS @font-face rule automatically defines a corresponding
 > When a user-agent needs to load a font face, it must do so by
 > For font loads, user agents must use the potentially CORS-enabled
referenced this pull request
May 22, 2018
AFAICS, this makes things work somewhat better in Firefox, but there are still issues that I'm not sure how best to resolve.
(2) The function
Thank you for the review, @jfkthame!
I'd been testing using the stable release of Firefox, but I really ought to be using Nightly. In this case, the flakiness is only observable in that release.
Oh, good point! And thanks for writing up the demonstration. I've extended it just a bit to create two separate elements (the detection mechanism reacts to any change in
This seems to resolve the flakiness in Firefox Nightly. Would you mind taking another look?