Bug 58642

Summary: CSP media-src is missing
Product: WebKit Reporter: Adam Barth <abarth>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, eric.carlson, eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 53572    
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Adam Barth 2011-04-15 00:23:33 PDT
CSP media-src is missing
Comment 1 Adam Barth 2011-04-15 01:09:25 PDT
Created attachment 89755 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-04-15 06:37:12 PDT
Comment on attachment 89755 [details]
Patch

Hmm.  Seems OK. why the stall in the tests?
Comment 3 Eric Carlson 2011-04-15 07:53:19 PDT
Comment on attachment 89755 [details]
Patch

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

Is CSP supposed to work with local files as well? If so, we should have equivalent tests in LayoutTests/media.

> LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:2
> +END OF TEST
> +

Because it isn't possible to have an explicit "PASS" in the results, it would be nice to have some text to indicate what the constitutes success. I hate having to look at a test's source to figure out if it succeeded or failed.
Comment 4 Adam Barth 2011-04-15 11:00:36 PDT
> Hmm.  Seems OK. why the stall in the tests?

It just comes from the test I copied.  I can try removing the stall.  I don't think it slows the test down in either case.

> Is CSP supposed to work with local files as well? If so, we should have equivalent tests in LayoutTests/media.

CSP can work with local files, yes.  I've only been testing it for the HTTP case, but I can add a local test if you like.

> > LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:2
> > +END OF TEST
> > +
> 
> Because it isn't possible to have an explicit "PASS" in the results, it would be nice to have some text to indicate what the constitutes success. I hate having to look at a test's source to figure out if it succeeded or failed.

Will do.
Comment 5 Eric Carlson 2011-04-15 11:08:31 PDT
(In reply to comment #4)
> > Hmm.  Seems OK. why the stall in the tests?
> 
> It just comes from the test I copied.  I can try removing the stall.  I don't think it slows the test down in either case.
> 
It doesn't do anything in this case because the test ends when 'loadedmetadata' is fired.
Comment 6 Adam Barth 2011-04-15 14:24:43 PDT
Created attachment 89852 [details]
Patch for landing
Comment 7 Adam Barth 2011-04-15 14:25:33 PDT
The test fails if I remove the "stall" URL parameter.  Presumably there's a way to get rid of it, but it's not hurting anyone, so I've left it.
Comment 8 WebKit Commit Bot 2011-04-15 21:24:21 PDT
Comment on attachment 89852 [details]
Patch for landing

Clearing flags on attachment: 89852

Committed r84077: <http://trac.webkit.org/changeset/84077>
Comment 9 WebKit Commit Bot 2011-04-15 21:24:25 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 WebKit Review Bot 2011-04-15 22:33:26 PDT
http://trac.webkit.org/changeset/84077 might have broken Leopard Intel Debug (Tests)