OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <title>VTTCue.getCueAsHTML()</title> | 2 <title>VTTCue.getCueAsHTML()</title> |
| 3 <link rel="help" href="https://w3c.github.io/webvtt/#dom-vttcue-getcueashtml"> |
3 <script src=/resources/testharness.js></script> | 4 <script src=/resources/testharness.js></script> |
4 <script src=/resources/testharnessreport.js></script> | 5 <script src=/resources/testharnessreport.js></script> |
5 <div id=log></div> | 6 <div id=log></div> |
6 <script> | 7 <script> |
7 test(function(){ | 8 test(function(){ |
8 var video = document.createElement('video'); | 9 var video = document.createElement('video'); |
9 var t1 = video.addTextTrack('subtitles'); | 10 var t1 = video.addTextTrack('subtitles'); |
10 document.body.appendChild(video); | 11 document.body.appendChild(video); |
11 var c1 = new VTTCue(0, 1, '<c></c><c.a.b></c><i></i><b></b><u></u><ruby><rt>
</rt></ruby><v></v><v a b></v><00:00:00.500>x\0'); | 12 var c1 = new VTTCue(0, 1, '<c></c><c.a.b></c><i></i><b></b><u></u><ruby><rt>
</rt></ruby><v></v><v a b></v><00:00:00.500>x\0'); |
12 t1.addCue(c1); | 13 t1.addCue(c1); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 test(function(){ | 84 test(function(){ |
84 assert_equals(frag.childNodes[8].target, 'timestamp', 'target'); | 85 assert_equals(frag.childNodes[8].target, 'timestamp', 'target'); |
85 assert_equals(frag.childNodes[8].data, '00:00:00.500', 'data'); | 86 assert_equals(frag.childNodes[8].data, '00:00:00.500', 'data'); |
86 assert_true(frag.childNodes[8] instanceof ProcessingInstruction, 'instanceof
'); | 87 assert_true(frag.childNodes[8] instanceof ProcessingInstruction, 'instanceof
'); |
87 }, document.title+', <00:00:00.500>'); | 88 }, document.title+', <00:00:00.500>'); |
88 test(function(){ | 89 test(function(){ |
89 assert_equals(frag.childNodes[9].data, 'x\0', 'data'); | 90 assert_equals(frag.childNodes[9].data, 'x\0', 'data'); |
90 assert_true(frag.childNodes[9] instanceof Text, 'instanceof'); | 91 assert_true(frag.childNodes[9] instanceof Text, 'instanceof'); |
91 }, document.title+', x\\0'); | 92 }, document.title+', x\\0'); |
92 </script> | 93 </script> |
OLD | NEW |