Commit 24fe2012 authored by schenney@chromium.org's avatar schenney@chromium.org
Browse files

[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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 10f5a027
2012-09-20 Stephen Chenney <schenney@chromium.org>
[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.
2012-09-20 Carlos Garcia Campos <cgarcia@igalia.com>
 
[GTK] run-api-tests should not buffer test stdout
......
......@@ -43,7 +43,8 @@
using namespace std;
static const char optionComplexText[] = "--complex-text";
static const char optionDumpAllPixels[] = "--dump-all-pixels";
static const char optionDumpPixels[] = "--pixel-tests";
static const char optionDumpPixelsShortForm[] = "-p";
static const char optionNotree[] = "--notree";
static const char optionThreaded[] = "--threaded";
static const char optionDebugRenderTree[] = "--debug-render-tree";
......@@ -85,7 +86,7 @@ private:
OwnPtr<MockWebKitPlatformSupport> m_mockPlatform;
};
static void runTest(TestShell& shell, TestParams& params, const string& inputLine)
static void runTest(TestShell& shell, TestParams& params, const string& inputLine, const bool forceDumpPixels)
{
int oldTimeoutMsec = shell.layoutTestTimeout();
TestCommand command = parseInputLine(inputLine);
......@@ -103,11 +104,11 @@ static void runTest(TestShell& shell, TestParams& params, const string& inputLin
bool isLastLoad = (i == (v8::Testing::GetStressRuns() - 1));
shell.setDumpWhenFinished(isLastLoad);
shell.resetTestController();
shell.runFileTest(params, command.shouldDumpPixels);
shell.runFileTest(params, command.shouldDumpPixels || forceDumpPixels);
}
} else {
shell.resetTestController();
shell.runFileTest(params, command.shouldDumpPixels);
shell.runFileTest(params, command.shouldDumpPixels || forceDumpPixels);
}
shell.setLayoutTestTimeout(oldTimeoutMsec);
}
......@@ -120,6 +121,7 @@ int main(int argc, char* argv[])
TestParams params;
Vector<string> tests;
bool serverMode = false;
bool dumpAllPixels = false;
bool allowExternalPages = false;
bool startupDialog = false;
bool acceleratedCompositingForVideoEnabled = false;
......@@ -139,6 +141,8 @@ int main(int argc, char* argv[])
string argument(argv[i]);
if (argument == "-")
serverMode = true;
else if (argument == optionDumpPixels || argument == optionDumpPixelsShortForm)
dumpAllPixels = true;
else if (argument == optionNotree)
params.dumpTree = false;
else if (argument == optionDebugRenderTree)
......@@ -239,14 +243,14 @@ int main(int argc, char* argv[])
// Explicitly quit on platforms where EOF is not reliable.
if (!strcmp(testString, "QUIT"))
break;
runTest(shell, params, testString);
runTest(shell, params, testString, dumpAllPixels);
}
} else if (!tests.size())
puts("#EOF");
else {
params.printSeparators = tests.size() > 1;
for (unsigned i = 0; i < tests.size(); i++)
runTest(shell, params, tests[i]);
runTest(shell, params, tests[i], dumpAllPixels);
}
shell.callJSGC();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment