LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jun 2015 14:47:04 +0000 (14:47 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jun 2015 14:47:04 +0000 (14:47 +0000)
commitedc5b046c4b967f5e0196b804476b7bc511f06e0
tree4bb5c1c9d7558fa8ecd2aec4e6c3831f2db88099
parentdfeb58f2fcb91a87a533d48afcc52a42b0989455
LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html always passes
https://bugs.webkit.org/show_bug.cgi?id=146272

Reviewed by Darin Adler.

Fixes an issue where the test LayoutTests/http/tests/security/contentSecurityPolicy/media-src-track-block.html
will always pass regardless of whether the Content Security Policy <meta> tag is present because
the external text track file is not valid WebVTT-formatted file.

The test verifies that the external text track file LayoutTests/http/tests/security/contentSecurityPolicy/resources/track.vtt
fails to load when the Content Security Policy of the page disallows loading of all media (media-src: "none")
by listening for a DOM error event to be dispatched to the <track>. And the text track file is not a valid
WebVTT-formatted file. So, it will always fail to load; => a DOM error event is always dispatched to the
<track>; => the test always passes.

* http/tests/security/contentSecurityPolicy/resources/track.vtt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/security/contentSecurityPolicy/resources/track.vtt