Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: third_party/WebKit/LayoutTests/media/audio-controls-captions.html

Issue 2004963003: Convert audio-controls* and audio-delete* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/audio-controls-captions-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/audio-controls-captions-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698