| <script src="../../media/media-file.js"></script> |
| testRunner.waitUntilDone(); |
| window.onload = function () |
| var video = document.getElementById("video"); |
| video.oncanplaythrough = function () { |
| // Use a zero timer to ensure that the first frame of the video is drawn. |
| window.setTimeout(testFinished, 0); |
| video.onerror = testFinished; |
| video.src = "../../media/" + findMediaFile("video", "content/test"); |
| <p>This tests that loading a video with a file URL is allowed when the page has Content Security Policy "media-src *" and the WebKit setting AllowContentSecurityPolicySourceStarToMatchAnyProtocol is enabled. This test PASSED if the video loads. Otherwise, it FAILED.</p> |
| <video id="video"></video> |