Bug 57493 - Update fast/canvas tests to avoid dumping the render tree when possible
Summary: Update fast/canvas tests to avoid dumping the render tree when possible
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Matthew Delaney
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-30 11:55 PDT by Matthew Delaney
Modified: 2011-03-30 17:01 PDT (History)
2 users (show)

See Also:


Attachments
Patch (81.76 KB, patch)
2011-03-30 14:07 PDT, Matthew Delaney
cmarrin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Delaney 2011-03-30 11:55:54 PDT
New implementations of canvas require putting the canvas into its own layer. When a layout test doesn't dumpAsText and subsequently dumps the render tree, there may be different looking trees depending on which canvas implementation is used. Most (if not all) of the fast/canvas tests have no need to compare the render tree over just using dumpAsText, though most are best used as pixel tests. This patch will change all fast/canvas tests to use layoutTestController.dumpAsText(true) where the 'true' parameter allows for pixel results to also be generated. This solves both issues going forward.
Comment 1 Matthew Delaney 2011-03-30 14:07:44 PDT
Created attachment 87610 [details]
Patch
Comment 2 Chris Marrin 2011-03-30 16:34:26 PDT
Comment on attachment 87610 [details]
Patch

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

I see why you're trying to do this - to avoid differences in the expected results for the different versions. But that makes many of the expected results blank. How do you know if the test passed or failed? Normally you write something to the page to says this which gets put into the expected results.

> LayoutTests/fast/canvas/canvas-transform-identity-expected.txt:1
> +

I understand the motivation of getting rid of the tree. But shouldn't you at least put in pass/fail messages? What is this test doing? How do you know whether it passed or not? The same is true for results on several other tests here.
Comment 3 Matthew Delaney 2011-03-30 16:42:01 PDT
My understanding is that most of these tests are only useful as pixel tests since looking at the render tree and seeing a canvas inside of a div doesn't tell you anything anyway (for all these tests that draw something into the canvas, like shadows for example).
Comment 4 Chris Marrin 2011-03-30 16:49:38 PDT
Comment on attachment 87610 [details]
Patch

I see now that these have pixel results. So the expected results are fine.
Comment 5 Matthew Delaney 2011-03-30 17:01:05 PDT
Committed r82521: <http://trac.webkit.org/changeset/82521>