| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/shell/renderer/layout_test/blink_test_runner.h" | 5 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <clocale> | 10 #include <clocale> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "base/strings/stringprintf.h" | 26 #include "base/strings/stringprintf.h" |
| 27 #include "base/strings/sys_string_conversions.h" | 27 #include "base/strings/sys_string_conversions.h" |
| 28 #include "base/strings/utf_string_conversions.h" | 28 #include "base/strings/utf_string_conversions.h" |
| 29 #include "base/threading/thread_task_runner_handle.h" | 29 #include "base/threading/thread_task_runner_handle.h" |
| 30 #include "base/time/time.h" | 30 #include "base/time/time.h" |
| 31 #include "base/values.h" | 31 #include "base/values.h" |
| 32 #include "build/build_config.h" | 32 #include "build/build_config.h" |
| 33 #include "components/plugins/renderer/plugin_placeholder.h" | 33 #include "components/plugins/renderer/plugin_placeholder.h" |
| 34 #include "content/common/content_switches_internal.h" | 34 #include "content/common/content_switches_internal.h" |
| 35 #include "content/public/common/content_switches.h" | 35 #include "content/public/common/content_switches.h" |
| 36 #include "content/public/common/service_names.mojom.h" |
| 36 #include "content/public/common/url_constants.h" | 37 #include "content/public/common/url_constants.h" |
| 37 #include "content/public/common/web_preferences.h" | 38 #include "content/public/common/web_preferences.h" |
| 38 #include "content/public/renderer/media_stream_utils.h" | 39 #include "content/public/renderer/media_stream_utils.h" |
| 39 #include "content/public/renderer/render_frame.h" | 40 #include "content/public/renderer/render_frame.h" |
| 40 #include "content/public/renderer/render_view.h" | 41 #include "content/public/renderer/render_view.h" |
| 41 #include "content/public/renderer/render_view_visitor.h" | 42 #include "content/public/renderer/render_view_visitor.h" |
| 42 #include "content/public/renderer/renderer_gamepad_provider.h" | 43 #include "content/public/renderer/renderer_gamepad_provider.h" |
| 43 #include "content/public/test/layouttest_support.h" | 44 #include "content/public/test/layouttest_support.h" |
| 44 #include "content/shell/common/layout_test/layout_test_messages.h" | 45 #include "content/shell/common/layout_test/layout_test_messages.h" |
| 45 #include "content/shell/common/shell_messages.h" | 46 #include "content/shell/common/shell_messages.h" |
| 46 #include "content/shell/common/shell_switches.h" | 47 #include "content/shell/common/shell_switches.h" |
| 47 #include "content/shell/renderer/layout_test/blink_test_helpers.h" | 48 #include "content/shell/renderer/layout_test/blink_test_helpers.h" |
| 48 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer.
h" | 49 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer.
h" |
| 49 #include "content/shell/renderer/layout_test/leak_detector.h" | 50 #include "content/shell/renderer/layout_test/leak_detector.h" |
| 50 #include "content/shell/test_runner/app_banner_service.h" | 51 #include "content/shell/test_runner/app_banner_service.h" |
| 51 #include "content/shell/test_runner/gamepad_controller.h" | 52 #include "content/shell/test_runner/gamepad_controller.h" |
| 52 #include "content/shell/test_runner/layout_and_paint_async_then.h" | 53 #include "content/shell/test_runner/layout_and_paint_async_then.h" |
| 53 #include "content/shell/test_runner/pixel_dump.h" | 54 #include "content/shell/test_runner/pixel_dump.h" |
| 54 #include "content/shell/test_runner/web_test_interfaces.h" | 55 #include "content/shell/test_runner/web_test_interfaces.h" |
| 55 #include "content/shell/test_runner/web_test_runner.h" | 56 #include "content/shell/test_runner/web_test_runner.h" |
| 56 #include "content/shell/test_runner/web_view_test_proxy.h" | 57 #include "content/shell/test_runner/web_view_test_proxy.h" |
| 57 #include "media/base/audio_capturer_source.h" | 58 #include "media/base/audio_capturer_source.h" |
| 58 #include "media/base/audio_parameters.h" | 59 #include "media/base/audio_parameters.h" |
| 59 #include "media/capture/video_capturer_source.h" | 60 #include "media/capture/video_capturer_source.h" |
| 60 #include "media/media_features.h" | 61 #include "media/media_features.h" |
| 61 #include "net/base/filename_util.h" | 62 #include "net/base/filename_util.h" |
| 62 #include "net/base/net_errors.h" | 63 #include "net/base/net_errors.h" |
| 63 #include "services/service_manager/public/cpp/interface_provider.h" | 64 #include "services/service_manager/public/cpp/connector.h" |
| 64 #include "services/service_manager/public/cpp/interface_registry.h" | 65 #include "services/service_manager/public/cpp/interface_registry.h" |
| 65 #include "skia/ext/platform_canvas.h" | 66 #include "skia/ext/platform_canvas.h" |
| 66 #include "third_party/WebKit/public/platform/FilePathConversion.h" | 67 #include "third_party/WebKit/public/platform/FilePathConversion.h" |
| 67 #include "third_party/WebKit/public/platform/Platform.h" | 68 #include "third_party/WebKit/public/platform/Platform.h" |
| 68 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 69 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 69 #include "third_party/WebKit/public/platform/WebPoint.h" | 70 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 70 #include "third_party/WebKit/public/platform/WebRect.h" | 71 #include "third_party/WebKit/public/platform/WebRect.h" |
| 71 #include "third_party/WebKit/public/platform/WebSize.h" | 72 #include "third_party/WebKit/public/platform/WebSize.h" |
| 72 #include "third_party/WebKit/public/platform/WebString.h" | 73 #include "third_party/WebKit/public/platform/WebString.h" |
| 73 #include "third_party/WebKit/public/platform/WebThread.h" | 74 #include "third_party/WebKit/public/platform/WebThread.h" |
| (...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 | 938 |
| 938 void BlinkTestRunner::CaptureDumpComplete() { | 939 void BlinkTestRunner::CaptureDumpComplete() { |
| 939 render_view()->GetWebView()->mainFrame()->stopLoading(); | 940 render_view()->GetWebView()->mainFrame()->stopLoading(); |
| 940 | 941 |
| 941 Send(new ShellViewHostMsg_TestFinished(routing_id())); | 942 Send(new ShellViewHostMsg_TestFinished(routing_id())); |
| 942 } | 943 } |
| 943 | 944 |
| 944 mojom::LayoutTestBluetoothFakeAdapterSetter& | 945 mojom::LayoutTestBluetoothFakeAdapterSetter& |
| 945 BlinkTestRunner::GetBluetoothFakeAdapterSetter() { | 946 BlinkTestRunner::GetBluetoothFakeAdapterSetter() { |
| 946 if (!bluetooth_fake_adapter_setter_) { | 947 if (!bluetooth_fake_adapter_setter_) { |
| 947 RenderThread::Get()->GetRemoteInterfaces()->GetInterface( | 948 RenderThread::Get()->GetConnector()->BindInterface( |
| 949 mojom::kBrowserServiceName, |
| 948 mojo::MakeRequest(&bluetooth_fake_adapter_setter_)); | 950 mojo::MakeRequest(&bluetooth_fake_adapter_setter_)); |
| 949 } | 951 } |
| 950 return *bluetooth_fake_adapter_setter_; | 952 return *bluetooth_fake_adapter_setter_; |
| 951 } | 953 } |
| 952 | 954 |
| 953 void BlinkTestRunner::OnSetupSecondaryRenderer() { | 955 void BlinkTestRunner::OnSetupSecondaryRenderer() { |
| 954 DCHECK(!is_main_window_); | 956 DCHECK(!is_main_window_); |
| 955 | 957 |
| 956 test_runner::WebTestInterfaces* interfaces = | 958 test_runner::WebTestInterfaces* interfaces = |
| 957 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); | 959 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 void BlinkTestRunner::ReportLeakDetectionResult( | 1037 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1036 const LeakDetectionResult& report) { | 1038 const LeakDetectionResult& report) { |
| 1037 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1039 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1038 } | 1040 } |
| 1039 | 1041 |
| 1040 void BlinkTestRunner::OnDestruct() { | 1042 void BlinkTestRunner::OnDestruct() { |
| 1041 delete this; | 1043 delete this; |
| 1042 } | 1044 } |
| 1043 | 1045 |
| 1044 } // namespace content | 1046 } // namespace content |
| OLD | NEW |