Modified: trunk/Tools/ChangeLog (108053 => 108054)
--- trunk/Tools/ChangeLog 2012-02-17 10:37:17 UTC (rev 108053)
+++ trunk/Tools/ChangeLog 2012-02-17 11:07:05 UTC (rev 108054)
@@ -1,3 +1,19 @@
+2012-02-17 Nikolas Zimmermann <[email protected]>
+
+ layoutTestController.display() is flaky for SVG tests
+ https://bugs.webkit.org/show_bug.cgi?id=78021
+
+ Reviewed by Adam Roben.
+
+ Apply the same fix to DRT/Win, as previously applied to DRT/Mac.
+ Size the web view before running the test, not when dumping.
+ All platforms handle this correctly now.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dump):
+ (sizeWebViewForCurrentTest):
+ (runTest):
+
2012-02-16 Carlos Garcia Campos <[email protected]>
[GTK] Make install is broken when building without --enable-gtk-doc
Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (108053 => 108054)
--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp 2012-02-17 10:37:17 UTC (rev 108053)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp 2012-02-17 11:07:05 UTC (rev 108054)
@@ -722,27 +722,13 @@
BSTR resultString = 0;
if (dumpTree) {
+ ::InvalidateRect(webViewWindow, 0, TRUE);
+ ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
+
if (::gLayoutTestController->dumpAsText()) {
- ::InvalidateRect(webViewWindow, 0, TRUE);
- ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
wstring result = dumpFramesAsText(frame);
resultString = SysAllocStringLen(result.data(), result.size());
} else {
- bool isSVGW3CTest = (gLayoutTestController->testPathOrURL().find("svg\\W3C-SVG-1.1") != string::npos);
- unsigned width;
- unsigned height;
- if (isSVGW3CTest) {
- width = 480;
- height = 360;
- } else {
- width = LayoutTestController::maxViewWidth;
- height = LayoutTestController::maxViewHeight;
- }
-
- ::SetWindowPos(webViewWindow, 0, 0, 0, width, height, SWP_NOMOVE);
- ::InvalidateRect(webViewWindow, 0, TRUE);
- ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
-
COMPtr<IWebFramePrivate> framePrivate;
if (FAILED(frame->QueryInterface(&framePrivate)))
goto fail;
@@ -946,6 +932,22 @@
framePrivate->clearOpener();
}
+static void sizeWebViewForCurrentTest()
+{
+ bool isSVGW3CTest = (gLayoutTestController->testPathOrURL().find("svg\\W3C-SVG-1.1") != string::npos);
+ unsigned width;
+ unsigned height;
+ if (isSVGW3CTest) {
+ width = 480;
+ height = 360;
+ } else {
+ width = LayoutTestController::maxViewWidth;
+ height = LayoutTestController::maxViewHeight;
+ }
+
+ ::SetWindowPos(webViewWindow, 0, 0, 0, width, height, SWP_NOMOVE);
+}
+
static void runTest(const string& testPathOrURL)
{
static BSTR methodBStr = SysAllocString(TEXT("GET"));
@@ -985,6 +987,7 @@
done = false;
topLoadingFrame = 0;
+ sizeWebViewForCurrentTest();
gLayoutTestController->setIconDatabaseEnabled(false);
if (shouldLogFrameLoadDelegates(pathOrURL.c_str()))