| 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 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <clocale> | 9 #include <clocale> |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 return blink::WebPoint(point_in_dip.x * scale, | 763 return blink::WebPoint(point_in_dip.x * scale, |
| 764 point_in_dip.y * scale); | 764 point_in_dip.y * scale); |
| 765 } | 765 } |
| 766 | 766 |
| 767 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( | 767 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( |
| 768 blink::WebMediaStream* stream) { | 768 blink::WebMediaStream* stream) { |
| 769 DCHECK(stream); | 769 DCHECK(stream); |
| 770 #if defined(ENABLE_WEBRTC) | 770 #if defined(ENABLE_WEBRTC) |
| 771 return AddVideoTrackToMediaStream( | 771 return AddVideoTrackToMediaStream( |
| 772 make_scoped_ptr(new MockVideoCapturerSource()), | 772 make_scoped_ptr(new MockVideoCapturerSource()), |
| 773 false, // is_remote | 773 false /* is_remote */, false /* is_readonly */, stream); |
| 774 false, // is_readonly | |
| 775 stream); | |
| 776 #else | 774 #else |
| 777 return false; | 775 return false; |
| 778 #endif | 776 #endif |
| 779 } | 777 } |
| 780 | 778 |
| 781 bool BlinkTestRunner::AddMediaStreamAudioSourceAndTrack( | 779 bool BlinkTestRunner::AddMediaStreamAudioSourceAndTrack( |
| 782 blink::WebMediaStream* stream) { | 780 blink::WebMediaStream* stream) { |
| 783 DCHECK(stream); | 781 DCHECK(stream); |
| 784 #if defined(ENABLE_WEBRTC) | 782 #if defined(ENABLE_WEBRTC) |
| 785 return AddAudioTrackToMediaStream( | 783 return AddAudioTrackToMediaStream( |
| 786 make_scoped_refptr(new MockAudioCapturerSource()), | 784 make_scoped_refptr(new MockAudioCapturerSource()), |
| 787 48000, // sample rate | 785 false /* is_remote */, false /* is_readonly */, stream); |
| 788 media::CHANNEL_LAYOUT_STEREO, | |
| 789 480, // sample frames per buffer | |
| 790 false, // is_remote | |
| 791 false, // is_readonly | |
| 792 stream); | |
| 793 #else | 786 #else |
| 794 return false; | 787 return false; |
| 795 #endif | 788 #endif |
| 796 } | 789 } |
| 797 | 790 |
| 798 // RenderViewObserver -------------------------------------------------------- | 791 // RenderViewObserver -------------------------------------------------------- |
| 799 | 792 |
| 800 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) { | 793 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) { |
| 801 WebTestingSupport::injectInternalsObject(frame); | 794 WebTestingSupport::injectInternalsObject(frame); |
| 802 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()->BindTo( | 795 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()->BindTo( |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 get_bluetooth_events_callbacks_.pop_front(); | 1033 get_bluetooth_events_callbacks_.pop_front(); |
| 1041 callback.Run(events); | 1034 callback.Run(events); |
| 1042 } | 1035 } |
| 1043 | 1036 |
| 1044 void BlinkTestRunner::ReportLeakDetectionResult( | 1037 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1045 const LeakDetectionResult& report) { | 1038 const LeakDetectionResult& report) { |
| 1046 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1039 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1047 } | 1040 } |
| 1048 | 1041 |
| 1049 } // namespace content | 1042 } // namespace content |
| OLD | NEW |