| 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 <components/test_runner/composite_async_then.h> |
| 5 #include "content/shell/renderer/layout_test/blink_test_runner.h" | 6 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
| 6 | 7 |
| 7 #include <stddef.h> | 8 #include <stddef.h> |
| 8 | 9 |
| 9 #include <algorithm> | 10 #include <algorithm> |
| 10 #include <clocale> | 11 #include <clocale> |
| 11 #include <cmath> | 12 #include <cmath> |
| 12 #include <memory> | 13 #include <memory> |
| 13 #include <utility> | 14 #include <utility> |
| 14 | 15 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 25 #include "base/strings/string_util.h" | 26 #include "base/strings/string_util.h" |
| 26 #include "base/strings/stringprintf.h" | 27 #include "base/strings/stringprintf.h" |
| 27 #include "base/strings/sys_string_conversions.h" | 28 #include "base/strings/sys_string_conversions.h" |
| 28 #include "base/strings/utf_string_conversions.h" | 29 #include "base/strings/utf_string_conversions.h" |
| 29 #include "base/threading/thread_task_runner_handle.h" | 30 #include "base/threading/thread_task_runner_handle.h" |
| 30 #include "base/time/time.h" | 31 #include "base/time/time.h" |
| 31 #include "base/values.h" | 32 #include "base/values.h" |
| 32 #include "build/build_config.h" | 33 #include "build/build_config.h" |
| 33 #include "components/plugins/renderer/plugin_placeholder.h" | 34 #include "components/plugins/renderer/plugin_placeholder.h" |
| 34 #include "components/test_runner/gamepad_controller.h" | 35 #include "components/test_runner/gamepad_controller.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/public/common/content_switches.h" | 40 #include "content/public/common/content_switches.h" |
| 41 #include "content/public/common/service_registry.h" | 41 #include "content/public/common/service_registry.h" |
| 42 #include "content/public/common/url_constants.h" | 42 #include "content/public/common/url_constants.h" |
| 43 #include "content/public/common/web_preferences.h" | 43 #include "content/public/common/web_preferences.h" |
| 44 #include "content/public/renderer/media_stream_utils.h" | 44 #include "content/public/renderer/media_stream_utils.h" |
| 45 #include "content/public/renderer/render_frame.h" | 45 #include "content/public/renderer/render_frame.h" |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 interfaces->TestRunner()->DumpPixelsAsync( | 874 interfaces->TestRunner()->DumpPixelsAsync( |
| 875 render_view()->GetWebView(), | 875 render_view()->GetWebView(), |
| 876 base::Bind(&BlinkTestRunner::OnPixelsDumpCompleted, | 876 base::Bind(&BlinkTestRunner::OnPixelsDumpCompleted, |
| 877 base::Unretained(this))); | 877 base::Unretained(this))); |
| 878 return; | 878 return; |
| 879 } | 879 } |
| 880 | 880 |
| 881 #ifndef NDEBUG | 881 #ifndef NDEBUG |
| 882 // Force a layout/paint by the end of the test to ensure test coverage of | 882 // Force a layout/paint by the end of the test to ensure test coverage of |
| 883 // incremental painting. | 883 // incremental painting. |
| 884 test_runner::LayoutAndPaintAsyncThen( | 884 test_runner::CompositeAsyncThen( |
| 885 render_view() | 885 render_view() |
| 886 ->GetWebView() | 886 ->GetWebView() |
| 887 ->mainFrame() | 887 ->mainFrame() |
| 888 ->toWebLocalFrame() | 888 ->toWebLocalFrame() |
| 889 ->frameWidget(), | 889 ->frameWidget(), |
| 890 base::Bind(&BlinkTestRunner::CaptureDumpComplete, | 890 base::Bind(&BlinkTestRunner::CaptureDumpComplete, |
| 891 base::Unretained(this))); | 891 base::Unretained(this))); |
| 892 #else | 892 #else |
| 893 CaptureDumpComplete(); | 893 CaptureDumpComplete(); |
| 894 #endif | 894 #endif |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 get_bluetooth_events_callbacks_.pop_front(); | 1014 get_bluetooth_events_callbacks_.pop_front(); |
| 1015 callback.Run(events); | 1015 callback.Run(events); |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 void BlinkTestRunner::ReportLeakDetectionResult( | 1018 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1019 const LeakDetectionResult& report) { | 1019 const LeakDetectionResult& report) { |
| 1020 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1020 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 } // namespace content | 1023 } // namespace content |
| OLD | NEW |