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

Side by Side Diff: LayoutTests/media/track/track-mode.html

Issue 965683002: Fix TextTrackMode test (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 <html> 2 <html>
3 <head> 3 <head>
4 4
5 <script src=../media-file.js></script> 5 <script src=../media-file.js></script>
6 <script src=../video-test.js></script> 6 <script src=../video-test.js></script>
7 <script> 7 <script>
8 8
9 var textTrack; 9 var textTrack;
10 var cueCount; 10 var cueCount;
(...skipping 23 matching lines...) Expand all
34 testExpected("video.textTracks[0].mode", "showing"); 34 testExpected("video.textTracks[0].mode", "showing");
35 consoleWrite(""); 35 consoleWrite("");
36 36
37 consoleWrite("<b>*** Set to bogus value, should return default</ b>"); 37 consoleWrite("<b>*** Set to bogus value, should return default</ b>");
38 var value = "bogus"; 38 var value = "bogus";
39 run("textTrack.mode = '" + value + "'"); 39 run("textTrack.mode = '" + value + "'");
40 testExpected("textTrack.mode", "showing"); 40 testExpected("textTrack.mode", "showing");
41 testExpected("video.textTracks[0].mode", "showing"); 41 testExpected("video.textTracks[0].mode", "showing");
42 consoleWrite(""); 42 consoleWrite("");
43 43
44 consoleWrite("<b>*** Set to numeric value (no longer supported), should return default</b>");
45 run("textTrack.mode = 2");
46 testExpected("textTrack.mode", "showing");
47 testExpected("video.textTracks[0].mode", "showing");
48 consoleWrite("");
49
44 consoleWrite("<b>*** Set to known values</b>"); 50 consoleWrite("<b>*** Set to known values</b>");
45 consoleWrite("<b>++ 'disabled'</b>"); 51 consoleWrite("<b>++ 'disabled'</b>");
46 setMode("disabled"); 52 setMode("disabled");
47 53
48 video.src = findMediaFile("video", "../content/test"); 54 video.src = findMediaFile("video", "../content/test");
49 video.play(); 55 video.play();
50 // Wait for end of first cue (no events should fire while track is disabled). 56 // Wait for end of first cue (no events should fire while track is disabled).
51 setTimeout(testHiddenAndShowing, 400); 57 setTimeout(testHiddenAndShowing, 400);
52 consoleWrite("++ 0 events expected while mode = disabled"); 58 consoleWrite("++ 0 events expected while mode = disabled");
53 consoleWrite(""); 59 consoleWrite("");
(...skipping 22 matching lines...) Expand all
76 82
77 </script> 83 </script>
78 </head> 84 </head>
79 <body> 85 <body>
80 <p>Tests that the TextTrack mode attribute is appropriately set.</p> 86 <p>Tests that the TextTrack mode attribute is appropriately set.</p>
81 <video> 87 <video>
82 <track id=track_1 src="captions-webvtt/captions-fast.vtt" onload="st art()" default> 88 <track id=track_1 src="captions-webvtt/captions-fast.vtt" onload="st art()" default>
83 </video> 89 </video>
84 </body> 90 </body>
85 </html> 91 </html>
OLDNEW
« no previous file with comments | « LayoutTests/media/track/track-add-remove-cue-expected.txt ('k') | LayoutTests/media/track/track-mode-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698