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

Side by Side Diff: LayoutTests/media/track/track-in-band-legacy-api.html

Issue 26759003: Remove HTMLMediaElement.webkitHasClosedCaptions/webkitClosedCaptionsVisible (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase to resolve conflicts Created 7 years, 2 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>In-band tracks enabled/disabled with legacy API</title>
5
6 <script src=../media-file.js></script>
7 <script src=../video-test.js></script>
8 <script src=../media-controls.js></script>
9 <script>
10
11 function seeked()
12 {
13 consoleWrite("<br><i>** Test to make sure captions are displayin g<" + "/i>");
14
15 testExpected("inbandTrack1.cues", null, '!=');
16 testExpected("textTrackDisplayElement(video, 'cue').textContent" , null, '!=');
17
18 consoleWrite("<br><i>** Disable captions, cues should be flushed <" + "/i>");
19 run("video.webkitClosedCaptionsVisible = false");
20 testExpected("inbandTrack1.cues", null);
21
22 consoleWrite("");
23 endTest();
24 }
25
26 function canplaythrough()
27 {
28 consoleWrite("<br><i>** Check initial in-band track states<" + " /i>");
29 testExpected("video.textTracks.length", 1);
30 run("inbandTrack1 = video.textTracks[0]");
31 testExpected("inbandTrack1.mode", "disabled");
32 testExpected("inbandTrack1.cues", null);
33 testExpected("inbandTrack1.language", "en");
34 testExpected("inbandTrack1.kind", "captions");
35
36 consoleWrite("<br><i>** Enable cues and let them load<" + "/i>") ;
37 run("video.webkitClosedCaptionsVisible = true");
38 run("video.play()");
39 setTimeout(function() { video.pause(); video.currentTime = 0.3; }, 1000);
40 }
41
42 function setup()
43 {
44 findMediaElement();
45 video.src = '../content/counting-captioned.mov';
46 waitForEvent('seeked', seeked);
47 waitForEvent('canplaythrough', canplaythrough);
48 }
49
50 </script>
51 </head>
52 <body onload="setup()">
53 <video controls></video>
54 <p>Test that in-band tracks work with .webkitClosedCaptionsVisible.</p>
55 </body>
56 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/media/track/track-in-band-legacy-api-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698