Modified: trunk/Tools/ChangeLog (129138 => 129139)
--- trunk/Tools/ChangeLog 2012-09-20 15:48:36 UTC (rev 129138)
+++ trunk/Tools/ChangeLog 2012-09-20 15:57:31 UTC (rev 129139)
@@ -1,3 +1,20 @@
+2012-09-20 Stephen Chenney <[email protected]>
+
+ [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 <[email protected]>
[GTK] run-api-tests should not buffer test stdout
Modified: trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp (129138 => 129139)
--- trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp 2012-09-20 15:48:36 UTC (rev 129138)
+++ trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp 2012-09-20 15:57:31 UTC (rev 129139)
@@ -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 @@
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 @@
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 @@
TestParams params;
Vector<string> tests;
bool serverMode = false;
+ bool dumpAllPixels = false;
bool allowExternalPages = false;
bool startupDialog = false;
bool acceleratedCompositingForVideoEnabled = false;
@@ -139,6 +141,8 @@
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 @@
// 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();