Implement pixel dumping in Windows DRT
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Nov 2007 00:02:55 +0000 (00:02 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Nov 2007 00:02:55 +0000 (00:02 +0000)
commit69851e2903640b17b0db0e25bce898385840dd82
treeef6b64be5b0ada004f2f8d9aa83c241e3ead02eb
parent227e3a279520c6a96bc24764a544f762fc09378e
    Implement pixel dumping in Windows DRT

        Part of http://bugs.webkit.org/show_bug.cgi?id=16133
        <rdar://5071708>

        Reviewed by Sam.

        * DumpRenderTree/cg/PixelDumpSupportCG.cpp: Added.
        (printPNG): Dumps a CGImageRef as a PNG to stdout, along with a
        Content-Length header.
        (getMD5HashStringForBitmap):
        (dumpWebViewAsPixelsAndCompareWithExpected):
        * DumpRenderTree/cg/PixelDumpSupportCG.h: Copied from WebKitTools/DumpRenderTree/mac/DumpRenderTreePasteboard.h.
        * DumpRenderTree/win/DumpRenderTree.cpp:
        (dump): Do a pixel dump if requested.
        (main): Parse pixel test options.
        * DumpRenderTree/win/DumpRenderTree.vcproj: Added new files and added
        the cg/ subdirectory to the include path.
        * DumpRenderTree/win/MD5.cpp: Added. Windows MD5 functions aren't
        available in a header or import library, so we have to go through this
        LoadLibrary/GetProcAddress dance to use them.
        (cryptDLL):
        (init):
        (update):
        (final):
        (MD5_Init):
        (MD5_Update):
        (MD5_Final):
        * DumpRenderTree/win/MD5.h: Added.
        * DumpRenderTree/win/PixelDumpSupport.h: Added. This file should be
        moved up to the top level to share it with Mac eventually.
        * DumpRenderTree/win/PixelDumpSupportWin.cpp: Added.
        (getBitmapContextFromWebView): Forces the WebView to paint using a
        WM_PRINTCLIENT message, and puts the result in a CGBitmapContext.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.cpp [new file with mode: 0644]
WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.h [new file with mode: 0644]
WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj
WebKitTools/DumpRenderTree/win/MD5.cpp [new file with mode: 0644]
WebKitTools/DumpRenderTree/win/MD5.h [new file with mode: 0644]
WebKitTools/DumpRenderTree/win/PixelDumpSupport.h [new file with mode: 0644]
WebKitTools/DumpRenderTree/win/PixelDumpSupportWin.cpp [new file with mode: 0644]