Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: webkit/tools/test_shell/test_shell_win.cc

Issue 8778: Collect stderr separately from stdout and append it to the layout test outp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <windows.h> 5 #include <windows.h>
6 #include <atlbase.h> 6 #include <atlbase.h>
7 #include <commdlg.h> 7 #include <commdlg.h>
8 #include <objbase.h> 8 #include <objbase.h>
9 #include <shlwapi.h> 9 #include <shlwapi.h>
10 #include <wininet.h> 10 #include <wininet.h>
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 244
245 if (params.dump_pixels && !should_dump_as_text) { 245 if (params.dump_pixels && !should_dump_as_text) {
246 // Image output: we write the image data to the file given on the 246 // Image output: we write the image data to the file given on the
247 // command line (for the dump pixels argument), and the MD5 sum to 247 // command line (for the dump pixels argument), and the MD5 sum to
248 // stdout. 248 // stdout.
249 dumped_anything = true; 249 dumped_anything = true;
250 std::string md5sum = DumpImage(webFrame, params.pixel_file_name); 250 std::string md5sum = DumpImage(webFrame, params.pixel_file_name);
251 printf("#MD5:%s\n", md5sum.c_str()); 251 printf("#MD5:%s\n", md5sum.c_str());
252 } 252 }
253 if (dumped_anything) 253 if (dumped_anything) {
254 printf("#EOF\n"); 254 printf("#EOF\n");
255 fprintf(stderr, "#EOF\n");
256 }
255 fflush(stdout); 257 fflush(stdout);
258 fflush(stderr);
256 } 259 }
257 260
258 return true; 261 return true;
259 } 262 }
260 263
261 std::string TestShell::RewriteLocalUrl(const std::string& url) { 264 std::string TestShell::RewriteLocalUrl(const std::string& url) {
262 // Convert file:///tmp/LayoutTests urls to the actual location on disk. 265 // Convert file:///tmp/LayoutTests urls to the actual location on disk.
263 const char kPrefix[] = "file:///tmp/LayoutTests/"; 266 const char kPrefix[] = "file:///tmp/LayoutTests/";
264 const int kPrefixLen = arraysize(kPrefix) - 1; 267 const int kPrefixLen = arraysize(kPrefix) - 1;
265 268
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 if (::IsDebuggerPresent()) 380 if (::IsDebuggerPresent())
378 return 0; 381 return 0;
379 382
380 TestShell* shell = static_cast<TestShell*>(arg); 383 TestShell* shell = static_cast<TestShell*>(arg);
381 DWORD timeout = static_cast<DWORD>(shell->GetFileTestTimeout() * 2.5); 384 DWORD timeout = static_cast<DWORD>(shell->GetFileTestTimeout() * 2.5);
382 DWORD rv = WaitForSingleObject(shell->finished_event(), timeout); 385 DWORD rv = WaitForSingleObject(shell->finished_event(), timeout);
383 if (rv == WAIT_TIMEOUT) { 386 if (rv == WAIT_TIMEOUT) {
384 // Print a warning to be caught by the layout-test script. 387 // Print a warning to be caught by the layout-test script.
385 // Note: the layout test driver may or may not recognize 388 // Note: the layout test driver may or may not recognize
386 // this as a timeout. 389 // this as a timeout.
387 puts("#TEST_TIMED_OUT\n"); 390 printf("#TEST_TIMED_OUT\n");
388 puts("#EOF\n"); 391 printf("#EOF\n");
392 fprintf(stderr, "#EOF\n");
389 fflush(stdout); 393 fflush(stdout);
394 fflush(stderr);
390 TerminateProcess(GetCurrentProcess(), 0); 395 TerminateProcess(GetCurrentProcess(), 0);
391 } 396 }
392 // Finished normally. 397 // Finished normally.
393 return 0; 398 return 0;
394 } 399 }
395 400
396 void TestShell::WaitTestFinished() { 401 void TestShell::WaitTestFinished() {
397 DCHECK(!test_is_pending_) << "cannot be used recursively"; 402 DCHECK(!test_is_pending_) << "cannot be used recursively";
398 403
399 test_is_pending_ = true; 404 test_is_pending_ = true;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 712
708 bool DownloadUrl(const std::string& url, HWND caller_window) { 713 bool DownloadUrl(const std::string& url, HWND caller_window) {
709 return false; 714 return false;
710 } 715 }
711 716
712 ScreenInfo GetScreenInfo(gfx::ViewHandle window) { 717 ScreenInfo GetScreenInfo(gfx::ViewHandle window) {
713 return GetScreenInfoHelper(window); 718 return GetScreenInfoHelper(window);
714 } 719 }
715 720
716 } // namespace webkit_glue 721 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/mac/test_webview_delegate.mm ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698