Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/csp-blocks-video.html |
| diff --git a/third_party/WebKit/LayoutTests/media/csp-blocks-video.html b/third_party/WebKit/LayoutTests/media/csp-blocks-video.html |
| index aa6eea8060f42740bb7aa4f395ead01ad27b183a..e36cd3aededed8251449591ecfc2d9898a0e9e4e 100644 |
| --- a/third_party/WebKit/LayoutTests/media/csp-blocks-video.html |
| +++ b/third_party/WebKit/LayoutTests/media/csp-blocks-video.html |
| @@ -1,18 +1,17 @@ |
| +<!DOCTYPE html> |
| +<title>Test that "Content-Security-Policy" on a media element is obeyed.</title> |
| <meta http-equiv="Content-Security-Policy" content="media-src 'none'"> |
| <video controls></video> |
| -<script src=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=video-test.js></script> |
| -<p>This test passes if it doesn't alert failure.</p> |
| +<script src="../resources/testharness.js"></script> |
| +<script src="../resources/testharnessreport.js"></script> |
| +<script src="media-file.js"></script> |
| <script> |
| -var mediaFile = findMediaFile("video", "content/test"); |
| -video.src = mediaFile; |
| +async_test(function(t) { |
| + var video = document.querySelector("video"); |
| + video.src = findMediaFile("video", "content/test"); |
| -waitForEvent('loadedmetadata', function () { |
| - alert('FAIL'); |
| - endTest(); |
| -} ); |
| -video.load(); |
| -addEventListener('load', endTest, false); |
| + video.onloadedmetadata = t.unreached_func(); |
| + video.load(); |
| + setTimeout(t.step_func_done(), 500); |
|
fs
2016/05/30 09:11:39
window.onload = ...;
?
Srirama
2016/05/31 07:04:23
Done.
|
| +}); |
| </script> |