| <!DOCTYPE html> |
| <title>Cues are affected neither by multiple newlines \n, \r, and \r\n nor by the absence of a seperating line</title> |
| <script src="track-helpers.js"></script> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script> |
| check_cues_from_track("resources/cues.vtt", function(track) { |
| var expected = [ |
| { id: "1", startTime: 0, endTime: 30.5, text: "Bear is Coming!!!!!" }, |
| { id: "2", startTime: 31, endTime: 60.5, text: "I said Bear is coming!!!!" }, |
| { id: "3", startTime: 61, endTime: 361200.5, text: "I said Bear is coming now!!!!" } |
| ]; |
| |
| assert_cues_match(track.cues, expected); |
| }); |
| |
| check_cues_from_track("resources/cues-no-separation.vtt", function(track) { |
| var expected = [ |
| { id: "1", startTime: 0, endTime: 30.5, text: "Bear is Coming!!!!!\n2" }, |
| { id: "", startTime: 31, endTime: 60.5, text: "I said Bear is coming!!!!" }, |
| { id: "", startTime: 61, endTime: 361200.5, text: "I said Bear is coming now!!!!" } |
| ]; |
| |
| assert_cues_match(track.cues, expected); |
| }); |
| </script> |