[webkit-dev] Rebaselining render tree dumps
zimmermann at physik.rwth-aachen.de
Wed Dec 8 23:04:48 PST 2010
Am 08.12.2010 um 00:55 schrieb Ryosuke Niwa:
> Hi all,
> Since this would require a lot of rebaselines anyways, can we also
> add some enhancements to DRT?
> I propose to an option to dump as text with images. In many editing
> tests, we don't need render tree dumps because we care more about
> how DOM looks like before and after editing operations. However, we
> also need to verify that selection and caret are rendered properly
> on multiple occasions, and the only way to do this right now is to
> use a pixel test. But even then, dumping render tree is not helpful
> and almost harmful because it doesn't tell us how selection / caret
> are rendered (this can never be tested by comparing text) and hides
> some important information about DOM and makes us rebaseline tests
> whenever there's slight change (that we don't care) in the render
> James (jamesr) and I talked about this on IRC, and he said this
> feature will also be useful for repaint tests and canvas tests. We
> can implement this feature by adding dumpAsTextWithImage to
> layoutTestController, which forces DRT to dump as text but also
> outputs the png image. For repainting tests, we can also add
> dumpRepaintRects to output more information about painting.
this feature is already available. I've implemented it for the svg/
dynamic-updates test, DRT hooks are available.
dumpAsText() takes an optional boolean parameter that toggles this.
// svg/dynamic-updates tests set enablePixelTesting=true, as we want
to dump text + pixel results
layoutTestController.dumpAsText(true /* enablePixelTesting */);
That will give you a "dumpAsText" result + a pixel test result. Hope
More information about the webkit-dev