| OLD | NEW |
| 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 Loading... |
| 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 } | |
| 257 fflush(stdout); | 255 fflush(stdout); |
| 258 fflush(stderr); | |
| 259 } | 256 } |
| 260 | 257 |
| 261 return true; | 258 return true; |
| 262 } | 259 } |
| 263 | 260 |
| 264 std::string TestShell::RewriteLocalUrl(const std::string& url) { | 261 std::string TestShell::RewriteLocalUrl(const std::string& url) { |
| 265 // Convert file:///tmp/LayoutTests urls to the actual location on disk. | 262 // Convert file:///tmp/LayoutTests urls to the actual location on disk. |
| 266 const char kPrefix[] = "file:///tmp/LayoutTests/"; | 263 const char kPrefix[] = "file:///tmp/LayoutTests/"; |
| 267 const int kPrefixLen = arraysize(kPrefix) - 1; | 264 const int kPrefixLen = arraysize(kPrefix) - 1; |
| 268 | 265 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 if (::IsDebuggerPresent()) | 377 if (::IsDebuggerPresent()) |
| 381 return 0; | 378 return 0; |
| 382 | 379 |
| 383 TestShell* shell = static_cast<TestShell*>(arg); | 380 TestShell* shell = static_cast<TestShell*>(arg); |
| 384 DWORD timeout = static_cast<DWORD>(shell->GetFileTestTimeout() * 2.5); | 381 DWORD timeout = static_cast<DWORD>(shell->GetFileTestTimeout() * 2.5); |
| 385 DWORD rv = WaitForSingleObject(shell->finished_event(), timeout); | 382 DWORD rv = WaitForSingleObject(shell->finished_event(), timeout); |
| 386 if (rv == WAIT_TIMEOUT) { | 383 if (rv == WAIT_TIMEOUT) { |
| 387 // Print a warning to be caught by the layout-test script. | 384 // Print a warning to be caught by the layout-test script. |
| 388 // Note: the layout test driver may or may not recognize | 385 // Note: the layout test driver may or may not recognize |
| 389 // this as a timeout. | 386 // this as a timeout. |
| 390 printf("#TEST_TIMED_OUT\n"); | 387 puts("#TEST_TIMED_OUT\n"); |
| 391 printf("#EOF\n"); | 388 puts("#EOF\n"); |
| 392 fprintf(stderr, "#EOF\n"); | |
| 393 fflush(stdout); | 389 fflush(stdout); |
| 394 fflush(stderr); | |
| 395 TerminateProcess(GetCurrentProcess(), 0); | 390 TerminateProcess(GetCurrentProcess(), 0); |
| 396 } | 391 } |
| 397 // Finished normally. | 392 // Finished normally. |
| 398 return 0; | 393 return 0; |
| 399 } | 394 } |
| 400 | 395 |
| 401 void TestShell::WaitTestFinished() { | 396 void TestShell::WaitTestFinished() { |
| 402 DCHECK(!test_is_pending_) << "cannot be used recursively"; | 397 DCHECK(!test_is_pending_) << "cannot be used recursively"; |
| 403 | 398 |
| 404 test_is_pending_ = true; | 399 test_is_pending_ = true; |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 | 707 |
| 713 bool DownloadUrl(const std::string& url, HWND caller_window) { | 708 bool DownloadUrl(const std::string& url, HWND caller_window) { |
| 714 return false; | 709 return false; |
| 715 } | 710 } |
| 716 | 711 |
| 717 ScreenInfo GetScreenInfo(gfx::ViewHandle window) { | 712 ScreenInfo GetScreenInfo(gfx::ViewHandle window) { |
| 718 return GetScreenInfoHelper(window); | 713 return GetScreenInfoHelper(window); |
| 719 } | 714 } |
| 720 | 715 |
| 721 } // namespace webkit_glue | 716 } // namespace webkit_glue |
| OLD | NEW |