Pixel tests in SVG are all broken in WK2
authorSimon Fraser <simon.fraser@apple.com>
Thu, 25 Apr 2013 02:09:22 +0000 (02:09 +0000)
committerSimon Fraser <simon.fraser@apple.com>
Thu, 25 Apr 2013 02:09:22 +0000 (02:09 +0000)
commit1e3a0db7f7a501f6504872af21593642b98a45da
treeaee4f43902bb568f58be82abf5006cd5298dd43c
parent8bf79d5d8cfc2eab2ac021037cfd447edcfe5d11
Pixel tests in SVG are all broken in WK2
https://bugs.webkit.org/show_bug.cgi?id=114218

Reviewed by Darin Adler.

Window snapshots in WebKitTestRunner on Mac are window-sized
(800x600), which is wrong for the W3C SVG tests that require a
480x360 snapshot.

Fix by resizing the window, as well as the web view in
PlatformWebView::resizeTo() so that window snapshots are correctly
sized.

Also do some drive-by cleanup of the window size constants in both
DRT and WTR to remove magic numbers, and make the code more similar.

* DumpRenderTree/TestRunner.cpp:
(TestRunner::setShouldPaintBrokenImage):
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/efl/DumpRenderTree.cpp:
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(webInspectorShowWindow):
* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):
(sizeWebViewForCurrentTest):
* DumpRenderTree/mac/DumpRenderTreeMac.h:
* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(createPagedBitmapContext):
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(DumpRenderTree::DumpRenderTree):
(DumpRenderTree::open):
* DumpRenderTree/qt/TestRunnerQt.cpp:
* DumpRenderTree/qt/TestRunnerQt.h:
* DumpRenderTree/win/DumpRenderTree.cpp:
(sizeWebViewForCurrentTest):
* DumpRenderTree/wx/DumpRenderTreeWx.cpp:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::sizeWebViewForCurrentTest):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::resizeTo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Tools/ChangeLog
Tools/DumpRenderTree/TestRunner.cpp
Tools/DumpRenderTree/TestRunner.h
Tools/DumpRenderTree/efl/DumpRenderTree.cpp
Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/mac/DumpRenderTreeMac.h
Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm
Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
Tools/DumpRenderTree/qt/TestRunnerQt.cpp
Tools/DumpRenderTree/qt/TestRunnerQt.h
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestController.h
Tools/WebKitTestRunner/TestInvocation.cpp
Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm