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

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
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <clocale> 10 #include <clocale>
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 plugins::PluginPlaceholder* placeholder = 697 plugins::PluginPlaceholder* placeholder =
698 new plugins::PluginPlaceholder(render_view()->GetMainRenderFrame(), frame, 698 new plugins::PluginPlaceholder(render_view()->GetMainRenderFrame(), frame,
699 params, "<div>Test content</div>"); 699 params, "<div>Test content</div>");
700 return placeholder->plugin(); 700 return placeholder->plugin();
701 } 701 }
702 702
703 float BlinkTestRunner::GetDeviceScaleFactorForTest() const { 703 float BlinkTestRunner::GetDeviceScaleFactorForTest() const {
704 return render_view()->GetDeviceScaleFactorForTest(); 704 return render_view()->GetDeviceScaleFactorForTest();
705 } 705 }
706 706
707 void BlinkTestRunner::RunIdleTasks(const base::Closure& callback) {
708 SchedulerRunIdleTasks(callback);
709 }
710
707 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( 711 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack(
708 blink::WebMediaStream* stream) { 712 blink::WebMediaStream* stream) {
709 DCHECK(stream); 713 DCHECK(stream);
710 #if defined(ENABLE_WEBRTC) 714 #if defined(ENABLE_WEBRTC)
711 return AddVideoTrackToMediaStream( 715 return AddVideoTrackToMediaStream(
712 base::WrapUnique(new MockVideoCapturerSource()), 716 base::WrapUnique(new MockVideoCapturerSource()),
713 false, // is_remote 717 false, // is_remote
714 false, // is_readonly 718 false, // is_readonly
715 stream); 719 stream);
716 #else 720 #else
(...skipping 265 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
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698