[webkit-dev] Using inline-block divs for line breaking tests

Alan Stearns stearns at adobe.com
Wed Aug 24 14:49:04 PDT 2011


On 8/24/11 1:52 PM, "Dan Bernstein" <mitz at apple.com> wrote:

> 
> On Aug 24, 2011, at 1:08 PM, Alan Stearns wrote:
> 
>> ... Idea for platform-proofing some DumpRenderTree results
> 
> You can make a text-only test that uses Ahem (you can still rely on its
> horizontal metrics, at least) and DOM API such as Range¹s getClientRects() to
> test that the first character after the line break is positioned where you
> expect it to be.

If I chose to validate using getClientRects() (or some other API) then I
expect I'd be using dumpAsText() instead of DumpRenderTree output. That
seems OK to me, too. And if I'm using the API to validate, my checks could
have a bit of tolerance to account for platform font differences. So I would
not necessarily need to use Ahem.



More information about the webkit-dev mailing list