Re: [media-source-tests] Add media-source delaying-the-load-event-flag reset test from Chromium (#3082)

This looks good, but cannot there be a race condition between the `sourceopen` event on the `MediaSource` and the `load` event on `window`?

[Spinning the event loop](https://www.w3.org/TR/html51/webappapis.html#spinning-the-event-loop) waits until the condition is met (in our case until the flag is reset) in parallel, then queues a task to resume the algorithm that caused it to [delay the load event](https://www.w3.org/TR/html51/syntax.html#delay-the-load-event), which in turn queues a task to fire the `load` event.

The MSE algorithm that resets the delaying-the-load-event-flag also runs in parallel. Why is there a guarantee that task to fire the `sourceopen` event will be queued before it the task to fire the `load` event?

View on GitHub: https://github.com/w3c/web-platform-tests/pull/3082#issuecomment-229593658

Received on Thursday, 30 June 2016 08:20:52 UTC