| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "content/shell/common/shell_switches.h" | 50 #include "content/shell/common/shell_switches.h" |
| 51 #include "content/shell/renderer/layout_test/blink_test_helpers.h" | 51 #include "content/shell/renderer/layout_test/blink_test_helpers.h" |
| 52 #include "content/shell/renderer/layout_test/layout_test_render_process_observer
.h" | 52 #include "content/shell/renderer/layout_test/layout_test_render_process_observer
.h" |
| 53 #include "content/shell/renderer/layout_test/leak_detector.h" | 53 #include "content/shell/renderer/layout_test/leak_detector.h" |
| 54 #include "media/audio/audio_parameters.h" | 54 #include "media/audio/audio_parameters.h" |
| 55 #include "net/base/filename_util.h" | 55 #include "net/base/filename_util.h" |
| 56 #include "net/base/net_errors.h" | 56 #include "net/base/net_errors.h" |
| 57 #include "skia/ext/platform_canvas.h" | 57 #include "skia/ext/platform_canvas.h" |
| 58 #include "third_party/WebKit/public/platform/Platform.h" | 58 #include "third_party/WebKit/public/platform/Platform.h" |
| 59 #include "third_party/WebKit/public/platform/WebCString.h" | 59 #include "third_party/WebKit/public/platform/WebCString.h" |
| 60 #include "third_party/WebKit/public/platform/WebMediaStream.h" |
| 60 #include "third_party/WebKit/public/platform/WebPoint.h" | 61 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 61 #include "third_party/WebKit/public/platform/WebRect.h" | 62 #include "third_party/WebKit/public/platform/WebRect.h" |
| 62 #include "third_party/WebKit/public/platform/WebSize.h" | 63 #include "third_party/WebKit/public/platform/WebSize.h" |
| 63 #include "third_party/WebKit/public/platform/WebString.h" | 64 #include "third_party/WebKit/public/platform/WebString.h" |
| 64 #include "third_party/WebKit/public/platform/WebTaskRunner.h" | 65 #include "third_party/WebKit/public/platform/WebTaskRunner.h" |
| 65 #include "third_party/WebKit/public/platform/WebThread.h" | 66 #include "third_party/WebKit/public/platform/WebThread.h" |
| 66 #include "third_party/WebKit/public/platform/WebTraceLocation.h" | 67 #include "third_party/WebKit/public/platform/WebTraceLocation.h" |
| 67 #include "third_party/WebKit/public/platform/WebURL.h" | 68 #include "third_party/WebKit/public/platform/WebURL.h" |
| 68 #include "third_party/WebKit/public/platform/WebURLError.h" | 69 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 69 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 70 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 DCHECK(stream); | 787 DCHECK(stream); |
| 787 #if defined(ENABLE_WEBRTC) | 788 #if defined(ENABLE_WEBRTC) |
| 788 return AddAudioTrackToMediaStream( | 789 return AddAudioTrackToMediaStream( |
| 789 make_scoped_refptr(new MockAudioCapturerSource()), | 790 make_scoped_refptr(new MockAudioCapturerSource()), |
| 790 false /* is_remote */, false /* is_readonly */, stream); | 791 false /* is_remote */, false /* is_readonly */, stream); |
| 791 #else | 792 #else |
| 792 return false; | 793 return false; |
| 793 #endif | 794 #endif |
| 794 } | 795 } |
| 795 | 796 |
| 797 void BlinkTestRunner::AddMediaStream(blink::WebMediaStream* stream) { |
| 798 DCHECK(stream); |
| 799 #if defined(ENABLE_WEBRTC) |
| 800 AddMediaStreamTowebMediaStream(stream); |
| 801 #endif |
| 802 } |
| 803 |
| 796 // RenderViewObserver -------------------------------------------------------- | 804 // RenderViewObserver -------------------------------------------------------- |
| 797 | 805 |
| 798 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) { | 806 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) { |
| 799 WebTestingSupport::injectInternalsObject(frame); | 807 WebTestingSupport::injectInternalsObject(frame); |
| 800 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()->BindTo( | 808 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()->BindTo( |
| 801 frame); | 809 frame); |
| 802 } | 810 } |
| 803 | 811 |
| 804 bool BlinkTestRunner::OnMessageReceived(const IPC::Message& message) { | 812 bool BlinkTestRunner::OnMessageReceived(const IPC::Message& message) { |
| 805 bool handled = true; | 813 bool handled = true; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 get_bluetooth_events_callbacks_.pop_front(); | 1007 get_bluetooth_events_callbacks_.pop_front(); |
| 1000 callback.Run(events); | 1008 callback.Run(events); |
| 1001 } | 1009 } |
| 1002 | 1010 |
| 1003 void BlinkTestRunner::ReportLeakDetectionResult( | 1011 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1004 const LeakDetectionResult& report) { | 1012 const LeakDetectionResult& report) { |
| 1005 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1013 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1006 } | 1014 } |
| 1007 | 1015 |
| 1008 } // namespace content | 1016 } // namespace content |
| OLD | NEW |