# Scheduler Fixture

This fixture is for manual testing purposes, and the patterns used in implementing it should not be used as a model. This is mainly for anyone working on making changes to the `schedule` module.

## Tests:

1. Calls the callback within the frame when not blocked:

   Expected:
   -------------------------------------------------
   If you see the same above and below it's correct.
   -------------------------------------------------
   Actual:

2. Accepts multiple callbacks and calls within frame when not blocked

   Expected:
   -------------------------------------------------
   If you see the same above and below it's correct.
   -------------------------------------------------
   Actual:

3. Schedules callbacks in correct order when they use scheduleCallback to schedule themselves

   Expected:
   -------------------------------------------------
   If you see the same above and below it's correct.
   -------------------------------------------------
   Actual:

4. Calls timed out callbacks and then any more pending callbacks, defers others if time runs out

   Expected:
   -------------------------------------------------
   If you see the same above and below it's correct.
   -------------------------------------------------
   Actual:

5. When some callbacks throw errors, still calls them all within the same frame

   IMPORTANT: Open the console when you run this! Inspect the logs there!

6. When some callbacks throw errors and some also time out, still calls them all within the same frame

   IMPORTANT: Open the console when you run this! Inspect the logs there!

7. Continues calling callbacks even when user switches away from this tab

   Click the button above, observe the counter, then switch to another tab and switch back:
   If the counter advanced while you were away from this tab, it's correct.

8. Test Eight Removed

   Test 8 was removed because it was testing a feature that was removed from the scheduler.

9. Can force a specific framerate

   IMPORTANT: This test may be flaky if other tests have been run in this js instance. To get a clean test refresh the page before running test 9

   Expected:
   -------------------------------------------------
   If you see the same above and below it's correct.
   -------------------------------------------------
   Actual:

10. Runs scheduled JS work for 99% of the frame time when nothing else is using the thread.

    NOTE: Try this test both when nothing else is running and when something is using the compositor thread in another visible tab with video or WebGL content (Shift+Click).

    Expected:
    -------------------------------------------------
    If you see the same above and below it's correct.
    -------------------------------------------------
    Actual:

11. Runs scheduled JS work more than 95% of the frame time when inserting DOM nodes.

    NOTE: Try this test both when nothing else is running and when something is using the compositor thread in another visible tab with video or WebGL content (Shift+Click).

    Expected:
    -------------------------------------------------
    If you see the same above and below it's correct.
    -------------------------------------------------
    Actual: