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

I admit I'm not fully clear on the task/microtask stuff that's used in HTMLMediaElement.
IIUC, upon attachment: 'sourceopen' must be queued first (even though the `delaying-the-load-event-flag` is reset just prior to queueing 'sourceopen') because the effect of resetting that flag results in a task queued to resume the various 'delay the load' checks (and eventually queue a 'load' event if necessary). That queued task cannot run until after the 'sourceopen' is queued in step 3 of the attachment Otherwise clause, since they are IIUC tasks queued on the same event loop.

So the test is actually testing Chrome's behavior, which is in opposite of the ordering of these two events per the spec. (See https://codereview.chromium.org/2021573002/diff/40001/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-attach-stops-delaying-load-event.html#newcode32). I don't believe there is a race condition, either.

I'll reverse the sequence ordering in the test and file a Chromium bug to get the impl to match. Though I don't expect the precise ordering of 'load' vs 'sourceopen' in implementations to block MSE v1 PR or REC.



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

Received on Friday, 2 September 2016 22:25:01 UTC