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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-controls-captions-on-off.html

Issue 2268923003: Clean up textTrackDisplayElement utility function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Tests that tracks can be turned on and off through the track selection me nu.</title> 2 <title>Tests that tracks can be turned on and off through the track selection me nu.</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="media-file.js"></script> 5 <script src="media-file.js"></script>
6 <script src="media-controls.js"></script> 6 <script src="media-controls.js"></script>
7 <video controls></video> 7 <video controls></video>
8 <script> 8 <script>
9 async_test(function(t) { 9 async_test(function(t) {
10 var text = ["First", "Second", "Third"]; 10 var text = ["First", "Second", "Third"];
(...skipping 25 matching lines...) Expand all
36 clickTextTrackAtIndex(video, 0); 36 clickTextTrackAtIndex(video, 0);
37 checkCaptionsVisible(); 37 checkCaptionsVisible();
38 }); 38 });
39 39
40 function checkCaptionsVisible() { 40 function checkCaptionsVisible() {
41 for (var i = 0; i < text.length; i++) 41 for (var i = 0; i < text.length; i++)
42 assert_equals(textTrackCueElementByIndex(video, i).innerText, text[i ]); 42 assert_equals(textTrackCueElementByIndex(video, i).innerText, text[i ]);
43 } 43 }
44 44
45 function checkCaptionsHidden() { 45 function checkCaptionsHidden() {
46 assert_equals(textTrackCueElementByIndex(video, 0), null); 46 assert_equals(textTrackDisplayElement(video), null);
47 } 47 }
48 48
49 video.src = findMediaFile("video", "content/counting"); 49 video.src = findMediaFile("video", "content/counting");
50 }); 50 });
51 </script> 51 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698