| 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 // 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |