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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-controls-track-selection-menu.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
« no previous file with comments | « third_party/WebKit/LayoutTests/media/video-controls-captions-on-off.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Test that we can display a track list menu and select tracks from the lis t.</title> 2 <title>Test that we can display a track list menu and select tracks from the lis t.</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="track/track-helpers.js"></script> 5 <script src="track/track-helpers.js"></script>
6 <script src="media-file.js"></script> 6 <script src="media-file.js"></script>
7 <script src="media-controls.js"></script> 7 <script src="media-controls.js"></script>
8 <video controls> 8 <video controls>
9 <track src="track/captions-webvtt/captions.vtt" kind="captions" label="Track 1"> 9 <track src="track/captions-webvtt/captions.vtt" kind="captions" label="Track 1">
10 <track src="track/captions-webvtt/long-word.vtt" kind="captions" label="Trac k2"> 10 <track src="track/captions-webvtt/long-word.vtt" kind="captions" label="Trac k2">
(...skipping 17 matching lines...) Expand all
28 video.oncanplaythrough = t.step_func_done(function() { 28 video.oncanplaythrough = t.step_func_done(function() {
29 assert_true(isClosedCaptionsButtonVisible(video)); 29 assert_true(isClosedCaptionsButtonVisible(video));
30 assert_equals(video.textTracks.length, 2); 30 assert_equals(video.textTracks.length, 2);
31 assert_equals(video.textTracks[0].mode, "hidden"); 31 assert_equals(video.textTracks[0].mode, "hidden");
32 assert_equals(video.textTracks[1].mode, "hidden"); 32 assert_equals(video.textTracks[1].mode, "hidden");
33 33
34 // Select track 0 and verify it is displayed. 34 // Select track 0 and verify it is displayed.
35 clickTextTrackAtIndex(video, 0); 35 clickTextTrackAtIndex(video, 0);
36 assert_equals(video.textTracks[0].mode, "showing"); 36 assert_equals(video.textTracks[0].mode, "showing");
37 assert_equals(video.textTracks[1].mode, "hidden"); 37 assert_equals(video.textTracks[1].mode, "hidden");
38 assert_equals(textTrackCueElementByIndex(video, 0).innerText, "Lorem "); 38 assert_equals(textTrackDisplayElement(video).innerText, "Lorem");
39 39
40 // Select track 1 and verify it is displayed. 40 // Select track 1 and verify it is displayed.
41 clickTextTrackAtIndex(video, 1); 41 clickTextTrackAtIndex(video, 1);
42 assert_equals(video.textTracks[0].mode, "disabled"); 42 assert_equals(video.textTracks[0].mode, "disabled");
43 assert_equals(video.textTracks[1].mode, "showing"); 43 assert_equals(video.textTracks[1].mode, "showing");
44 assert_equals(textTrackCueElementByIndex(video, 0).innerText, "first caption"); 44 assert_equals(textTrackDisplayElement(video).innerText, "first capti on");
45 }); 45 });
46 46
47 video.src = findMediaFile("video", "content/test"); 47 video.src = findMediaFile("video", "content/test");
48 } 48 }
49 }); 49 });
50 </script> 50 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/media/video-controls-captions-on-off.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698