Changeset 129139 in webkit


Ignore:
Timestamp:
Sep 20, 2012 8:57:31 AM (12 years ago)
Author:
schenney@chromium.org
Message:

[Chromium] DRT does not support --dump-all-pixels flag
https://bugs.webkit.org/show_bug.cgi?id=95098

Reviewed by Dirk Pranke.

Add support for the --pixel-tests and shorthand -p option in Chromium DumpRenderTree. Use
of this flag causes pixel results to be created for all tests, regardless of
individual test options. If an individual test provides a pixel hash it will be used,
otherwise the hash will be empty. This replaces a previously defined but unused option
--dump-all-pixels, and is useful primarily when debugging DRT instances.

  • DumpRenderTree/chromium/DumpRenderTree.cpp:

(runTest): Add a parameter and code to force pixel results for the test.
(main): Add parameter handling for --pixels-test and -p, and remove --dump-all-pixels.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r129138 r129139  
     12012-09-20  Stephen Chenney  <schenney@chromium.org>
     2
     3        [Chromium] DRT does not support --dump-all-pixels flag
     4        https://bugs.webkit.org/show_bug.cgi?id=95098
     5
     6        Reviewed by Dirk Pranke.
     7
     8        Add support for the --pixel-tests and shorthand -p option in Chromium DumpRenderTree. Use
     9        of this flag causes pixel results to be created for all tests, regardless of
     10        individual test options. If an individual test provides a pixel hash it will be used,
     11        otherwise the hash will be empty. This replaces a previously defined but unused option
     12        --dump-all-pixels, and is useful primarily when debugging DRT instances.
     13
     14        * DumpRenderTree/chromium/DumpRenderTree.cpp:
     15        (runTest): Add a parameter and code to force pixel results for the test.
     16        (main): Add parameter handling for --pixels-test and -p, and remove --dump-all-pixels.
     17
    1182012-09-20  Carlos Garcia Campos  <cgarcia@igalia.com>
    219
  • trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp

    r127794 r129139  
    4444
    4545static const char optionComplexText[] = "--complex-text";
    46 static const char optionDumpAllPixels[] = "--dump-all-pixels";
     46static const char optionDumpPixels[] = "--pixel-tests";
     47static const char optionDumpPixelsShortForm[] = "-p";
    4748static const char optionNotree[] = "--notree";
    4849static const char optionThreaded[] = "--threaded";
     
    8687};
    8788
    88 static void runTest(TestShell& shell, TestParams& params, const string& inputLine)
     89static void runTest(TestShell& shell, TestParams& params, const string& inputLine, const bool forceDumpPixels)
    8990{
    9091    int oldTimeoutMsec = shell.layoutTestTimeout();
     
    104105          shell.setDumpWhenFinished(isLastLoad);
    105106          shell.resetTestController();
    106           shell.runFileTest(params, command.shouldDumpPixels);
     107          shell.runFileTest(params, command.shouldDumpPixels || forceDumpPixels);
    107108      }
    108109    } else {
    109110      shell.resetTestController();
    110       shell.runFileTest(params, command.shouldDumpPixels);
     111      shell.runFileTest(params, command.shouldDumpPixels || forceDumpPixels);
    111112    }
    112113    shell.setLayoutTestTimeout(oldTimeoutMsec);
     
    121122    Vector<string> tests;
    122123    bool serverMode = false;
     124    bool dumpAllPixels = false;
    123125    bool allowExternalPages = false;
    124126    bool startupDialog = false;
     
    140142        if (argument == "-")
    141143            serverMode = true;
     144        else if (argument == optionDumpPixels || argument == optionDumpPixelsShortForm)
     145            dumpAllPixels = true;
    142146        else if (argument == optionNotree)
    143147            params.dumpTree = false;
     
    240244                if (!strcmp(testString, "QUIT"))
    241245                    break;
    242                 runTest(shell, params, testString);
     246                runTest(shell, params, testString, dumpAllPixels);
    243247            }
    244248        } else if (!tests.size())
     
    247251            params.printSeparators = tests.size() > 1;
    248252            for (unsigned i = 0; i < tests.size(); i++)
    249                 runTest(shell, params, tests[i]);
     253                runTest(shell, params, tests[i], dumpAllPixels);
    250254        }
    251255
Note: See TracChangeset for help on using the changeset viewer.