[Webkit-unassigned] [Bug 21124] --pixel should be ignored for tests that use dumpAsText()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 26 13:06:09 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=21124
------- Comment #3 from pol at apple.com 2008-09-26 13:06 PDT -------
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");
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list