Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/audio-controls-captions.html |
| diff --git a/third_party/WebKit/LayoutTests/media/audio-controls-captions.html b/third_party/WebKit/LayoutTests/media/audio-controls-captions.html |
| index 1d608f2529749cdfbfc7ca8c9533725e04e87705..6064f60ef5940af2ce700d6a33019fbce0445517 100644 |
| --- a/third_party/WebKit/LayoutTests/media/audio-controls-captions.html |
| +++ b/third_party/WebKit/LayoutTests/media/audio-controls-captions.html |
| @@ -1,27 +1,22 @@ |
| <!DOCTYPE html> |
| -<html> |
| -<head> |
| - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| - <title>Test closed caption button visbility.</title> |
| - <script src=media-file.js></script> |
| - <script src=media-controls.js></script> |
| - <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| - (Please avoid writing new tests using video-test.js) --> |
| - <script src=video-test.js></script> |
| -</head> |
| -<body> |
| - <p>Tests that the closed captions button is not visible.</p> |
| - <audio controls> |
| - <track src="track/captions-webvtt/captions-fast.vtt"> |
| - </audio> |
| - <script> |
| - findMediaElement(); |
| - audio.src = findMediaFile('audio', 'content/test'); |
| - audio.addEventListener('loadedmetadata', function() |
| - { |
| - testClosedCaptionsButtonVisibility(false); |
| - endTest(); |
| - }); |
| - </script> |
| -</body> |
| -</html> |
| +<title>Tests that the closed captions button is not visible.</title> |
| +<script src="media-file.js"></script> |
| +<script src="media-controls.js"></script> |
| +<script src="../resources/testharness.js"></script> |
| +<script src="../resources/testharnessreport.js"></script> |
| +<audio controls> |
| + <track src="track/captions-webvtt/captions-fast.vtt"> |
| +</audio> |
| +<script> |
| +// TODO(srirama.m): This is a dummy function to avoid undefined error for |
| +// consoleWrite() which is referenced from testClosedCaptionsButtonVisibility. |
| +// This should be removed when video-test.js is knocked off finally. |
| +function consoleWrite(text) { |
| +} |
| + |
| +async_test(function(t) { |
| + var audio = document.querySelector('audio'); |
| + audio.src = findMediaFile('audio', 'content/test'); |
| + audio.onloadedmetadata = t.step_func_done(testClosedCaptionsButtonVisibility(false)); |
|
fs
2016/05/24 13:32:23
This doesn't look right, the argument ought to be
Srirama
2016/05/24 13:41:28
you mean it should be
..... = t.step_func_done(fun
fs
2016/05/24 14:06:19
It's confusing as to what ordering is required. I
|
| +}); |
| +</script> |