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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/layouttest_support.cc
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index 0ee74c336b185ef9902323f6b4fda56e80f1a46e..408169c792cba2bf0f8f5757698497150bc24036 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -11,6 +11,7 @@
#include "base/lazy_instance.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
+#include "components/scheduler/test/renderer_scheduler_test_support.h"
#include "components/test_runner/test_common.h"
#include "components/test_runner/web_frame_test_proxy.h"
#include "components/test_runner/web_test_proxy.h"
@@ -453,4 +454,10 @@ std::string DumpBackForwardList(std::vector<PageState>& page_state,
return result;
}
+void SchedulerRunIdleTasks(const base::Closure& callback) {
+ scheduler::RendererScheduler* scheduler =
+ content::RenderThreadImpl::current()->GetRendererScheduler();
+ scheduler::RunIdleTasksForTesting(scheduler, callback);
+}
+
} // namespace content
« 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