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

Side by Side Diff: LayoutTests/media/track/track-add-remove-cue-expected.txt

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 Tests TextTrack's addCue and removeCue 1 Tests TextTrack's addCue and removeCue
2 2
3 3
4 *** Test cues loaded from the file. 4 *** Test cues loaded from the file.
5 EXPECTED (cues.length == '4') OK 5 EXPECTED (cues.length == '4') OK
6 EXPECTED (cues.getCueById('1').startTime == '0') OK 6 EXPECTED (cues.getCueById('1').startTime == '0') OK
7 EXPECTED (cues[1].startTime == '31') OK 7 EXPECTED (cues[1].startTime == '31') OK
8 EXPECTED (cues[2].startTime == '61') OK 8 EXPECTED (cues[2].startTime == '61') OK
9 EXPECTED (cues.getCueById('4').startTime == '121') OK 9 EXPECTED (cues.getCueById('4').startTime == '121') OK
10 EXPECTED (cues.getCueById('junk') == 'undefined') OK 10 EXPECTED (cues.getCueById('junk') == 'undefined') OK
(...skipping 17 matching lines...) Expand all
28 28
29 *** Add the new cue to a track, make sure it is inserted correctly. 29 *** Add the new cue to a track, make sure it is inserted correctly.
30 RUN(testTrack.track.addCue(textCue)) 30 RUN(testTrack.track.addCue(textCue))
31 EXPECTED (textCue.track == '[object TextTrack]') OK 31 EXPECTED (textCue.track == '[object TextTrack]') OK
32 EXPECTED (cues[1].startTime == '31') OK 32 EXPECTED (cues[1].startTime == '31') OK
33 EXPECTED (cues[2].startTime == '33') OK 33 EXPECTED (cues[2].startTime == '33') OK
34 EXPECTED (cues[3].startTime == '61') OK 34 EXPECTED (cues[3].startTime == '61') OK
35 35
36 *** create a new cue and add it to a track created with video.addTextTrack, make sure it is inserted correctly. 36 *** create a new cue and add it to a track created with video.addTextTrack, make sure it is inserted correctly.
37 RUN(newTrack = video.addTextTrack("subtitles", "French subtitles", "fr")) 37 RUN(newTrack = video.addTextTrack("subtitles", "French subtitles", "fr"))
38 RUN(newTrack.mode = "showing")
38 RUN(newTrack.addCue(new VTTCue(0.0, 1.0, "Test!"))) 39 RUN(newTrack.addCue(new VTTCue(0.0, 1.0, "Test!")))
39 RUN(newCue = newTrack.cues[0]) 40 RUN(newCue = newTrack.cues[0])
40 EXPECTED (newCue.track == '[object TextTrack]') OK 41 EXPECTED (newCue.track == '[object TextTrack]') OK
41 EXPECTED (newCue.id == '') OK 42 EXPECTED (newCue.id == '') OK
42 EXPECTED (newCue.startTime == '0') OK 43 EXPECTED (newCue.startTime == '0') OK
43 EXPECTED (newCue.endTime == '1') OK 44 EXPECTED (newCue.endTime == '1') OK
44 EXPECTED (newCue.pauseOnExit == 'false') OK 45 EXPECTED (newCue.pauseOnExit == 'false') OK
45 EXPECTED (newCue.vertical == '') OK 46 EXPECTED (newCue.vertical == '') OK
46 EXPECTED (newCue.snapToLines == 'true') OK 47 EXPECTED (newCue.snapToLines == 'true') OK
47 EXPECTED (newCue.line == '-1') OK 48 EXPECTED (newCue.line == '-1') OK
(...skipping 29 matching lines...) Expand all
77 78
78 *** Add a cue before all the existing cues. 79 *** Add a cue before all the existing cues.
79 RUN(testTrack.track.addCue(new VTTCue(0, 31, 'I am first'))) 80 RUN(testTrack.track.addCue(new VTTCue(0, 31, 'I am first')))
80 EXPECTED (cues[0].startTime == '0') OK 81 EXPECTED (cues[0].startTime == '0') OK
81 EXPECTED (cues[0].endTime == '31') OK 82 EXPECTED (cues[0].endTime == '31') OK
82 EXPECTED (cues[1].startTime == '0') OK 83 EXPECTED (cues[1].startTime == '0') OK
83 EXPECTED (cues[1].endTime == '30.5') OK 84 EXPECTED (cues[1].endTime == '30.5') OK
84 EXPECTED (cues[2].startTime == '31') OK 85 EXPECTED (cues[2].startTime == '31') OK
85 END OF TEST 86 END OF TEST
86 87
OLDNEW
« no previous file with comments | « LayoutTests/media/track/track-add-remove-cue.html ('k') | LayoutTests/media/track/track-mode.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698