Bug 147414

Summary: Media Session: test Play/Pause media control events delivered to non-Content media sessions
Product: WebKit Reporter: Matt Rajca <mrajca>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: conrad_shultz, eric.carlson, mrajca, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 145411    
Attachments:
Description Flags
Patch eric.carlson: review+

Description Matt Rajca 2015-07-29 12:04:38 PDT
Add tests to ensure that Transient, Transient Solo, and Ambient media sessions don't respond to media control events.
Comment 1 Radar WebKit Bug Importer 2015-07-29 12:05:16 PDT
<rdar://problem/22056208>
Comment 2 Matt Rajca 2015-07-29 14:50:12 PDT
Created attachment 257774 [details]
Patch
Comment 3 Eric Carlson 2015-07-30 07:37:33 PDT
Comment on attachment 257774 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=257774&action=review

> LayoutTests/media/session/play-pause-media-events-in-non-content-sessions.html:31
> +            video.play();

Nit: If you want to add the event listener with "video.on<event type>", I think it will make the test results easier to understand if you log the event name as you would if you used waitForEvent, eg:

consoleWrite("EVENT(" + event.type + ")");

> LayoutTests/media/session/play-pause-media-events-in-non-content-sessions.html:62
> +    <p>'Transient' sessions should not respond to Play/Pause media control events.</p>

You are testing both transient and ambient sessions.
Comment 4 Matt Rajca 2015-07-30 15:12:34 PDT
(In reply to comment #3)
> Comment on attachment 257774 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=257774&action=review
> 
> > LayoutTests/media/session/play-pause-media-events-in-non-content-sessions.html:31
> > +            video.play();
> 
> Nit: If you want to add the event listener with "video.on<event type>", I
> think it will make the test results easier to understand if you log the
> event name as you would if you used waitForEvent, eg:
> 
> consoleWrite("EVENT(" + event.type + ")");

I switched to `waitForEvent`.

> 
> > LayoutTests/media/session/play-pause-media-events-in-non-content-sessions.html:62
> > +    <p>'Transient' sessions should not respond to Play/Pause media control events.</p>
> 
> You are testing both transient and ambient sessions.

Good catch.
Comment 5 Matt Rajca 2015-07-30 15:14:00 PDT
Committed r187612: <http://trac.webkit.org/changeset/187612>