Bug 55161 - Add basic pixel testing support to WebKitTestRunner
Summary: Add basic pixel testing support to WebKitTestRunner
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks: 49007
  Show dependency treegraph
 
Reported: 2011-02-24 11:20 PST by Sam Weinig
Modified: 2011-02-24 15:59 PST (History)
6 users (show)

See Also:


Attachments
Patch (35.63 KB, patch)
2011-02-24 11:41 PST, Sam Weinig
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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