| 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 19 matching lines...) Expand all Loading... |
| 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 "components/test_runner/gamepad_controller.h" | 34 #include "components/test_runner/gamepad_controller.h" |
| 35 #include "components/test_runner/layout_and_paint_async_then.h" | 35 #include "components/test_runner/layout_and_paint_async_then.h" |
| 36 #include "components/test_runner/pixel_dump.h" | 36 #include "components/test_runner/pixel_dump.h" |
| 37 #include "components/test_runner/web_test_interfaces.h" | 37 #include "components/test_runner/web_test_interfaces.h" |
| 38 #include "components/test_runner/web_test_proxy.h" | 38 #include "components/test_runner/web_test_proxy.h" |
| 39 #include "components/test_runner/web_test_runner.h" | 39 #include "components/test_runner/web_test_runner.h" |
| 40 #include "content/common/content_switches_internal.h" |
| 40 #include "content/public/common/content_switches.h" | 41 #include "content/public/common/content_switches.h" |
| 41 #include "content/public/common/service_registry.h" | 42 #include "content/public/common/service_registry.h" |
| 42 #include "content/public/common/url_constants.h" | 43 #include "content/public/common/url_constants.h" |
| 43 #include "content/public/common/web_preferences.h" | 44 #include "content/public/common/web_preferences.h" |
| 44 #include "content/public/renderer/media_stream_utils.h" | 45 #include "content/public/renderer/media_stream_utils.h" |
| 45 #include "content/public/renderer/render_frame.h" | 46 #include "content/public/renderer/render_frame.h" |
| 46 #include "content/public/renderer/render_view.h" | 47 #include "content/public/renderer/render_view.h" |
| 47 #include "content/public/renderer/render_view_visitor.h" | 48 #include "content/public/renderer/render_view_visitor.h" |
| 48 #include "content/public/renderer/renderer_gamepad_provider.h" | 49 #include "content/public/renderer/renderer_gamepad_provider.h" |
| 49 #include "content/public/test/layouttest_support.h" | 50 #include "content/public/test/layouttest_support.h" |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 | 504 |
| 504 void BlinkTestRunner::SetDeviceScaleFactor(float factor) { | 505 void BlinkTestRunner::SetDeviceScaleFactor(float factor) { |
| 505 content::SetDeviceScaleFactor(render_view(), factor); | 506 content::SetDeviceScaleFactor(render_view(), factor); |
| 506 } | 507 } |
| 507 | 508 |
| 508 void BlinkTestRunner::EnableUseZoomForDSF() { | 509 void BlinkTestRunner::EnableUseZoomForDSF() { |
| 509 base::CommandLine::ForCurrentProcess()-> | 510 base::CommandLine::ForCurrentProcess()-> |
| 510 AppendSwitch(switches::kEnableUseZoomForDSF); | 511 AppendSwitch(switches::kEnableUseZoomForDSF); |
| 511 } | 512 } |
| 512 | 513 |
| 514 bool BlinkTestRunner::IsUseZoomForDSFEnabled() { |
| 515 return content::IsUseZoomForDSFEnabled(); |
| 516 } |
| 517 |
| 513 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) { | 518 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) { |
| 514 content::SetDeviceColorProfile(render_view(), name); | 519 content::SetDeviceColorProfile(render_view(), name); |
| 515 } | 520 } |
| 516 | 521 |
| 517 void BlinkTestRunner::SetBluetoothFakeAdapter(const std::string& adapter_name, | 522 void BlinkTestRunner::SetBluetoothFakeAdapter(const std::string& adapter_name, |
| 518 const base::Closure& callback) { | 523 const base::Closure& callback) { |
| 519 GetBluetoothFakeAdapterSetter().Set(adapter_name, callback); | 524 GetBluetoothFakeAdapterSetter().Set(adapter_name, callback); |
| 520 } | 525 } |
| 521 | 526 |
| 522 void BlinkTestRunner::SetBluetoothManualChooser(bool enable) { | 527 void BlinkTestRunner::SetBluetoothManualChooser(bool enable) { |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 void BlinkTestRunner::ReportLeakDetectionResult( | 1023 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1019 const LeakDetectionResult& report) { | 1024 const LeakDetectionResult& report) { |
| 1020 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1025 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1021 } | 1026 } |
| 1022 | 1027 |
| 1023 void BlinkTestRunner::OnDestruct() { | 1028 void BlinkTestRunner::OnDestruct() { |
| 1024 delete this; | 1029 delete this; |
| 1025 } | 1030 } |
| 1026 | 1031 |
| 1027 } // namespace content | 1032 } // namespace content |
| OLD | NEW |