Index: third_party/WebKit/LayoutTests/media/video-controls-captions-on-off.html |
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-captions-multiple-clicks.html b/third_party/WebKit/LayoutTests/media/video-controls-captions-on-off.html |
similarity index 72% |
rename from third_party/WebKit/LayoutTests/media/video-controls-captions-multiple-clicks.html |
rename to third_party/WebKit/LayoutTests/media/video-controls-captions-on-off.html |
index 30990c95cb9979b945e57a7f0ecd93eee0588fa7..e61a3f67df81bc2d3c918317690478a16a77e044 100644 |
--- a/third_party/WebKit/LayoutTests/media/video-controls-captions-multiple-clicks.html |
+++ b/third_party/WebKit/LayoutTests/media/video-controls-captions-on-off.html |
@@ -2,20 +2,19 @@ |
<html> |
<head> |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
- <title>Test closed caption button toggling.</title> |
- <script src=media-file.js></script> |
- <script src=media-controls.js></script> |
- <script src=video-test.js></script> |
+ <title>Test closed caption track selection on and off.</title> |
+ <script src="media-file.js"></script> |
+ <script src="media-controls.js"></script> |
+ <script src="video-test.js"></script> |
<script> |
- var displayElement; |
- var track; |
var text = ["First", "Second", "Third"]; |
+ var displayElement; |
function addTextTrack() |
{ |
- track = video.addTextTrack('captions'); |
+ var track = video.addTextTrack('captions'); |
- for(var i = 0; i < 3; i++) { |
+ for (var i = 0; i < 3; i++) { |
var cue = new VTTCue(0, 120, text[i]); |
track.addCue(cue); |
} |
@@ -25,9 +24,9 @@ |
{ |
for (var i = 0; i < 3; i++) { |
try { |
- displayElement = textTrackDisplayElement(video, 'display', i); |
+ displayElement = textTrackDisplayElement(video, "display", i); |
testExpected("displayElement.innerText", text[i]); |
- } catch(e) { |
+ } catch (e) { |
consoleWrite(e); |
} |
} |
@@ -52,18 +51,18 @@ |
checkCaptionsDisplay(); |
consoleWrite(""); |
- consoleWrite("** Captions track should become visible after button is clicked **"); |
- clickCCButton(); |
+ consoleWrite("** Captions track should become visible after the track is selected **"); |
+ selectTextTrack(video, 0); |
checkCaptionsDisplay(); |
consoleWrite(""); |
- consoleWrite("** Captions should not be visible after button is clicked again **"); |
- clickCCButton(); |
+ consoleWrite("** Captions should not be visible after they're turned off through the menu **"); |
+ turnClosedCaptionsOff(video); |
checkCaptionsDisplay(); |
consoleWrite(""); |
- consoleWrite("** Captions should become visible after button is clicked again **"); |
- clickCCButton(); |
+ consoleWrite("** Captions track should become visible after the track is selected again **"); |
+ selectTextTrack(video, 0); |
checkCaptionsDisplay(); |
consoleWrite(""); |
@@ -80,7 +79,7 @@ |
</script> |
</head> |
<body onload="loaded()"> |
- <p>Tests that multiple toggles of the closed captions button still display captions</p> |
+ <p>Tests that tracks can be turned on and off through the track selection menu</p> |
<video controls></video> |
</body> |
</html> |