- The variants specify which global context the tests should run on. The only
two options are `window` and `dedicated_worker`.
- We need to include all those scripts for the testdriver and
[RemoteContext](../common/dispatcher/README.md) infrastructure to work.
- `pressure_test()` is a wrapper around a `promise_test()` that takes care of
running the test either in the current context (when `globalScope=window`) or
in a dedicated worker via `RemoteContext` and `fetch_tests_from_worker()`
(when `globalScope=dedicated_worker`).
- `mark_as_done()` is a no-op when `globalScope=window`, but is necessary when
`globalScope=dedicated_worker` to ensure that all tests have run and that
[`done()`](https://web-platform-tests.org/writing-tests/testharness-api.html#Test.done)
is called in the worker context.
### Shared workers
Since custom pressure states are stored in a top-level navigables, they are
currently not integrated with shared workers (see [spec issue
285](https://github.com/w3c/compute-pressure/issues/285)) and support for
testing shared workers is limited.