| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 if (shell_) { | 492 if (shell_) { |
| 493 shell_->webView()->setZoomLevel(false, 0); | 493 shell_->webView()->setZoomLevel(false, 0); |
| 494 shell_->webView()->setTabKeyCyclesThroughElements(true); | 494 shell_->webView()->setTabKeyCyclesThroughElements(true); |
| 495 #if defined(TOOLKIT_GTK) | 495 #if defined(TOOLKIT_GTK) |
| 496 // (Constants copied because we can't depend on the header that defined | 496 // (Constants copied because we can't depend on the header that defined |
| 497 // them from this file.) | 497 // them from this file.) |
| 498 shell_->webView()->setSelectionColors( | 498 shell_->webView()->setSelectionColors( |
| 499 0xff1e90ff, 0xff000000, 0xffc8c8c8, 0xff323232); | 499 0xff1e90ff, 0xff000000, 0xffc8c8c8, 0xff323232); |
| 500 #endif // defined(TOOLKIT_GTK) | 500 #endif // defined(TOOLKIT_GTK) |
| 501 shell_->webView()->removeAllUserContent(); | 501 shell_->webView()->removeAllUserContent(); |
| 502 |
| 503 // Reset editingBehavior to a reasonable default between tests |
| 504 // see http://trac.webkit.org/changeset/60158 |
| 505 // DumpRenderTree resets this in TestShell::resetWebSettings() |
| 506 // called in TestShell::resetTestController(). |
| 507 // test_shell doesn't have ResetWebSettings(), so do this here, |
| 508 // which is also called in TestShell::ResetTestController(). |
| 509 #if defined(OS_MACOSX) |
| 510 shell_->webView()->settings()->setEditingBehavior( |
| 511 WebKit::WebSettings::EditingBehaviorMac); |
| 512 #else |
| 513 shell_->webView()->settings()->setEditingBehavior( |
| 514 WebKit::WebSettings::EditingBehaviorWin); |
| 515 #endif |
| 502 } | 516 } |
| 503 generate_pixel_results_ = true; | 517 generate_pixel_results_ = true; |
| 504 dump_as_text_ = false; | 518 dump_as_text_ = false; |
| 505 dump_editing_callbacks_ = false; | 519 dump_editing_callbacks_ = false; |
| 506 dump_frame_load_callbacks_ = false; | 520 dump_frame_load_callbacks_ = false; |
| 507 dump_resource_load_callbacks_ = false; | 521 dump_resource_load_callbacks_ = false; |
| 508 dump_back_forward_list_ = false; | 522 dump_back_forward_list_ = false; |
| 509 dump_child_frame_scroll_positions_ = false; | 523 dump_child_frame_scroll_positions_ = false; |
| 510 dump_child_frames_as_text_ = false; | 524 dump_child_frames_as_text_ = false; |
| 511 dump_window_status_changes_ = false; | 525 dump_window_status_changes_ = false; |
| (...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1404 | 1418 |
| 1405 void LayoutTestController::markerTextForListItem(const CppArgumentList& args, | 1419 void LayoutTestController::markerTextForListItem(const CppArgumentList& args, |
| 1406 CppVariant* result) { | 1420 CppVariant* result) { |
| 1407 WebElement element; | 1421 WebElement element; |
| 1408 if (!WebBindings::getElement(args[0].value.objectValue, &element)) | 1422 if (!WebBindings::getElement(args[0].value.objectValue, &element)) |
| 1409 result->SetNull(); | 1423 result->SetNull(); |
| 1410 else | 1424 else |
| 1411 result->Set( | 1425 result->Set( |
| 1412 element.document().frame()->markerTextForListItem(element).utf8()); | 1426 element.document().frame()->markerTextForListItem(element).utf8()); |
| 1413 } | 1427 } |
| OLD | NEW |