OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <title>WebVTT parser tests</title> | 2 <title>WebVTT parser tests</title> |
3 <script src="../../../../../../resources/testharness.js"></script> | 3 <script src="../../../../../../resources/testharness.js"></script> |
4 <script src="../../../../../../resources/testharnessreport.js"></script> | 4 <script src="../../../../../../resources/testharnessreport.js"></script> |
5 <div id=log></div> | 5 <div id=log></div> |
6 <script> | 6 <script> |
7 setup({explicit_done: true}); | 7 setup({explicit_done: true}); |
8 var files = []; | 8 var files = []; |
9 var path = 'support/'; | 9 var path = 'support/'; |
10 var cueDefaults = { | 10 var cueDefaults = { |
11 "id":"", | 11 "id":"", |
12 "startTime":0, | 12 "startTime":0, |
13 "endTime":1, | 13 "endTime":1, |
14 "pauseOnExit":false, | 14 "pauseOnExit":false, |
15 //"vertical":"", (not supported) | 15 //"vertical":"", (not supported) |
16 "snapToLines":true, | 16 "snapToLines":true, |
17 "line":-1, | 17 "line":"auto", |
18 "position":50, | 18 "position":50, |
19 "size":100, | 19 "size":100, |
20 "align":"middle" | 20 "align":"middle" |
21 } | 21 } |
22 var cueCounts; | 22 var cueCounts; |
23 (function(){ | 23 (function(){ |
24 var xhr = new XMLHttpRequest(); | 24 var xhr = new XMLHttpRequest(); |
25 xhr.open('GET', path+'cue-counts.json', true); | 25 xhr.open('GET', path+'cue-counts.json', true); |
26 xhr.onreadystatechange = function() { | 26 xhr.onreadystatechange = function() { |
27 if (xhr.readyState == 4) { | 27 if (xhr.readyState == 4) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 setTimeout(removeElm, 0, video); | 86 setTimeout(removeElm, 0, video); |
87 var file = track.src.substr(track.src.lastIndexOf('/') + 1); | 87 var file = track.src.substr(track.src.lastIndexOf('/') + 1); |
88 assert_equals('error', cueCounts[file], 'got unexpected error event'); | 88 assert_equals('error', cueCounts[file], 'got unexpected error event'); |
89 this.done(); | 89 this.done(); |
90 } | 90 } |
91 | 91 |
92 function removeElm(elm) { | 92 function removeElm(elm) { |
93 document.body.removeChild(elm); | 93 document.body.removeChild(elm); |
94 } | 94 } |
95 | 95 |
96 </script> | 96 </script> |
OLD | NEW |