Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(847)

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 1832673002: Add testRunner.runIdleTasks() to force idle tasks to run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 return placeholder->plugin(); 731 return placeholder->plugin();
732 } 732 }
733 733
734 blink::WebPoint BlinkTestRunner::ConvertDIPToNative( 734 blink::WebPoint BlinkTestRunner::ConvertDIPToNative(
735 const blink::WebPoint& point_in_dip) const { 735 const blink::WebPoint& point_in_dip) const {
736 float scale = render_view()->GetDeviceScaleFactorForTest(); 736 float scale = render_view()->GetDeviceScaleFactorForTest();
737 return blink::WebPoint(point_in_dip.x * scale, 737 return blink::WebPoint(point_in_dip.x * scale,
738 point_in_dip.y * scale); 738 point_in_dip.y * scale);
739 } 739 }
740 740
741 void BlinkTestRunner::RunIdleTasks(const base::Closure& callback) {
742 SchedulerRunIdleTasks(callback);
743 }
744
741 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( 745 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack(
742 blink::WebMediaStream* stream) { 746 blink::WebMediaStream* stream) {
743 DCHECK(stream); 747 DCHECK(stream);
744 #if defined(ENABLE_WEBRTC) 748 #if defined(ENABLE_WEBRTC)
745 return AddVideoTrackToMediaStream( 749 return AddVideoTrackToMediaStream(
746 make_scoped_ptr(new MockVideoCapturerSource()), 750 make_scoped_ptr(new MockVideoCapturerSource()),
747 false, // is_remote 751 false, // is_remote
748 false, // is_readonly 752 false, // is_readonly
749 stream); 753 stream);
750 #else 754 #else
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 get_bluetooth_events_callbacks_.pop_front(); 1015 get_bluetooth_events_callbacks_.pop_front();
1012 callback.Run(events); 1016 callback.Run(events);
1013 } 1017 }
1014 1018
1015 void BlinkTestRunner::ReportLeakDetectionResult( 1019 void BlinkTestRunner::ReportLeakDetectionResult(
1016 const LeakDetectionResult& report) { 1020 const LeakDetectionResult& report) {
1017 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1021 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1018 } 1022 }
1019 1023
1020 } // namespace content 1024 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698