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

Side by Side Diff: third_party/WebKit/LayoutTests/idle-callback/test-runner-run-idle-tasks.html

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
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/js-test.js"></script>
3 <div>Hello, world!</div>
4 <script>
5 description("Tests that testRunner.runIdleTasks will force idle tasks to run.");
6 self.jsTestIsAsync = true;
7
8 var x = false;
9
10 function cb1(t) {
11 shouldBeFalse("x");
12 x = true;
13 }
14
15 function cb2(t) {
16 shouldBeTrue("x");
17 finishJSTest();
18 }
19
20 requestIdleCallback(cb1);
21 if (self.testRunner)
22 testRunner.runIdleTasks(cb2);
23 else
24 requestIdleCallback(cb2);
25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698