Summary: | --pixel should be ignored for tests that use dumpAsText() | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Pierre-Olivier Latour <pol> | ||||
Component: | Tools / Tests | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | simon.fraser | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac (Intel) | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Pierre-Olivier Latour
2008-09-25 16:59:21 PDT
I thought that this was already the case. Perhaps we broke this behaviour somewhere along the way. We want to add a bunch of tests for transforms, transitions and animations, and some of them require pixel testing. Having this fixed sooner than later would help, thanks. For some reason, you can't just bypass dumpWebViewAsPixelsAndCompareWithExpected() completely in DRT or the tests hangs. Here's a diff that seems to fix the issue (it's a one-line change, but because of (re)tabbing a bunch of lines, it makes it look quite bigger): Index: WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.cpp =================================================================== --- WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.cpp (revision 36958) +++ WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.cpp (working copy) @@ -106,21 +106,25 @@ if (gLayoutTestController->dumpSelectionRect()) drawSelectionRect(context.get(), getSelectionRect()); #endif + + // Only process the rendered image if have a test that is not platform-agnositc i.e. doesn't use "dumpAsText()" + if(!gLayoutTestController->dumpAsText()) { - // Compute the actual hash to compare to the expected image's hash. - char actualHash[33]; - getMD5HashStringForBitmap(context.get(), actualHash); - printf("\nActualHash: %s\n", actualHash); + // Compute the actual hash to compare to the expected image's hash. + char actualHash[33]; + getMD5HashStringForBitmap(context.get(), actualHash); + printf("\nActualHash: %s\n", actualHash); - // FIXME: We should compare the actualHash to the expected hash here and - // only set dumpImage to true if they don't match, but DRT doesn't have - // enough information currently to find the expected checksum file. - bool dumpImage = true; + // FIXME: We should compare the actualHash to the expected hash here and + // only set dumpImage to true if they don't match, but DRT doesn't have + // enough information currently to find the expected checksum file. + bool dumpImage = true; - if (dumpImage) { - RetainPtr<CGImageRef> image(AdoptCF, CGBitmapContextCreateImage(context.get())); - printPNG(image.get()); + if (dumpImage) { + RetainPtr<CGImageRef> image(AdoptCF, CGBitmapContextCreateImage(context.get())); + printPNG(image.get()); + } } - + printf("#EOF\n"); } Created attachment 23965 [details]
Patch, changelog
Comment on attachment 23965 [details]
Patch, changelog
r=me
|