When switching media sessions, elements belonging to the old session should be paused.
Created attachment 257933 [details] Patch
Comment on attachment 257933 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257933&action=review > LayoutTests/media/session/switching-sessions.html:37 > + run('video.session = new MediaSession("transient")'); > + > + testExpected('video.paused', true); > + > + endTest(); It might be good to register a 'pause' event handler and call endTest from there.
(In reply to comment #2) > Comment on attachment 257933 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=257933&action=review > > > LayoutTests/media/session/switching-sessions.html:37 > > + run('video.session = new MediaSession("transient")'); > > + > > + testExpected('video.paused', true); > > + > > + endTest(); > > It might be good to register a 'pause' event handler and call endTest from > there. In the case where a media element is not paused, this will be faster than letting the test time out while waiting for an event to fire. I think I'll keep this.
Committed r187710: <http://trac.webkit.org/changeset/187710>