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

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: add test Created 4 years, 8 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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 plugins::PluginPlaceholder* placeholder = 726 plugins::PluginPlaceholder* placeholder =
727 new plugins::PluginPlaceholder(render_view()->GetMainRenderFrame(), frame, 727 new plugins::PluginPlaceholder(render_view()->GetMainRenderFrame(), frame,
728 params, "<div>Test content</div>"); 728 params, "<div>Test content</div>");
729 return placeholder->plugin(); 729 return placeholder->plugin();
730 } 730 }
731 731
732 float BlinkTestRunner::GetDeviceScaleFactorForTest() const { 732 float BlinkTestRunner::GetDeviceScaleFactorForTest() const {
733 return render_view()->GetDeviceScaleFactorForTest(); 733 return render_view()->GetDeviceScaleFactorForTest();
734 } 734 }
735 735
736 void BlinkTestRunner::RunIdleTasks(const base::Closure& callback) {
737 SchedulerRunIdleTasks(callback);
738 }
739
736 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( 740 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack(
737 blink::WebMediaStream* stream) { 741 blink::WebMediaStream* stream) {
738 DCHECK(stream); 742 DCHECK(stream);
739 #if defined(ENABLE_WEBRTC) 743 #if defined(ENABLE_WEBRTC)
740 return AddVideoTrackToMediaStream( 744 return AddVideoTrackToMediaStream(
741 make_scoped_ptr(new MockVideoCapturerSource()), 745 make_scoped_ptr(new MockVideoCapturerSource()),
742 false, // is_remote 746 false, // is_remote
743 false, // is_readonly 747 false, // is_readonly
744 stream); 748 stream);
745 #else 749 #else
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 get_bluetooth_events_callbacks_.pop_front(); 1021 get_bluetooth_events_callbacks_.pop_front();
1018 callback.Run(events); 1022 callback.Run(events);
1019 } 1023 }
1020 1024
1021 void BlinkTestRunner::ReportLeakDetectionResult( 1025 void BlinkTestRunner::ReportLeakDetectionResult(
1022 const LeakDetectionResult& report) { 1026 const LeakDetectionResult& report) {
1023 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1027 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1024 } 1028 }
1025 1029
1026 } // namespace content 1030 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698