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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 plugins::PluginPlaceholder* placeholder = | 762 plugins::PluginPlaceholder* placeholder = |
763 new plugins::PluginPlaceholder(render_view()->GetMainRenderFrame(), frame, | 763 new plugins::PluginPlaceholder(render_view()->GetMainRenderFrame(), frame, |
764 params, "<div>Test content</div>"); | 764 params, "<div>Test content</div>"); |
765 return placeholder->plugin(); | 765 return placeholder->plugin(); |
766 } | 766 } |
767 | 767 |
768 void BlinkTestRunner::OnWebTestProxyBaseDestroy( | 768 void BlinkTestRunner::OnWebTestProxyBaseDestroy( |
769 test_runner::WebTestProxyBase* proxy) { | 769 test_runner::WebTestProxyBase* proxy) { |
770 } | 770 } |
771 | 771 |
| 772 blink::WebPoint BlinkTestRunner::ConvertDIPToNative( |
| 773 const blink::WebPoint& point_in_dip) const { |
| 774 float scale = render_view()->GetDeviceScaleFactorForTest(); |
| 775 return blink::WebPoint(point_in_dip.x * scale, |
| 776 point_in_dip.y * scale); |
| 777 } |
| 778 |
772 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( | 779 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( |
773 blink::WebMediaStream* stream) { | 780 blink::WebMediaStream* stream) { |
774 DCHECK(stream); | 781 DCHECK(stream); |
775 #if defined(ENABLE_WEBRTC) | 782 #if defined(ENABLE_WEBRTC) |
776 return AddVideoTrackToMediaStream( | 783 return AddVideoTrackToMediaStream( |
777 make_scoped_ptr(new MockVideoCapturerSource()), | 784 make_scoped_ptr(new MockVideoCapturerSource()), |
778 false /* is_remote */, false /* is_readonly */, stream); | 785 false /* is_remote */, false /* is_readonly */, stream); |
779 #else | 786 #else |
780 return false; | 787 return false; |
781 #endif | 788 #endif |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 get_bluetooth_events_callbacks_.pop_front(); | 1006 get_bluetooth_events_callbacks_.pop_front(); |
1000 callback.Run(events); | 1007 callback.Run(events); |
1001 } | 1008 } |
1002 | 1009 |
1003 void BlinkTestRunner::ReportLeakDetectionResult( | 1010 void BlinkTestRunner::ReportLeakDetectionResult( |
1004 const LeakDetectionResult& report) { | 1011 const LeakDetectionResult& report) { |
1005 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1012 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
1006 } | 1013 } |
1007 | 1014 |
1008 } // namespace content | 1015 } // namespace content |
OLD | NEW |