Bug 55161

Summary: Add basic pixel testing support to WebKitTestRunner
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, aroben, buildbot, eric, webkit-ews, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 49007    
Attachments:
Description Flags
Patch darin: review+

Description Sam Weinig 2011-02-24 11:20:36 PST
Add basic pixel testing support to WebKitTestRunner
Comment 1 Sam Weinig 2011-02-24 11:41:57 PST
Created attachment 83690 [details]
Patch
Comment 2 WebKit Review Bot 2011-02-24 11:45:46 PST
Attachment 83690 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Tools/ChangeLog', u'Tools/Scripts/old-run-..." exit_code: 1

Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Tools/WebKitTestRunner/InjectedBundle/win/InjectedBundleWin.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 2 in 19 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Darin Adler 2011-02-24 11:46:43 PST
Comment on attachment 83690 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=83690&action=review

r=me but you said there is something wrong with the patch

> Tools/WebKitTestRunner/TestInvocation.cpp:88
> +TestInvocation::TestInvocation(std::string pathOrURL)

How about const string& and using namespace std.

> Tools/WebKitTestRunner/TestInvocation.h:41
> +    TestInvocation(std::string pathOrURL);
>      ~TestInvocation();
>  
> +    void setIsPixelTest(std::string expectedPixelHash);

Should be const std::string&.

> Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:181
> +    WKRetainPtr<WKStringRef> textOutput(AdoptWK, WKStringCreateWithUTF8CString(m_outputStream.str().c_str()));

Kind of annoying to have to convert to UTF-8 to convert back to UTF-16.

> Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:97
> +    , m_dumpPixels(true)

Should be m_shouldDumpPixels. The others should be named that way too.

> Tools/WebKitTestRunner/mac/TestInvocationMac.mm:48
> +    size_t rowBytes = (4 * pixelsWide + 63) & ~63;

Magic numbers?
Comment 4 Adam Roben (:aroben) 2011-02-24 11:46:59 PST

*** This bug has been marked as a duplicate of bug 49007 ***
Comment 5 Sam Weinig 2011-02-24 11:51:20 PST
Reopening and making this a subtask of the other one.
Comment 6 Early Warning System Bot 2011-02-24 12:41:58 PST
Attachment 83690 [details] did not build on qt:
Build output: http://queues.webkit.org/results/7984548
Comment 7 Build Bot 2011-02-24 12:55:19 PST
Attachment 83690 [details] did not build on win:
Build output: http://queues.webkit.org/results/7980584
Comment 8 Sam Weinig 2011-02-24 13:38:15 PST
Landed in r79612.
Comment 9 WebKit Review Bot 2011-02-24 15:59:51 PST
http://trac.webkit.org/changeset/79612 might have broken Qt Linux Release