[webkit-help] Doubt regarding placement of -expected.txt for a new layout test.

Dirk Pranke dpranke at chromium.org
Wed Feb 22 19:39:51 PST 2012


By default, when you run DumpRenderTree (on any platform), we will
generate the render tree and a PNG file. Most platforms don't run with
pixel tests enabled, and on those platforms just the render tree
output is sufficient. However, Chromium does run with pixel tests
enabled, and unless you tell DRT to not generate a PNG, it will do so
(at which point run-webkit-tests will attempt to compare the PNG it
receives to the "missing" baseline).

You can use layoutTestController.dumpAsText() to tell DRT that this is
supposed to be a text-only text; however, by default, then, you will
not get the render tree, just the context of the text nodes in the
document. If you can write your test such that you can determine the
correctness programmatically by looking at the DOM, you should do that
and dump as text instead. Often, if you think you only care about the
render tree and not the actual pixels on screen, you can change your
test to a text-only text in this way.

Or you can use the commonly-used resources/dump-as-markup.js script .

Or, you could generate a 'reftest' if you can structure your test as
'I don't care what it looks like as long as it renders the same way as
this other page'.

Without knowing much about what you're trying to test (I didn't
actually look at the substance of the bug), it's hard for me to advise
as to which is best here. If you would like further guidance as to the
specifics of this case, let's discuss that on the bug.

-- Dirk

On Wed, Feb 22, 2012 at 7:05 PM, SravanKumar Sandela
<ssandela at innominds.com> wrote:
> I thought we do not need a pixel test as render tree is sufficient enough to
> check the behavior(and i also avoided text).
> Can you please let me know if i am missing some thing, on how to figure out
> if a pixel dump is also needed?
>
> -Sravan.
>
>
>
> On Thu, Feb 23, 2012 at 7:24 AM, Dirk Pranke <dpranke at chromium.org> wrote:
>>
>> Argh... my dog made me hit "send" too soon. Diagnosis on the bug :).
>>
>> On Wed, Feb 22, 2012 at 5:53 PM, Dirk Pranke <dpranke at chromium.org> wrote:
>> > I replied on the bug - it looks like
>> >
>> > On Wed, Feb 22, 2012 at 5:34 PM, Sravan <sra1sandela at gmail.com> wrote:
>> >> Hi
>> >>
>> >> The patch is in https://bugs.webkit.org/show_bug.cgi?id=78684 .
>> >> Its output is
>> >>
>> >> http://queues.webkit.org/results/11520393
>> >>
>> >>
>> >>
>> >> Thanks for the quick reply.
>> >>
>> >> -Sravan.
>> >>
>> >> On Thu, Feb 23, 2012 at 6:53 AM, Dirk Pranke <dpranke at chromium.org>
>> >> wrote:
>> >>>
>> >>> It should be looking in platform/win, as you say. Can you point me at
>> >>> your patch?
>> >>>
>> >>> It may be that the bot isn't applying the patch correctly and the
>> >>> baseline isn't actually making it on to the bot.
>> >>>
>> >>> -- Dirk
>> >>>
>> >>> On Wed, Feb 22, 2012 at 5:17 PM, SravanKumar Sandela
>> >>> <ssandela at innominds.com> wrote:
>> >>> > Hi,
>> >>> >
>> >>> > I have submitted a patch along with a new layout test. Cr-linux bot
>> >>> > is
>> >>> > failing with a regression result as
>> >>> >
>> >>> > Regressions: Unexpected no expected results found : (1)
>> >>> >   fast/forms/fieldset-legend-padding-unclipped-fieldset-border.html
>> >>> > =
>> >>> > MISSING
>> >>> >
>> >>> > Failed to run "['xvfb-run', 'Tools/Scripts/new-run-webkit-tests',
>> >>> > '--chromium', '--skip-failing-tests', '--no-ne..." exit_code: 1
>> >>> > Using port 'chromium-linux-x86_64'
>> >>> > Test configuration: <lucid, x86_64, release, cpu>
>> >>> > Placing test results in /tmp/layout-test-results
>> >>> > Baseline search path: chromium-linux -> chromium-win -> chromium ->
>> >>> > win
>> >>> > ->
>> >>> > mac -> generic
>> >>> >
>> >>> >
>> >>> > I have uploaded the patch with -expected.txt file which is sitting
>> >>> > in
>> >>> > /platform/win/fast/forms/. From the last line which i have pasted
>> >>> > above,
>> >>> > i thought it will look for -expected file in /platform/win/ path
>> >>> > also,
>> >>> > but
>> >>> > still i see the error, can u please suggest what am i missing,
>> >>> > should i
>> >>> > be
>> >>> > keeping the -expected.txt near the test case itself as its output is
>> >>> > independent of platform, or should i keep it in /platform/chromium/
>> >>> > or
>> >>> > /platform/chromium-linux/ and then again re-submit the patch.
>> >>> >
>> >>> > -Sravan.
>> >>> >
>> >>> >
>> >>> >
>> >>> > _______________________________________________
>> >>> > webkit-help mailing list
>> >>> > webkit-help at lists.webkit.org
>> >>> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>> >>> >
>> >>> _______________________________________________
>> >>> webkit-help mailing list
>> >>> webkit-help at lists.webkit.org
>> >>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>> >>
>> >>
>
>


More information about the webkit-help mailing list