| Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked.html
|
| index 011b547047bbb1c7d06467a48c7e8f93eba127fa..580573b8254d300d5b7dc60be7167addfdec2ae3 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked.html
|
| @@ -1,20 +1,21 @@
|
| +<!DOCTYPE html>
|
| +<title>This tests that video is not loaded because of "Content-Security-Policy".</title>
|
| <meta http-equiv="Content-Security-Policy" content="media-src 'none'">
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +<script src="../../media-resources/media-file.js"></script>
|
| <video></video>
|
| -<script src=../../../media-resources/media-file.js></script>
|
| -<!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
|
| - (Please avoid writing new tests using video-test.js) -->
|
| -<script src=../../../media-resources/video-test.js></script>
|
| -<p>This test passes if it doesn't alert failure.</p>
|
| <script>
|
| -waitForEvent('loadedmetadata', function () {
|
| - alert('FAIL');
|
| -} );
|
| +async_test(function(t) {
|
| + var video = document.querySelector("video");
|
| + video.onloadedmetadata = t.unreached_func();
|
|
|
| -addEventListener('load', endTestLater, false);
|
| + window.onload = t.step_func_done();
|
|
|
| -// Find a supported media file.
|
| -var mediaFile = findMediaFile("video", "content/test");
|
| -var mimeType = mimeTypeForFile(mediaFile);
|
| + // Find a supported media file.
|
| + var mediaFile = findMediaFile("video", "content/test");
|
| + var mimeType = mimeTypeForFile(mediaFile);
|
|
|
| -video.src = "http://127.0.0.1:8000/resources/load-and-stall.cgi?name=../../../media/" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000";
|
| -</script>
|
| + video.src = "http://127.0.0.1:8000/resources/load-and-stall.cgi?name=../../../media/" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000";
|
| +});
|
| +</script>
|
|
|