From: zimmermann@webkit.org Date: Tue, 7 Feb 2012 21:37:43 +0000 (+0000) Subject: layoutTestController.display() is flaky for SVG tests X-Git-Tag: 070512121124~13557 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a5ef64c486d4963cd72fdd8afc4286ab4f84400;p=profile%2Fivi%2Fwebkit-efl.git 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): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106983 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Tools/ChangeLog b/Tools/ChangeLog index f9c75ef..9cf367d 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,21 @@ +2012-02-07 Nikolas Zimmermann + + 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 Chromium: remove WebSpeechInputResult::set diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm index b735a96..3012a70 100644 --- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm +++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm @@ -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)