Chromium Code Reviews| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <clocale> | 8 #include <clocale> |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 #include "content/shell/common/shell_switches.h" | 46 #include "content/shell/common/shell_switches.h" |
| 47 #include "content/shell/renderer/layout_test/blink_test_helpers.h" | 47 #include "content/shell/renderer/layout_test/blink_test_helpers.h" |
| 48 #include "content/shell/renderer/layout_test/layout_test_render_process_observer .h" | 48 #include "content/shell/renderer/layout_test/layout_test_render_process_observer .h" |
| 49 #include "content/shell/renderer/layout_test/leak_detector.h" | 49 #include "content/shell/renderer/layout_test/leak_detector.h" |
| 50 #include "media/audio/audio_parameters.h" | 50 #include "media/audio/audio_parameters.h" |
| 51 #include "net/base/filename_util.h" | 51 #include "net/base/filename_util.h" |
| 52 #include "net/base/net_errors.h" | 52 #include "net/base/net_errors.h" |
| 53 #include "skia/ext/platform_canvas.h" | 53 #include "skia/ext/platform_canvas.h" |
| 54 #include "third_party/WebKit/public/platform/Platform.h" | 54 #include "third_party/WebKit/public/platform/Platform.h" |
| 55 #include "third_party/WebKit/public/platform/WebCString.h" | 55 #include "third_party/WebKit/public/platform/WebCString.h" |
| 56 #include "third_party/WebKit/public/platform/WebMediaStream.h" | |
| 56 #include "third_party/WebKit/public/platform/WebPoint.h" | 57 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 57 #include "third_party/WebKit/public/platform/WebRect.h" | 58 #include "third_party/WebKit/public/platform/WebRect.h" |
| 58 #include "third_party/WebKit/public/platform/WebSize.h" | 59 #include "third_party/WebKit/public/platform/WebSize.h" |
| 59 #include "third_party/WebKit/public/platform/WebString.h" | 60 #include "third_party/WebKit/public/platform/WebString.h" |
| 60 #include "third_party/WebKit/public/platform/WebTaskRunner.h" | 61 #include "third_party/WebKit/public/platform/WebTaskRunner.h" |
| 61 #include "third_party/WebKit/public/platform/WebThread.h" | 62 #include "third_party/WebKit/public/platform/WebThread.h" |
| 62 #include "third_party/WebKit/public/platform/WebTraceLocation.h" | 63 #include "third_party/WebKit/public/platform/WebTraceLocation.h" |
| 63 #include "third_party/WebKit/public/platform/WebURL.h" | 64 #include "third_party/WebKit/public/platform/WebURL.h" |
| 64 #include "third_party/WebKit/public/platform/WebURLError.h" | 65 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 65 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 66 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 782 DCHECK(stream); | 783 DCHECK(stream); |
| 783 #if defined(ENABLE_WEBRTC) | 784 #if defined(ENABLE_WEBRTC) |
| 784 return AddAudioTrackToMediaStream( | 785 return AddAudioTrackToMediaStream( |
| 785 make_scoped_refptr(new MockAudioCapturerSource()), | 786 make_scoped_refptr(new MockAudioCapturerSource()), |
| 786 false /* is_remote */, false /* is_readonly */, stream); | 787 false /* is_remote */, false /* is_readonly */, stream); |
| 787 #else | 788 #else |
| 788 return false; | 789 return false; |
| 789 #endif | 790 #endif |
| 790 } | 791 } |
| 791 | 792 |
| 793 void BlinkTestRunner::AddMediaStream(blink::WebMediaStream* stream) { | |
| 794 DCHECK(stream); | |
| 795 #if defined(ENABLE_WEBRTC) | |
| 796 AddMediaStreamTowebMediaStream(stream); | |
|
mcasas
2016/01/08 00:14:12
So just to confirm, at this point I cannot just do
| |
| 797 #endif | |
| 798 } | |
| 799 | |
| 792 // RenderViewObserver -------------------------------------------------------- | 800 // RenderViewObserver -------------------------------------------------------- |
| 793 | 801 |
| 794 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) { | 802 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) { |
| 795 WebTestingSupport::injectInternalsObject(frame); | 803 WebTestingSupport::injectInternalsObject(frame); |
| 796 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()->BindTo( | 804 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()->BindTo( |
| 797 frame); | 805 frame); |
| 798 } | 806 } |
| 799 | 807 |
| 800 bool BlinkTestRunner::OnMessageReceived(const IPC::Message& message) { | 808 bool BlinkTestRunner::OnMessageReceived(const IPC::Message& message) { |
| 801 bool handled = true; | 809 bool handled = true; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 995 get_bluetooth_events_callbacks_.pop_front(); | 1003 get_bluetooth_events_callbacks_.pop_front(); |
| 996 callback.Run(events); | 1004 callback.Run(events); |
| 997 } | 1005 } |
| 998 | 1006 |
| 999 void BlinkTestRunner::ReportLeakDetectionResult( | 1007 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1000 const LeakDetectionResult& report) { | 1008 const LeakDetectionResult& report) { |
| 1001 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1009 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1002 } | 1010 } |
| 1003 | 1011 |
| 1004 } // namespace content | 1012 } // namespace content |
| OLD | NEW |