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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 bool BlinkTestRunner::IsNavigationInitiatedByRenderer( | 754 bool BlinkTestRunner::IsNavigationInitiatedByRenderer( |
755 const WebURLRequest& request) { | 755 const WebURLRequest& request) { |
756 return content::IsNavigationInitiatedByRenderer(request); | 756 return content::IsNavigationInitiatedByRenderer(request); |
757 } | 757 } |
758 | 758 |
759 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( | 759 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( |
760 blink::WebMediaStream* stream) { | 760 blink::WebMediaStream* stream) { |
761 DCHECK(stream); | 761 DCHECK(stream); |
762 #if BUILDFLAG(ENABLE_WEBRTC) | 762 #if BUILDFLAG(ENABLE_WEBRTC) |
763 return AddVideoTrackToMediaStream(base::MakeUnique<MockVideoCapturerSource>(), | 763 return AddVideoTrackToMediaStream(base::MakeUnique<MockVideoCapturerSource>(), |
764 false, // is_remote | |
765 false, // is_readonly | |
766 stream); | 764 stream); |
767 #else | 765 #else |
768 return false; | 766 return false; |
769 #endif | 767 #endif |
770 } | 768 } |
771 | 769 |
772 bool BlinkTestRunner::AddMediaStreamAudioSourceAndTrack( | 770 bool BlinkTestRunner::AddMediaStreamAudioSourceAndTrack( |
773 blink::WebMediaStream* stream) { | 771 blink::WebMediaStream* stream) { |
774 DCHECK(stream); | 772 DCHECK(stream); |
775 #if BUILDFLAG(ENABLE_WEBRTC) | 773 #if BUILDFLAG(ENABLE_WEBRTC) |
776 return AddAudioTrackToMediaStream( | 774 return AddAudioTrackToMediaStream( |
777 make_scoped_refptr(new MockAudioCapturerSource()), | 775 make_scoped_refptr(new MockAudioCapturerSource()), |
778 48000, // sample rate | 776 48000, // sample rate |
779 media::CHANNEL_LAYOUT_STEREO, | 777 media::CHANNEL_LAYOUT_STEREO, |
780 480, // sample frames per buffer | 778 480, // sample frames per buffer |
781 false, // is_remote | |
782 false, // is_readonly | |
783 stream); | 779 stream); |
784 #else | 780 #else |
785 return false; | 781 return false; |
786 #endif | 782 #endif |
787 } | 783 } |
788 | 784 |
789 // RenderViewObserver -------------------------------------------------------- | 785 // RenderViewObserver -------------------------------------------------------- |
790 | 786 |
791 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) { | 787 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) { |
792 WebTestingSupport::injectInternalsObject(frame); | 788 WebTestingSupport::injectInternalsObject(frame); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 void BlinkTestRunner::ReportLeakDetectionResult( | 1035 void BlinkTestRunner::ReportLeakDetectionResult( |
1040 const LeakDetectionResult& report) { | 1036 const LeakDetectionResult& report) { |
1041 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1037 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
1042 } | 1038 } |
1043 | 1039 |
1044 void BlinkTestRunner::OnDestruct() { | 1040 void BlinkTestRunner::OnDestruct() { |
1045 delete this; | 1041 delete this; |
1046 } | 1042 } |
1047 | 1043 |
1048 } // namespace content | 1044 } // namespace content |
OLD | NEW |