Changeset 108054 in webkit


Ignore:
Timestamp:
Feb 17, 2012 3:07:05 AM (12 years ago)
Author:
Nikolas Zimmermann
Message:

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):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r108039 r108054  
     12012-02-17  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        layoutTestController.display() is flaky for SVG tests
     4        https://bugs.webkit.org/show_bug.cgi?id=78021
     5
     6        Reviewed by Adam Roben.
     7
     8        Apply the same fix to DRT/Win, as previously applied to DRT/Mac.
     9        Size the web view before running the test, not when dumping.
     10        All platforms handle this correctly now.
     11
     12        * DumpRenderTree/win/DumpRenderTree.cpp:
     13        (dump):
     14        (sizeWebViewForCurrentTest):
     15        (runTest):
     16
    1172012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
    218
  • trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp

    r107689 r108054  
    723723
    724724    if (dumpTree) {
     725        ::InvalidateRect(webViewWindow, 0, TRUE);
     726        ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
     727
    725728        if (::gLayoutTestController->dumpAsText()) {
    726             ::InvalidateRect(webViewWindow, 0, TRUE);
    727             ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
    728729            wstring result = dumpFramesAsText(frame);
    729730            resultString = SysAllocStringLen(result.data(), result.size());
    730731        } else {
    731             bool isSVGW3CTest = (gLayoutTestController->testPathOrURL().find("svg\\W3C-SVG-1.1") != string::npos);
    732             unsigned width;
    733             unsigned height;
    734             if (isSVGW3CTest) {
    735                 width = 480;
    736                 height = 360;
    737             } else {
    738                 width = LayoutTestController::maxViewWidth;
    739                 height = LayoutTestController::maxViewHeight;
    740             }
    741 
    742             ::SetWindowPos(webViewWindow, 0, 0, 0, width, height, SWP_NOMOVE);
    743             ::InvalidateRect(webViewWindow, 0, TRUE);
    744             ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
    745 
    746732            COMPtr<IWebFramePrivate> framePrivate;
    747733            if (FAILED(frame->QueryInterface(&framePrivate)))
     
    947933}
    948934
     935static void sizeWebViewForCurrentTest()
     936{
     937    bool isSVGW3CTest = (gLayoutTestController->testPathOrURL().find("svg\\W3C-SVG-1.1") != string::npos);
     938    unsigned width;
     939    unsigned height;
     940    if (isSVGW3CTest) {
     941        width = 480;
     942        height = 360;
     943    } else {
     944        width = LayoutTestController::maxViewWidth;
     945        height = LayoutTestController::maxViewHeight;
     946    }
     947
     948    ::SetWindowPos(webViewWindow, 0, 0, 0, width, height, SWP_NOMOVE);
     949}
     950
    949951static void runTest(const string& testPathOrURL)
    950952{
     
    986988    topLoadingFrame = 0;
    987989
     990    sizeWebViewForCurrentTest();
    988991    gLayoutTestController->setIconDatabaseEnabled(false);
    989992
Note: See TracChangeset for help on using the changeset viewer.