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

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: rebase 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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 plugins::PluginPlaceholder* placeholder = 694 plugins::PluginPlaceholder* placeholder =
695 new plugins::PluginPlaceholder(render_view()->GetMainRenderFrame(), frame, 695 new plugins::PluginPlaceholder(render_view()->GetMainRenderFrame(), frame,
696 params, "<div>Test content</div>"); 696 params, "<div>Test content</div>");
697 return placeholder->plugin(); 697 return placeholder->plugin();
698 } 698 }
699 699
700 float BlinkTestRunner::GetDeviceScaleFactorForTest() const { 700 float BlinkTestRunner::GetDeviceScaleFactorForTest() const {
701 return render_view()->GetDeviceScaleFactorForTest(); 701 return render_view()->GetDeviceScaleFactorForTest();
702 } 702 }
703 703
704 void BlinkTestRunner::RunIdleTasks(const base::Closure& callback) {
705 SchedulerRunIdleTasks(callback);
706 }
707
704 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( 708 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack(
705 blink::WebMediaStream* stream) { 709 blink::WebMediaStream* stream) {
706 DCHECK(stream); 710 DCHECK(stream);
707 #if defined(ENABLE_WEBRTC) 711 #if defined(ENABLE_WEBRTC)
708 return AddVideoTrackToMediaStream( 712 return AddVideoTrackToMediaStream(
709 make_scoped_ptr(new MockVideoCapturerSource()), 713 make_scoped_ptr(new MockVideoCapturerSource()),
710 false, // is_remote 714 false, // is_remote
711 false, // is_readonly 715 false, // is_readonly
712 stream); 716 stream);
713 #else 717 #else
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 get_bluetooth_events_callbacks_.pop_front(); 986 get_bluetooth_events_callbacks_.pop_front();
983 callback.Run(events); 987 callback.Run(events);
984 } 988 }
985 989
986 void BlinkTestRunner::ReportLeakDetectionResult( 990 void BlinkTestRunner::ReportLeakDetectionResult(
987 const LeakDetectionResult& report) { 991 const LeakDetectionResult& report) {
988 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 992 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
989 } 993 }
990 994
991 } // namespace content 995 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698