| Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-allowed.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-allowed.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-allowed.html
|
| index a18deca765c91516ddbf573c9d467ed80d9218e1..667c66c6f1b4ae16893bea09ac00f87ee5e045b5 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-allowed.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-allowed.html
|
| @@ -1,18 +1,19 @@
|
| +<!DOCTYPE html>
|
| +<title>This tests that video is loaded as per "Content-Security-Policy".</title>
|
| <meta http-equiv="Content-Security-Policy" content="media-src http://127.0.0.1:8000">
|
| +<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>
|
| <script>
|
| -waitForEvent('loadedmetadata', function () {
|
| - alert('PASS');
|
| - endTestLater();
|
| -} );
|
| +async_test(function(t) {
|
| + var video = document.querySelector("video");
|
| + video.onloadedmetadata = 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>
|
|
|