Bug 93636 - (r125185) http/tests/images/jpg-img-partial-load.html timeout on Lion
Summary: (r125185) http/tests/images/jpg-img-partial-load.html timeout on Lion
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hin-Chung Lam
URL:
Keywords: LayoutTestFailure
Depends on: 93171
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-09 11:46 PDT by Dean Jackson
Modified: 2012-11-07 00:40 PST (History)
7 users (show)

See Also:


Attachments
Patch (5.45 KB, patch)
2012-11-01 04:18 PDT, noel gordon
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2012-08-09 11:46:49 PDT
The test http/tests/images/jpg-img-partial-load.html added in r125185 is failing on lion.
Comment 1 Dean Jackson 2012-08-09 11:53:53 PDT
Expectation timeout on mac: http://trac.webkit.org/changeset/125191
Comment 3 noel gordon 2012-11-01 04:18:51 PDT
Created attachment 171810 [details]
Patch
Comment 4 Hin-Chung Lam 2012-11-01 11:31:47 PDT
What was the reason that jpg-img-partial-load.html fails on Lion? Was that because of a difference jpeg image and stall offset?
Comment 5 noel gordon 2012-11-01 23:51:48 PDT
I don't know why your test timed-out on LIon.  I do know that your test also fails with a timed-out on Snow Leopard and Mountain Lion, so it's not just Lion.

> Was that because of a difference jpeg image and stall offset?

Nope.  The test times-out regardless of image and regardless of stall offset.  RenderImage::paintIntoRect() is never called.
Comment 6 Hin-Chung Lam 2012-11-02 11:30:39 PDT
This test and the one I wrote are using the same technique but the stopping conditions are different. Your test is using a timeout of 500m while mine is using availability of width and height as a signal. It is best to avoid using timeout as it depends and the running time (debug vs release vs speed), have you explored other options?
Comment 7 Hin-Chung Lam 2012-11-02 11:36:54 PDT
It's good that we remove this test by the way as it times out on Mac anyway I think it's because of the difference in platform decoder that requires more bytes to decode header. I just want to know how we can avoid using timeout for test.
Comment 8 noel gordon 2012-11-05 06:11:59 PST
(In reply to comment #7)
> It's good that we remove this test by the way as it times out on Mac

That's the point of this bug, so let's remove it.

> Anyway I think it's because of the difference in platform decoder that requires more bytes to decode header.

Maybe, maybe not.  You could test your theory to find out.

> I just want to know how we can avoid using timeout for test.

Not sure you can avoid it for partial load tests.  I also choose timeout values to account for debug builds on all ports.  The values seem to work:

http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20-%20webkit.org&showAllRuns=true&tests=http%2Ftests%2Fimages
Comment 9 noel gordon 2012-11-06 16:36:50 PST
Ping?
Comment 10 WebKit Review Bot 2012-11-06 16:47:18 PST
Comment on attachment 171810 [details]
Patch

Clearing flags on attachment: 171810

Committed r133695: <http://trac.webkit.org/changeset/133695>
Comment 11 WebKit Review Bot 2012-11-06 16:47:21 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 Dongseong Hwang 2012-11-06 23:23:04 PST
I feel sorry for removing this awesome test.

It is because the following reason.
Currently, we can not pause a git animation image at the specific frame by javascript. I think this approach makes us check whether the specific frame of the gif animation image is rendered or not. However, we can not use this approach in mac so we can not use this approach for gif animations too.
Comment 13 noel gordon 2012-11-06 23:52:25 PST
(In reply to comment #12).
> Currently, we can not pause a git animation image at the specific frame by javascript. I think this approach makes us check whether the specific frame of the gif animation image is rendered or not. However, we can not use this approach in mac so we can not use this approach for gif animations too.

This bug is about JPEG images.  I'm not sure why you are talking about GIF images.
Comment 14 Dongseong Hwang 2012-11-07 00:40:10 PST
(In reply to comment #13)
> (In reply to comment #12).
> > Currently, we can not pause a git animation image at the specific frame by javascript. I think this approach makes us check whether the specific frame of the gif animation image is rendered or not. However, we can not use this approach in mac so we can not use this approach for gif animations too.
> 
> This bug is about JPEG images.  I'm not sure why you are talking about GIF images.

I skipped the detailed explanation. I'm sorry.

This test intentionally pauses loading an image. When the image is a gif animation image, the default imageDecoder decodes the image until the last frame of the data received. If we use this technique properly, we can pause a git animation image at the specific frame.
I had a plan to make some tests for gif animations using this technique. However, I knew this technique has a problem from this bug and this situation made me feel sorry.