Bug 49898

Summary: LayoutTests/fast/css/font-face-data-uri.html doesn't test what it claims to
Product: WebKit Reporter: anton muhin <antonm>
Component: WebCore Misc.Assignee: Yuzo Fujishima <yuzo>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, eric, jparent, webkit.review.bot, yuzo
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Added comment
none
Use polling to wait for font load completion none

Description anton muhin 2010-11-22 02:23:29 PST
http://trac.webkit.org/changeset/72504 added the test in the subj.  And it apparently requires proper expectations: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#showExpectations=true&tests=fast%2Fcss%2Ffont-face-data-uri.html&master=ChromiumWebkit

Yuzo, may you have a look if diffs are ok for Chromium?

Disabling for now.
Comment 1 Yuzo Fujishima 2010-11-22 02:31:53 PST
Hi,

It should also pass for Chromium, with the same *-expected.txt, once WebKit for Chromium is rolled past 72504.
Comment 2 anton muhin 2010-11-22 02:34:34 PST
Are you sure?  It doesn't pass on canaries which are using WebKit's ToT

(In reply to comment #1)
> Hi,
> 
> It should also pass for Chromium, with the same *-expected.txt, once WebKit for Chromium is rolled past 72504.
Comment 4 anton muhin 2010-11-22 03:12:54 PST
(In reply to comment #3)
> Hmm, weird.
> 
> Where did you see the failures?
> 
> I checked http://build.chromium.org/p/chromium.webkit/waterfall but
> didn't see the failures there. (font-face-data-uri.html is said to be failing/flaky
> but no failures are shown in http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=fast%2Fcss%2Ffont-face-data-uri.html%2Csvg%2Fcustom%2Fuse-infinite-recursion.svg%2Cfast%2Ftext%2Ffind-backwards.html%2Cmedia%2Fvideo-play-pause-exception.html%2Csvg%2Fcustom%2FselectSubString.html )

Yuzo, see the URL to dashboard in the first comment.  I duplicate it here for your convenience:

http://test-results.appspot.com/dashboards/flakiness_dashboard.html#showExpectations=true&tests=fast%2Fcss%2Ffont-face-data-uri.html&master=ChromiumWebkit
Comment 5 Yuzo Fujishima 2010-11-22 03:20:17 PST
Hi, Anton,

From which waterfall did you get the dashboard URL?
Comment 6 anton muhin 2010-11-22 03:25:16 PST
Hi, Yuzo.

It is http://build.chromium.org/p/chromium.webkit/waterfall

See for example http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Linux/builds/2346

(In reply to comment #5)
> Hi, Anton,
> 
> From which waterfall did you get the dashboard URL?
Comment 7 Yuzo Fujishima 2010-11-25 00:35:11 PST
LayoutTests/fast/css/font-face-data-uri.html intends to compare text rendering by local font to that by data URI-encoded web font, but it actually doesn't. It is passing for Mac just by accident.

I'll upload a patch shortly.
Comment 8 Yuzo Fujishima 2010-11-25 00:36:32 PST
Renamed the bug because this is not really specific to Chromium.
Comment 9 Yuzo Fujishima 2010-11-25 00:55:50 PST
Created attachment 74837 [details]
Patch
Comment 10 Kent Tamura 2010-11-25 01:00:55 PST
Comment on attachment 74837 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74837&action=review

> LayoutTests/fast/css/font-face-data-uri.html:50
> +    window.setTimeout(testMain, 200);

Is the font loaded asynchronously?  Can we know font loading completion in JavaScript?
This setTimeout() looks to make this test flaky.
Comment 11 Shinichiro Hamaji 2010-11-25 01:04:52 PST
Comment on attachment 74837 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74837&action=review

r- for Kent-san's comment. One more comment from me.

> LayoutTests/fast/css/font-face-data-uri.html:40
> +    document.body.offsetTop;

I think it would be better to comment the intention of this line.
Comment 12 Yuzo Fujishima 2010-11-25 01:09:19 PST
Created attachment 74840 [details]
Added comment
Comment 13 Yuzo Fujishima 2010-11-25 01:11:02 PST
Thank you for the review.

As to document.body.offsetTop,
I added a comment.

As to the use of timer,
there is currently no good way to know when the font download completes.
As far as I tested, 200 msec is nearly the shortest wait without flakiness.
Comment 14 Yuzo Fujishima 2010-11-25 17:59:01 PST
Created attachment 74897 [details]
Use polling to wait for font load completion
Comment 15 Kent Tamura 2010-11-25 19:09:56 PST
Comment on attachment 74897 [details]
Use polling to wait for font load completion

ok
Comment 16 WebKit Commit Bot 2010-11-25 19:51:13 PST
The commit-queue encountered the following flaky tests while processing attachment 74897 [details]:

fast/css/font-face-data-uri.html

Please file bugs against the tests.  These tests were authored by yuzo@google.com.  The commit-queue is continuing to process your patch.
Comment 17 WebKit Commit Bot 2010-11-25 19:52:28 PST
Comment on attachment 74897 [details]
Use polling to wait for font load completion

Clearing flags on attachment: 74897

Committed r72749: <http://trac.webkit.org/changeset/72749>
Comment 18 WebKit Commit Bot 2010-11-25 19:52:35 PST
All reviewed patches have been landed.  Closing bug.
Comment 19 WebKit Review Bot 2010-11-25 21:18:34 PST
http://trac.webkit.org/changeset/72749 might have broken SnowLeopard Intel Release (Tests)
The following tests are not passing:
fast/css/font-face-data-uri.html
Comment 20 Eric Seidel (no email) 2010-11-25 22:16:18 PST
It looks like this made the test flakey and should be rolled out.  No?
Comment 21 Yuzo Fujishima 2010-11-25 22:35:37 PST
Sorry, but r72751 seems to have fixed the flakiness.
Comment 22 Yuzo Fujishima 2010-11-25 23:03:02 PST
Updated the Chromium test expectation (r72752).