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

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

Issue 20102: Report timeout before sending EOF to mark the correct test as timed out. (Closed)
Patch Set: Created 11 years, 10 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This file contains the definition for LayoutTestController. 5 // This file contains the definition for LayoutTestController.
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "webkit/tools/test_shell/layout_test_controller.h" 9 #include "webkit/tools/test_shell/layout_test_controller.h"
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 using std::string; 24 using std::string;
25 using std::wstring; 25 using std::wstring;
26 26
27 #if defined(OS_WIN) 27 #if defined(OS_WIN)
28 namespace { 28 namespace {
29 29
30 // Stops the test from running and prints a brief warning to stdout. Called 30 // Stops the test from running and prints a brief warning to stdout. Called
31 // when the timer for loading a layout test expires. 31 // when the timer for loading a layout test expires.
32 VOID CALLBACK TestTimeout(HWND hwnd, UINT msg, UINT_PTR timer_id, DWORD ms) { 32 VOID CALLBACK TestTimeout(HWND hwnd, UINT msg, UINT_PTR timer_id, DWORD ms) {
33 puts("#TEST_TIMED_OUT\n");
33 reinterpret_cast<TestShell*>(timer_id)->TestFinished(); 34 reinterpret_cast<TestShell*>(timer_id)->TestFinished();
34 // Print a warning to be caught by the layout-test script. 35 // Print a warning to be caught by the layout-test script.
35 puts("#TEST_TIMED_OUT\n");
36 } 36 }
37 37
38 } 38 }
39 #endif 39 #endif
40 40
41 TestShell* LayoutTestController::shell_ = NULL; 41 TestShell* LayoutTestController::shell_ = NULL;
42 bool LayoutTestController::dump_as_text_ = false; 42 bool LayoutTestController::dump_as_text_ = false;
43 bool LayoutTestController::dump_editing_callbacks_ = false; 43 bool LayoutTestController::dump_editing_callbacks_ = false;
44 bool LayoutTestController::dump_frame_load_callbacks_ = false; 44 bool LayoutTestController::dump_frame_load_callbacks_ = false;
45 bool LayoutTestController::dump_resource_load_callbacks_ = false; 45 bool LayoutTestController::dump_resource_load_callbacks_ = false;
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 void LayoutTestController::fallbackMethod( 705 void LayoutTestController::fallbackMethod(
706 const CppArgumentList& args, CppVariant* result) { 706 const CppArgumentList& args, CppVariant* result) {
707 std::wstring message(L"JavaScript ERROR: unknown method called on LayoutTestCo ntroller"); 707 std::wstring message(L"JavaScript ERROR: unknown method called on LayoutTestCo ntroller");
708 if (!shell_->layout_test_mode()) { 708 if (!shell_->layout_test_mode()) {
709 logging::LogMessage("CONSOLE:", 0).stream() << message; 709 logging::LogMessage("CONSOLE:", 0).stream() << message;
710 } else { 710 } else {
711 printf("CONSOLE MESSAGE: %S\n", message.c_str()); 711 printf("CONSOLE MESSAGE: %S\n", message.c_str());
712 } 712 }
713 result->SetNull(); 713 result->SetNull();
714 } 714 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698