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..885df748cdf29a7ee1e12903099b92c90b62cb58 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(); |
|
foolip
2016/05/31 10:50:18
This shouldn't be needed, just setting the src att
Srirama
2016/05/31 13:23:28
Done.
|
| + window.onload = t.step_func_done(); |
|
foolip
2016/05/31 10:50:18
This looks either racy or assuming a bit much know
Srirama
2016/05/31 13:23:28
Done.
|
| +}); |
| </script> |