[Webkit-unassigned] [Bug 92470] Add more layout tests on image decoding

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 7 21:38:11 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=92470





--- Comment #5 from Hin-Chung Lam <hclam at google.com>  2012-08-07 21:38:34 PST ---
> Before I read your comments, I thought about how to add a test API to query image decoding internals in DRT.
> I am reluctant to expose image decoder's detail in DRT, because it seems there is a tight coupling between low level implementation detail of image decoding and high level web platform.
> I think unit test is more suitable for testing sync and async image decoding, and we can use TestWebKitAPI to make image decoding unit tests.
> If there are no other opinions about how to test sync and async image decoding, I will add unit tests that cover current behavior of ImageSource.

I would like to discuss my plan for layout tests:

1. Partially loaded image

DRT supports only fully loaded images, I would like to extend this to partially loaded images. See https://bugs.webkit.org/show_bug.cgi?id=93314 for progress. The problem with this is WebKit doesn't seem to rendering partial loaded and transparent loaded images. I'll report tomorrow to see if this is correct.

2. Enable asynchronous image decoding through DRT

Because of the native of asynchronous image decoding, a loaded <img> doesn't mean that it is rendered completely. We probably don't want to enable asynchronous image decoding by default for DRT otherwise there will be flakiness in pixel tests. We should enable asynchronous image decoding though Settings, see http://trac.webkit.org/browser/trunk/Source/WebCore/page/Settings.h and allow DRT to enable this.

3. Wait for image decoding to complete

Now with asynchronous image enabled in the test case, there should be a method like testRunner.waitUntilImagesDecoded() that exits DRT after images are all decoded.

4. Write <img> tests with async image decoding enabled and testRunner.waitUntilImagesDecoded()

We'll need to cover all basic image formats with asynchronous image decoding. Also cover the case with multiple images, images outside of viewport, etc.

In terms of unit test, I think it is important to verify the asynchronous behavior of ImageSource, and also its public methods. I think in general WebCore unit tests are discouraged and unit tests should be done in WebKit API level. However WebKit API is defined only on a platform, e.g. http://trac.webkit.org/browser/trunk/Source/WebKit/chromium/public/WebImageDecoder.h. I am fine testing it there but my concern is we test it only in one place. I would like to avoid having the same set of unit tests written in both chromium and qt. I am unsure if we can write one test file but runs on both qt and chromium. I propose we write one set of unit tests under http://trac.webkit.org/browser/trunk/Source/WebKit/chromium/tests.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list