| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "content/public/test/layouttest_support.h" | 50 #include "content/public/test/layouttest_support.h" |
| 51 #include "content/shell/common/layout_test/layout_test_messages.h" | 51 #include "content/shell/common/layout_test/layout_test_messages.h" |
| 52 #include "content/shell/common/shell_messages.h" | 52 #include "content/shell/common/shell_messages.h" |
| 53 #include "content/shell/common/shell_switches.h" | 53 #include "content/shell/common/shell_switches.h" |
| 54 #include "content/shell/renderer/layout_test/blink_test_helpers.h" | 54 #include "content/shell/renderer/layout_test/blink_test_helpers.h" |
| 55 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer.
h" | 55 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer.
h" |
| 56 #include "content/shell/renderer/layout_test/leak_detector.h" | 56 #include "content/shell/renderer/layout_test/leak_detector.h" |
| 57 #include "media/base/audio_capturer_source.h" | 57 #include "media/base/audio_capturer_source.h" |
| 58 #include "media/base/audio_parameters.h" | 58 #include "media/base/audio_parameters.h" |
| 59 #include "media/capture/video_capturer_source.h" | 59 #include "media/capture/video_capturer_source.h" |
| 60 #include "media/media_features.h" |
| 60 #include "net/base/filename_util.h" | 61 #include "net/base/filename_util.h" |
| 61 #include "net/base/net_errors.h" | 62 #include "net/base/net_errors.h" |
| 62 #include "services/service_manager/public/cpp/interface_provider.h" | 63 #include "services/service_manager/public/cpp/interface_provider.h" |
| 63 #include "services/service_manager/public/cpp/interface_registry.h" | 64 #include "services/service_manager/public/cpp/interface_registry.h" |
| 64 #include "skia/ext/platform_canvas.h" | 65 #include "skia/ext/platform_canvas.h" |
| 65 #include "third_party/WebKit/public/platform/FilePathConversion.h" | 66 #include "third_party/WebKit/public/platform/FilePathConversion.h" |
| 66 #include "third_party/WebKit/public/platform/Platform.h" | 67 #include "third_party/WebKit/public/platform/Platform.h" |
| 67 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 68 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 68 #include "third_party/WebKit/public/platform/WebPoint.h" | 69 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 69 #include "third_party/WebKit/public/platform/WebRect.h" | 70 #include "third_party/WebKit/public/platform/WebRect.h" |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 SchedulerRunIdleTasks(callback); | 745 SchedulerRunIdleTasks(callback); |
| 745 } | 746 } |
| 746 | 747 |
| 747 void BlinkTestRunner::ForceTextInputStateUpdate(WebFrame* frame) { | 748 void BlinkTestRunner::ForceTextInputStateUpdate(WebFrame* frame) { |
| 748 ForceTextInputStateUpdateForRenderFrame(RenderFrame::FromWebFrame(frame)); | 749 ForceTextInputStateUpdateForRenderFrame(RenderFrame::FromWebFrame(frame)); |
| 749 } | 750 } |
| 750 | 751 |
| 751 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( | 752 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( |
| 752 blink::WebMediaStream* stream) { | 753 blink::WebMediaStream* stream) { |
| 753 DCHECK(stream); | 754 DCHECK(stream); |
| 754 #if defined(ENABLE_WEBRTC) | 755 #if BUILDFLAG(ENABLE_WEBRTC) |
| 755 return AddVideoTrackToMediaStream(base::MakeUnique<MockVideoCapturerSource>(), | 756 return AddVideoTrackToMediaStream(base::MakeUnique<MockVideoCapturerSource>(), |
| 756 false, // is_remote | 757 false, // is_remote |
| 757 false, // is_readonly | 758 false, // is_readonly |
| 758 stream); | 759 stream); |
| 759 #else | 760 #else |
| 760 return false; | 761 return false; |
| 761 #endif | 762 #endif |
| 762 } | 763 } |
| 763 | 764 |
| 764 bool BlinkTestRunner::AddMediaStreamAudioSourceAndTrack( | 765 bool BlinkTestRunner::AddMediaStreamAudioSourceAndTrack( |
| 765 blink::WebMediaStream* stream) { | 766 blink::WebMediaStream* stream) { |
| 766 DCHECK(stream); | 767 DCHECK(stream); |
| 767 #if defined(ENABLE_WEBRTC) | 768 #if BUILDFLAG(ENABLE_WEBRTC) |
| 768 return AddAudioTrackToMediaStream( | 769 return AddAudioTrackToMediaStream( |
| 769 make_scoped_refptr(new MockAudioCapturerSource()), | 770 make_scoped_refptr(new MockAudioCapturerSource()), |
| 770 48000, // sample rate | 771 48000, // sample rate |
| 771 media::CHANNEL_LAYOUT_STEREO, | 772 media::CHANNEL_LAYOUT_STEREO, |
| 772 480, // sample frames per buffer | 773 480, // sample frames per buffer |
| 773 false, // is_remote | 774 false, // is_remote |
| 774 false, // is_readonly | 775 false, // is_readonly |
| 775 stream); | 776 stream); |
| 776 #else | 777 #else |
| 777 return false; | 778 return false; |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 void BlinkTestRunner::ReportLeakDetectionResult( | 1031 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1031 const LeakDetectionResult& report) { | 1032 const LeakDetectionResult& report) { |
| 1032 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1033 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1033 } | 1034 } |
| 1034 | 1035 |
| 1035 void BlinkTestRunner::OnDestruct() { | 1036 void BlinkTestRunner::OnDestruct() { |
| 1036 delete this; | 1037 delete this; |
| 1037 } | 1038 } |
| 1038 | 1039 |
| 1039 } // namespace content | 1040 } // namespace content |
| OLD | NEW |