layoutTestController.display() is flaky for SVG tests
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2012 21:37:43 +0000 (21:37 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2012 21:37:43 +0000 (21:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78021

Reviewed by Dan Bernstein.

Fix race condition in repaint rect tracking. When running a test using the repaint.js
harness right after a test starting with "svg/W3C-SVG-1.1" the repaint test will fail,
the gray overlay isn't contained in the pixel dump anymore. This is because of a specific
hack that forces 480x360 instead of 800x600 pixel test dumps for any test starting with
svg/W3C-SVG-1.1. The resizing of the web view was done when dumping the render tree, after
the repaint test already run, thus invalidating the previously tracked repaint rects.

* DumpRenderTree/mac/DumpRenderTree.mm:
(dump):
(runTest):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106983 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm

index f9c75ef..9cf367d 100644 (file)
@@ -1,3 +1,21 @@
+2012-02-07  Nikolas Zimmermann  <nzimmermann@rim.com>
+
+        layoutTestController.display() is flaky for SVG tests
+        https://bugs.webkit.org/show_bug.cgi?id=78021
+
+        Reviewed by Dan Bernstein.
+
+        Fix race condition in repaint rect tracking. When running a test using the repaint.js
+        harness right after a test starting with "svg/W3C-SVG-1.1" the repaint test will fail,
+        the gray overlay isn't contained in the pixel dump anymore. This is because of a specific
+        hack that forces 480x360 instead of 800x600 pixel test dumps for any test starting with
+        svg/W3C-SVG-1.1. The resizing of the web view was done when dumping the render tree, after
+        the repaint test already run, thus invalidating the previously tracked repaint rects.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (dump):
+        (runTest):
+
 2012-02-07  Hans Wennborg  <hans@chromium.org>
 
         Chromium: remove WebSpeechInputResult::set
index b735a96..3012a70 100644 (file)
@@ -1146,10 +1146,8 @@ void dump()
             WebArchive *webArchive = [[mainFrame dataSource] webArchive];
             resultString = HardAutorelease(createXMLStringFromWebArchiveData((CFDataRef)[webArchive data]));
             resultMimeType = @"application/x-webarchive";
-        } else {
-            sizeWebViewForCurrentTest();
+        } else
             resultString = [mainFrame renderTreeAsExternalRepresentationForPrinting:gLayoutTestController->isPrinting()];
-        }
 
         if (resultString && !resultData)
             resultData = [resultString dataUsingEncoding:NSUTF8StringEncoding];
@@ -1303,6 +1301,7 @@ static void runTest(const string& testPathOrURL)
     releaseAndZero(&draggingInfo);
     done = NO;
 
+    sizeWebViewForCurrentTest();
     gLayoutTestController->setIconDatabaseEnabled(false);
 
     if (disallowedURLs)