Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 5 | 5 |
| 6 <script src=../media-file.js></script> | 6 <script src=../media-file.js></script> |
| 7 <script src=../video-test.js></script> | 7 <script src=../video-test.js></script> |
| 8 <script> | 8 <script> |
| 9 | 9 |
| 10 var cues; | 10 var cues; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 testExpected("newCue.endTime", 1.0); | 58 testExpected("newCue.endTime", 1.0); |
| 59 testExpected("newCue.pauseOnExit", false); | 59 testExpected("newCue.pauseOnExit", false); |
| 60 testExpected("newCue.vertical", ""); | 60 testExpected("newCue.vertical", ""); |
| 61 testExpected("newCue.snapToLines", true); | 61 testExpected("newCue.snapToLines", true); |
| 62 testExpected("newCue.line", -1); | 62 testExpected("newCue.line", -1); |
| 63 testExpected("newCue.position", 50); | 63 testExpected("newCue.position", 50); |
| 64 testExpected("newCue.size", 100); | 64 testExpected("newCue.size", 100); |
| 65 testExpected("newCue.align", "middle"); | 65 testExpected("newCue.align", "middle"); |
| 66 | 66 |
| 67 consoleWrite("<br>*** Create an old-style cue with an id."); | 67 consoleWrite("<br>*** Create an old-style cue with an id."); |
| 68 run("oldStyleCue = new VTTCue('sausage-cue', 33, 3.4, 'Sausage?' )"); | 68 testException("oldStyleCue = new VTTCue('sausage-cue', 33, 3.4, 'Sausage?')", '"TypeError: Failed to construct \'VTTCue\': double parameter 1 is non-finite."'); |
|
philipj_slow
2015/01/19 08:49:36
Drop the 'sausage-cue' arguemnt and s/33/NaN/ to a
fs
2015/01/19 10:18:16
Based on "Create an old-style cue with an id" just
philipj_slow
2015/01/19 10:31:10
Oh, right. Seems like a pretty useless test to kee
fs
2015/01/19 11:42:44
Removed. Description updated.
| |
| 69 testExpected("oldStyleCue.id", ""); | |
| 70 testExpected("oldStyleCue.startTime.toString()", "NaN"); | |
| 71 testExpected("oldStyleCue.endTime", 33); | |
| 72 consoleWrite("*** Make sure the old-style cue is not inserted be cause its start time is not a number."); | |
| 73 testExpected("testTrack.track.cues.length", 5); | |
| 74 run("testTrack.track.addCue(oldStyleCue)"); | |
| 75 testExpected("testTrack.track.cues.length", 5); | |
| 76 | 69 |
| 77 consoleWrite("<br>*** Remove a cue created with addCue()."); | 70 consoleWrite("<br>*** Remove a cue created with addCue()."); |
| 78 run("testTrack.track.removeCue(textCue)"); | 71 run("testTrack.track.removeCue(textCue)"); |
| 79 testExpected("textCue.track", null); | 72 testExpected("textCue.track", null); |
| 80 testExpected("cues[1].startTime", 31); | 73 testExpected("cues[1].startTime", 31); |
| 81 testExpected("cues[2].startTime", 61); | 74 testExpected("cues[2].startTime", 61); |
| 82 | 75 |
| 83 consoleWrite("<br>*** Remove a cue added from the WebVTT file.") ; | 76 consoleWrite("<br>*** Remove a cue added from the WebVTT file.") ; |
| 84 run("textCue = cues[2]"); | 77 run("textCue = cues[2]"); |
| 85 run("testTrack.track.removeCue(textCue)"); | 78 run("testTrack.track.removeCue(textCue)"); |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 102 | 95 |
| 103 </script> | 96 </script> |
| 104 </head> | 97 </head> |
| 105 <body> | 98 <body> |
| 106 <p>Tests TextTrack's addCue and removeCue</p> | 99 <p>Tests TextTrack's addCue and removeCue</p> |
| 107 <video> | 100 <video> |
| 108 <track id="testTrack" src="captions-webvtt/tc013-settings.vtt" kind= "captions" onload="trackLoaded()" default> | 101 <track id="testTrack" src="captions-webvtt/tc013-settings.vtt" kind= "captions" onload="trackLoaded()" default> |
| 109 </video> | 102 </video> |
| 110 </body> | 103 </body> |
| 111 </html> | 104 </html> |
| OLD | NEW |