summaryrefslogtreecommitdiff
path: root/Tools/DumpRenderTree/win/DumpRenderTree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/DumpRenderTree/win/DumpRenderTree.cpp')
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTree.cpp27
1 files changed, 8 insertions, 19 deletions
diff --git a/Tools/DumpRenderTree/win/DumpRenderTree.cpp b/Tools/DumpRenderTree/win/DumpRenderTree.cpp
index f402a02ca..312430d56 100644
--- a/Tools/DumpRenderTree/win/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/win/DumpRenderTree.cpp
@@ -80,7 +80,7 @@ static LPCWSTR fontsEnvironmentVariable = L"WEBKIT_TESTFONTS";
const LPCWSTR kDumpRenderTreeClassName = L"DumpRenderTreeWindow";
static bool dumpTree = true;
-static bool dumpPixels;
+static bool dumpPixelsForCurrentTest;
static bool dumpAllPixels;
static bool printSeparators;
static bool leakChecking = false;
@@ -759,7 +759,7 @@ void dump()
fflush(stderr);
}
- if (dumpPixels
+ if (dumpPixelsForCurrentTest
&& gLayoutTestController->generatePixelResults()
&& !gLayoutTestController->dumpDOMAsWebArchive()
&& !gLayoutTestController->dumpSourceAsWebArchive())
@@ -948,20 +948,14 @@ static void sizeWebViewForCurrentTest()
::SetWindowPos(webViewWindow, 0, 0, 0, width, height, SWP_NOMOVE);
}
-static void runTest(const string& testPathOrURL)
+static void runTest(const string& inputLine)
{
+ TestCommand command = parseInputLine(inputLine);
+ const string& pathOrURL = command.pathOrURL;
+ dumpPixelsForCurrentTest = command.shouldDumpPixels;
+
static BSTR methodBStr = SysAllocString(TEXT("GET"));
- // Look for "'" as a separator between the path or URL, and the pixel dump hash that follows.
- string pathOrURL(testPathOrURL);
- string expectedPixelHash;
-
- size_t separatorPos = pathOrURL.find("'");
- if (separatorPos != string::npos) {
- pathOrURL = string(testPathOrURL, 0, separatorPos);
- expectedPixelHash = string(testPathOrURL, separatorPos + 1);
- }
-
BSTR urlBStr;
CFStringRef str = CFStringCreateWithCString(0, pathOrURL.c_str(), kCFStringEncodingWindowsLatin1);
@@ -983,7 +977,7 @@ static void runTest(const string& testPathOrURL)
CFRelease(url);
- ::gLayoutTestController = LayoutTestController::create(pathOrURL, expectedPixelHash);
+ ::gLayoutTestController = LayoutTestController::create(pathOrURL, command.expectedPixelHash);
done = false;
topLoadingFrame = 0;
@@ -1337,11 +1331,6 @@ extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(int argc, cons
continue;
}
- if (!stricmp(argv[i], "--pixel-tests")) {
- dumpPixels = true;
- continue;
- }
-
if (!stricmp(argv[i], "--complex-text")) {
forceComplexText = true;
continue;