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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 const WebURLRequest& request) { | 768 const WebURLRequest& request) { |
769 return content::IsNavigationInitiatedByRenderer(request); | 769 return content::IsNavigationInitiatedByRenderer(request); |
770 } | 770 } |
771 | 771 |
772 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( | 772 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( |
773 blink::WebMediaStream* stream) { | 773 blink::WebMediaStream* stream) { |
774 DCHECK(stream); | 774 DCHECK(stream); |
775 #if BUILDFLAG(ENABLE_WEBRTC) | 775 #if BUILDFLAG(ENABLE_WEBRTC) |
776 return AddVideoTrackToMediaStream(base::MakeUnique<MockVideoCapturerSource>(), | 776 return AddVideoTrackToMediaStream(base::MakeUnique<MockVideoCapturerSource>(), |
777 false, // is_remote | 777 false, // is_remote |
778 false, // is_readonly | |
779 stream); | 778 stream); |
780 #else | 779 #else |
781 return false; | 780 return false; |
782 #endif | 781 #endif |
783 } | 782 } |
784 | 783 |
785 bool BlinkTestRunner::AddMediaStreamAudioSourceAndTrack( | 784 bool BlinkTestRunner::AddMediaStreamAudioSourceAndTrack( |
786 blink::WebMediaStream* stream) { | 785 blink::WebMediaStream* stream) { |
787 DCHECK(stream); | 786 DCHECK(stream); |
788 #if BUILDFLAG(ENABLE_WEBRTC) | 787 #if BUILDFLAG(ENABLE_WEBRTC) |
789 return AddAudioTrackToMediaStream( | 788 return AddAudioTrackToMediaStream( |
790 make_scoped_refptr(new MockAudioCapturerSource()), | 789 make_scoped_refptr(new MockAudioCapturerSource()), |
791 48000, // sample rate | 790 48000, // sample rate |
792 media::CHANNEL_LAYOUT_STEREO, | 791 media::CHANNEL_LAYOUT_STEREO, |
793 480, // sample frames per buffer | 792 480, // sample frames per buffer |
794 false, // is_remote | 793 false, // is_remote |
795 false, // is_readonly | |
796 stream); | 794 stream); |
797 #else | 795 #else |
798 return false; | 796 return false; |
799 #endif | 797 #endif |
800 } | 798 } |
801 | 799 |
802 // RenderViewObserver -------------------------------------------------------- | 800 // RenderViewObserver -------------------------------------------------------- |
803 | 801 |
804 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) { | 802 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) { |
805 WebTestingSupport::injectInternalsObject(frame); | 803 WebTestingSupport::injectInternalsObject(frame); |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 void BlinkTestRunner::ReportLeakDetectionResult( | 1051 void BlinkTestRunner::ReportLeakDetectionResult( |
1054 const LeakDetectionResult& report) { | 1052 const LeakDetectionResult& report) { |
1055 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1053 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
1056 } | 1054 } |
1057 | 1055 |
1058 void BlinkTestRunner::OnDestruct() { | 1056 void BlinkTestRunner::OnDestruct() { |
1059 delete this; | 1057 delete this; |
1060 } | 1058 } |
1061 | 1059 |
1062 } // namespace content | 1060 } // namespace content |
OLD | NEW |