Scheduler Test Page

# 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. Can pause execution, dump scheduled callbacks, and continue where it left off

   Click the button above, press "continue" to finish the test after it pauses:
   Expected:
   -------------------------------------------------
   If the test didn't progress until you hit "continue" and
   you see the same above and below afterwards it's correct.
   -------------------------------------------------
   Actual:

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: