| Index: third_party/WebKit/LayoutTests/idle-callback/test-runner-run-idle-tasks.html
|
| diff --git a/third_party/WebKit/LayoutTests/idle-callback/test-runner-run-idle-tasks.html b/third_party/WebKit/LayoutTests/idle-callback/test-runner-run-idle-tasks.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d5a36836e2768745c07fc6d4dccd24c9f1efa37f
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/idle-callback/test-runner-run-idle-tasks.html
|
| @@ -0,0 +1,25 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/js-test.js"></script>
|
| +<div>Hello, world!</div>
|
| +<script>
|
| +description("Tests that testRunner.runIdleTasks will force idle tasks to run.");
|
| +self.jsTestIsAsync = true;
|
| +
|
| +var x = false;
|
| +
|
| +function cb1(t) {
|
| + shouldBeFalse("x");
|
| + x = true;
|
| +}
|
| +
|
| +function cb2(t) {
|
| + shouldBeTrue("x");
|
| + finishJSTest();
|
| +}
|
| +
|
| +requestIdleCallback(cb1);
|
| +if (self.testRunner)
|
| + testRunner.runIdleTasks(cb2);
|
| +else
|
| + requestIdleCallback(cb2);
|
| +</script>
|
|
|