| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 // This is the best we can do to return an error. | 407 // This is the best we can do to return an error. |
| 408 result->SetNull(); | 408 result->SetNull(); |
| 409 return; | 409 return; |
| 410 } | 410 } |
| 411 result->Set(args[0].isEqual(args[1])); | 411 result->Set(args[0].isEqual(args[1])); |
| 412 } | 412 } |
| 413 | 413 |
| 414 void LayoutTestController::Reset() { | 414 void LayoutTestController::Reset() { |
| 415 if (shell_) { | 415 if (shell_) { |
| 416 shell_->webView()->zoomDefault(); | 416 shell_->webView()->zoomDefault(); |
| 417 shell_->webView()->SetTabKeyCyclesThroughElements(true); | 417 shell_->webView()->setTabKeyCyclesThroughElements(true); |
| 418 } | 418 } |
| 419 dump_as_text_ = false; | 419 dump_as_text_ = false; |
| 420 dump_editing_callbacks_ = false; | 420 dump_editing_callbacks_ = false; |
| 421 dump_frame_load_callbacks_ = false; | 421 dump_frame_load_callbacks_ = false; |
| 422 dump_resource_load_callbacks_ = false; | 422 dump_resource_load_callbacks_ = false; |
| 423 dump_back_forward_list_ = false; | 423 dump_back_forward_list_ = false; |
| 424 dump_child_frame_scroll_positions_ = false; | 424 dump_child_frame_scroll_positions_ = false; |
| 425 dump_child_frames_as_text_ = false; | 425 dump_child_frames_as_text_ = false; |
| 426 dump_window_status_changes_ = false; | 426 dump_window_status_changes_ = false; |
| 427 dump_title_changes_ = false; | 427 dump_title_changes_ = false; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 | 479 |
| 480 void LayoutTestController::setCanOpenWindows( | 480 void LayoutTestController::setCanOpenWindows( |
| 481 const CppArgumentList& args, CppVariant* result) { | 481 const CppArgumentList& args, CppVariant* result) { |
| 482 can_open_windows_ = true; | 482 can_open_windows_ = true; |
| 483 result->SetNull(); | 483 result->SetNull(); |
| 484 } | 484 } |
| 485 | 485 |
| 486 void LayoutTestController::setTabKeyCyclesThroughElements( | 486 void LayoutTestController::setTabKeyCyclesThroughElements( |
| 487 const CppArgumentList& args, CppVariant* result) { | 487 const CppArgumentList& args, CppVariant* result) { |
| 488 if (args.size() > 0 && args[0].isBool()) { | 488 if (args.size() > 0 && args[0].isBool()) { |
| 489 shell_->webView()->SetTabKeyCyclesThroughElements(args[0].ToBoolean()); | 489 shell_->webView()->setTabKeyCyclesThroughElements(args[0].ToBoolean()); |
| 490 } | 490 } |
| 491 result->SetNull(); | 491 result->SetNull(); |
| 492 } | 492 } |
| 493 | 493 |
| 494 void LayoutTestController::windowCount( | 494 void LayoutTestController::windowCount( |
| 495 const CppArgumentList& args, CppVariant* result) { | 495 const CppArgumentList& args, CppVariant* result) { |
| 496 int num_windows = static_cast<int>(TestShell::windowList()->size()); | 496 int num_windows = static_cast<int>(TestShell::windowList()->size()); |
| 497 result->Set(num_windows); | 497 result->Set(num_windows); |
| 498 } | 498 } |
| 499 | 499 |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 result->SetNull(); | 970 result->SetNull(); |
| 971 SimpleDatabaseSystem::GetInstance()->ClearAllDatabases(); | 971 SimpleDatabaseSystem::GetInstance()->ClearAllDatabases(); |
| 972 } | 972 } |
| 973 | 973 |
| 974 void LayoutTestController::LogErrorToConsole(const std::string& text) { | 974 void LayoutTestController::LogErrorToConsole(const std::string& text) { |
| 975 shell_->delegate()->didAddMessageToConsole( | 975 shell_->delegate()->didAddMessageToConsole( |
| 976 WebConsoleMessage(WebConsoleMessage::LevelError, | 976 WebConsoleMessage(WebConsoleMessage::LevelError, |
| 977 WebString::fromUTF8(text)), | 977 WebString::fromUTF8(text)), |
| 978 WebString(), 0); | 978 WebString(), 0); |
| 979 } | 979 } |
| OLD | NEW |