New issue
Advanced search Search tips

Issue 618179 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Layout tests using ahem.js is flaky

Project Member Reported by yosin@chromium.org, Jun 8 2016

Issue description

It is rare but sometimes layout tests including "ahem.js".
Since, "Ahem" font is loaded as Web Font, it seems web font intervention affect something.

Could you take look?
Thanks in advance!

 
Status: Started (was: Untriaged)
https://codereview.chromium.org/1204023002/

ahem.js was introduced by this CL. The first Patch Set used <link rel="stylesheet"> to import the style, but submitted version used JavaScript.

I could not read underlying reason to decided to use JavaScript here, but let me try using <link rel> with embedded ahem font as a data URL. The style import should block any layout IIUC, that means the font should be ready at the first layout, and solve the flakiness.
Cc: wangxianzhu@chromium.org
wangxianzhu@, do you remember why we decided to inject <style> using JS, instead of using <link rel=stylesheet> ?
Loading ahem font using js is a workaround of  bug 392046 . It effectively lowered flakiness of the tests.

<link rel="stylesheet"> didn't get lower flakiness than the original because it can't fix the asynchronous webfont loading issue (that is, webfont loading is asynchronous with window.onload and sometimes the test finishes before the ahem font is loaded).

The purpose of ahem.js is described in the documentation in the file:
https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/resources/ahem.js?q=ahem.js&sq=package:chromium&l=1
Thanks! Now I remember the reason.
Probably we should keep using JS, but I think we could make it more deterministic by using CSS font loading. (Toyoshima-san is creating a CL)
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1c77630ff59a8207fc60242dba9f455203353d2f

commit 1c77630ff59a8207fc60242dba9f455203353d2f
Author: toyoshim <toyoshim@chromium.org>
Date: Thu Jun 09 07:20:08 2016

Change ahem.js logic to make tests unflaky

BUG= 392046 ,  618179 

Review-Url: https://codereview.chromium.org/2047263002
Cr-Commit-Position: refs/heads/master@{#398802}

[modify] https://crrev.com/1c77630ff59a8207fc60242dba9f455203353d2f/third_party/WebKit/LayoutTests/resources/ahem.js

Status: Fixed (was: Started)

Sign in to add a comment