| Tests default rendering for TextTrackCues that belong to a VTTRegion. |
| |
| |
| EVENT(canplaythrough) |
| ** The text track has only one region ** |
| EXPECTED (testTrack.regions.length == '1') OK |
| |
| ** Inspecting cues displayed within region** |
| |
| RUN(video.currentTime = 0.2) |
| EVENT(seeked) |
| Total cues in region: 1 |
| Cue content is: We are in New York City |
| Cue lines visible from this cue: 1 |
| EXPECTED (totalVisibleLines <= testTrack.regions[0].height == 'true') OK |
| |
| RUN(video.currentTime = 0.5) |
| EVENT(seeked) |
| Total cues in region: 2 |
| Cue content is: We are in New York City |
| Cue lines visible from this cue: 1 |
| Cue content is: Second cue |
| Cue lines visible from this cue: 1 |
| EXPECTED (totalVisibleLines <= testTrack.regions[0].height == 'true') OK |
| |
| RUN(video.currentTime = 1) |
| EVENT(seeked) |
| Total cues in region: 3 |
| Cue content is: We are in New York City |
| Cue lines visible from this cue: 1 |
| Cue content is: Second cue |
| Cue lines visible from this cue: 1 |
| Cue content is: Multiline Cue |
| Cue lines visible from this cue: 0 |
| EXPECTED (totalVisibleLines <= testTrack.regions[0].height == 'true') OK |
| |
| RUN(video.currentTime = 2.3) |
| EVENT(seeked) |
| Total cues in region: 2 |
| Cue content is: Multiline Cue |
| Cue lines visible from this cue: 2 |
| Cue content is: Fourth cue! |
| Cue lines visible from this cue: 0 |
| EXPECTED (totalVisibleLines <= testTrack.regions[0].height == 'true') OK |
| |
| RUN(video.currentTime = 3) |
| EVENT(seeked) |
| Total cues in region: 1 |
| Cue content is: Fourth cue! |
| Cue lines visible from this cue: 1 |
| EXPECTED (totalVisibleLines <= testTrack.regions[0].height == 'true') OK |
| END OF TEST |
| |