chromium/third_party/blink/web_tests/wpt_internal/task-tracking/requestIdleCallback.html

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Verify that requestIdleCallback tasks can be properly tracked.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/task-ids.js"></script>
</head>
<body>
<script>
promise_test(() => {
  return new Promise(async (resolve, reject) => {
    const initialId = initializeTaskId();
    await new Promise(resolve => setTimeout(resolve, 0));
    requestIdleCallback(() => {
      try {
        assert_equals(scheduler.taskId, initialId);
        resolve();
      } catch {
        reject("Not an ancestor");
      }
    });
  });
}, "A requestIdleCallback callback is a descendant of the registering task");

</script>
</body>
</html>