Bug 146272 - LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html always passes
Summary: LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.h...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-23 19:19 PDT by Daniel Bates
Modified: 2015-06-24 07:47 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.99 KB, patch)
2015-06-23 19:24 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2015-06-23 19:19:19 PDT
The test LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html will always pass regardless of presence of the Content Security Policy <meta> tag in it because the referenced external text track file, <http://trac.webkit.org/browser/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/track.vtt?rev=138820>, is not a valid WebVTT-formatted file.

Steps to reproduce:

1. Run, Tools/Scripts/run-webkit-tests LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html
Notice that the test passes.

2. Open the file LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html in a text editor, remove the following line, and save the file:
<meta http-equiv="Content-Security-Policy" content="media-src 'none'"> LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html

3. Run, Tools/Scripts/run-webkit-tests LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html
Notice that the test passes. But it should fail with JavaScript alert "FAIL".
Comment 1 Daniel Bates 2015-06-23 19:21:48 PDT
By <https://html.spec.whatwg.org/multipage/embedded-content.html#text-track-failed-to-load>, "failed to load" for an external text track "indicates that the text track was enabled, but when the user agent attempted to obtain it, this failed in some way (e.g. URL could not be resolved, network error, unknown text track format). Some or all of the cues are likely missing and will not be obtained." In particular, an external text track is considered to have "failed to load" if it has an "unknown text track format".
Comment 2 Daniel Bates 2015-06-23 19:24:08 PDT
Created attachment 255470 [details]
Patch
Comment 3 Daniel Bates 2015-06-24 07:47:50 PDT
Comment on attachment 255470 [details]
Patch

Clearing flags on attachment: 255470

Committed r185910: <http://trac.webkit.org/changeset/185910>
Comment 4 Daniel Bates 2015-06-24 07:47:53 PDT
All reviewed patches have been landed.  Closing bug.