Sync web-platform-tests PR 20244 into mozilla-central (this bug is closed when the sync is complete).
[web-locks] Improve test determinism
Two subtests rely on locks which must not be released while the subtest
is running. By providing a Promise that never settles, these tests are
susceptible to interference from locks which have been created in
previous test executions. This is most pronounced when the stability of
the tests is being verified (e.g. during automated patch validation).
Configure the test harness to release locks following subtest
@inexorabletash @pwnall The behavior that this patch guards against may be faulty. The spec currently dictates that an operation to release all locks should be queued "when an agent terminates." It doesn't explain what "terminate" means, but if it includes navigation, then the flakiness which Chromium is exhibiting is evidence of a violation.
In that case, one might argue that this patch is superfluous. I'd still recommend merging it, though, because the current failure is inconsistent (so it blocks work like gh-12267) and difficult to interpret. A new test which is explicitly designed around navigation would be better.