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

Unified Diff: components/test_runner/test_runner.h

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 side-by-side diff with in-line comments
Download patch
Index: components/test_runner/test_runner.h
diff --git a/components/test_runner/test_runner.h b/components/test_runner/test_runner.h
index becad97f794b082f8661b6918cb6af043b51074a..cc73872a7795d6af0c575e61c9008994509a229d 100644
--- a/components/test_runner/test_runner.h
+++ b/components/test_runner/test_runner.h
@@ -588,6 +588,11 @@ class TestRunner : public WebTestRunner,
void ResolveBeforeInstallPromptPromise(int request_id,
const std::string& platform);
+ // Immediately run all pending idle tasks, including all pending
+ // requestIdleCallback calls. Invoke the callback when all
+ // idle tasks are complete.
+ void RunIdleTasks(v8::Local<v8::Function> callback);
+
// Calls setlocale(LC_ALL, ...) for a specified locale.
// Resets between tests.
void SetPOSIXLocale(const std::string& locale);

Powered by Google App Engine
This is Rietveld 408576698