diff options
author | Ben Murdoch <benm@google.com> | 2010-07-22 15:37:06 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-07-27 10:20:25 +0100 |
commit | 967717af5423377c967781471ee106e2bb4e11c8 (patch) | |
tree | 1e701dc0a12f7f07cce1df4a7681717de77a211b /WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp | |
parent | dcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff) | |
download | external_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2 |
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
Diffstat (limited to 'WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp')
-rw-r--r-- | WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp index 451ff86..a1b72e1 100644 --- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp +++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp @@ -134,7 +134,15 @@ bool setAlwaysAcceptCookies(bool alwaysAcceptCookies) wstring urlSuitableForTestResult(const wstring& url) { - if (!url.c_str() || url.find(L"file://") == wstring::npos) + if (url.find(L"file://") == wstring::npos) + return url; + + return lastPathComponent(url); +} + +wstring lastPathComponent(const wstring& url) +{ + if (url.empty()) return url; return PathFindFileNameW(url.c_str()); @@ -723,10 +731,11 @@ void dump() fflush(stderr); } - if (dumpPixels) { - if (!gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive()) - dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash()); - } + if (dumpPixels + && gLayoutTestController->generatePixelResults() + && !gLayoutTestController->dumpDOMAsWebArchive() + && !gLayoutTestController->dumpSourceAsWebArchive()) + dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash()); printf("#EOF\n"); // terminate the (possibly empty) pixels block fflush(stdout); |