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 <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(); | |
|
oshima
2016/01/08 22:27:56
FYI: I added new method to get scale factor becaus
Noel Gordon
2016/01/09 03:23:50
Add FIXME/TODO.
oshima
2016/01/11 18:52:12
This code won't change.
| |
| 775 return blink::WebPoint(point_in_dip.x * scale, | |
| 776 point_in_dip.y * scale); | |
| 777 } | |
|
oshima
2016/01/08 22:27:55
Spacing is fixed in the next patch.
| |
| 772 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( | 778 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( |
| 773 blink::WebMediaStream* stream) { | 779 blink::WebMediaStream* stream) { |
| 774 DCHECK(stream); | 780 DCHECK(stream); |
| 775 #if defined(ENABLE_WEBRTC) | 781 #if defined(ENABLE_WEBRTC) |
| 776 return AddVideoTrackToMediaStream( | 782 return AddVideoTrackToMediaStream( |
| 777 make_scoped_ptr(new MockVideoCapturerSource()), | 783 make_scoped_ptr(new MockVideoCapturerSource()), |
| 778 false /* is_remote */, false /* is_readonly */, stream); | 784 false /* is_remote */, false /* is_readonly */, stream); |
| 779 #else | 785 #else |
| 780 return false; | 786 return false; |
| 781 #endif | 787 #endif |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 999 get_bluetooth_events_callbacks_.pop_front(); | 1005 get_bluetooth_events_callbacks_.pop_front(); |
| 1000 callback.Run(events); | 1006 callback.Run(events); |
| 1001 } | 1007 } |
| 1002 | 1008 |
| 1003 void BlinkTestRunner::ReportLeakDetectionResult( | 1009 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1004 const LeakDetectionResult& report) { | 1010 const LeakDetectionResult& report) { |
| 1005 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1011 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1006 } | 1012 } |
| 1007 | 1013 |
| 1008 } // namespace content | 1014 } // namespace content |
| OLD | NEW |