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

Side by Side Diff: content/test/layouttest_support.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/public/test/layouttest_support.h" 5 #include "content/public/test/layouttest_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "components/scheduler/test/renderer_scheduler_test_support.h"
14 #include "components/test_runner/test_common.h" 15 #include "components/test_runner/test_common.h"
15 #include "components/test_runner/web_frame_test_proxy.h" 16 #include "components/test_runner/web_frame_test_proxy.h"
16 #include "components/test_runner/web_test_proxy.h" 17 #include "components/test_runner/web_test_proxy.h"
17 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h" 18 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h"
18 #include "content/browser/renderer_host/render_process_host_impl.h" 19 #include "content/browser/renderer_host/render_process_host_impl.h"
19 #include "content/browser/renderer_host/render_widget_host_impl.h" 20 #include "content/browser/renderer_host/render_widget_host_impl.h"
20 #include "content/child/geofencing/web_geofencing_provider_impl.h" 21 #include "content/child/geofencing/web_geofencing_provider_impl.h"
21 #include "content/common/site_isolation_policy.h" 22 #include "content/common/site_isolation_policy.h"
22 #include "content/public/common/page_state.h" 23 #include "content/public/common/page_state.h"
23 #include "content/public/renderer/renderer_gamepad_provider.h" 24 #include "content/public/renderer/renderer_gamepad_provider.h"
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 PageStateToHistoryEntry(page_state[index])); 447 PageStateToHistoryEntry(page_state[index]));
447 result.append( 448 result.append(
448 DumpHistoryItem(entry->root_history_node(), 449 DumpHistoryItem(entry->root_history_node(),
449 8, 450 8,
450 index == current_index)); 451 index == current_index));
451 } 452 }
452 result.append("===============================================\n"); 453 result.append("===============================================\n");
453 return result; 454 return result;
454 } 455 }
455 456
457 void SchedulerRunIdleTasks(const base::Closure& callback) {
458 scheduler::RendererScheduler* scheduler =
459 content::RenderThreadImpl::current()->GetRendererScheduler();
460 scheduler::RunIdleTasksForTesting(scheduler, callback);
461 }
462
456 } // namespace content 463 } // namespace content
OLDNEW
« no previous file with comments | « content/test/BUILD.gn ('k') | third_party/WebKit/LayoutTests/idle-callback/test-runner-run-idle-tasks.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698