regions-scroll.test (1014B)
1 regions, scroll 2 <link rel="help" href="https://w3c.github.io/webvtt/#collect-webvtt-region-settings"> 3 4 assert_equals(cues.length, 6); 5 6 var regions = Array.from(cues).map(function(cue) { 7 return cue.region; 8 }); 9 10 var valid_lines = [ 11 '', 12 'up', 13 'up', 14 '', 15 '', 16 'up', 17 ].forEach(function(valid, index) { 18 assert_equals(regions[index].scroll, valid, 'Failed with region ' + index); 19 }); 20 21 === 22 WEBVTT 23 24 REGION 25 id:0 26 27 REGION 28 id:1 29 scroll:up 30 31 REGION 32 id:2 33 scroll:up scroll:up scroll:up scroll:up scroll:up scroll:up scroll:up scroll:up 34 scroll:up scroll:up scroll:up scroll:up scroll:up scroll:up scroll:up scroll:up 35 36 REGION 37 id:3 38 scroll:down 39 scroll:left 40 scroll:right 41 42 REGION 43 id:4 44 scroll: up 45 scroll :up 46 47 REGION 48 id:5 49 scroll:up scroll: 50 51 00:00:00.000 --> 00:00:01.000 region:0 52 text 53 54 00:00:00.000 --> 00:00:01.000 region:1 55 text 56 57 00:00:00.000 --> 00:00:01.000 region:2 58 text 59 60 00:00:00.000 --> 00:00:01.000 region:3 61 text 62 63 00:00:00.000 --> 00:00:01.000 region:4 64 text 65 66 00:00:00.000 --> 00:00:01.000 region:5 67 text