1304948.html (946B)
1 <html class="reftest-wait"> 2 <head> 3 <title> Bug 1304948 : Crash if a texttrack remove a cue not belongs to it. </title> 4 </head> 5 <meta charset="utf-8"> 6 <script type="text/javascript"> 7 8 window.onload = function() { 9 var a = document.createElementNS('http://www.w3.org/1999/xhtml', 'video'); 10 a.src = ""; 11 document.body.appendChild(a); 12 var b = a.addTextTrack('chapters', "AAAAAAAAAAAAAAAA", "de"); 13 var c = new VTTCue(0.6, 0.3, "AA"); 14 b.addCue(c); 15 var d = document.createElementNS('http://www.w3.org/1999/xhtml', 'video'); 16 var e = d.addTextTrack('chapters', "AAAA", "en-US"); 17 a.currentTime = 2; 18 a.play(); 19 try { 20 // This will queue a TimeMarchesOn task on mainthread, so use 21 // timer to wait the TimeMarchesOn crash. 22 e.removeCue(c); 23 } catch (e) { 24 if (e.name == "NotFoundError") { 25 setTimeout(function() { 26 document.documentElement.removeAttribute("class");}, 0); 27 } 28 } 29 }; 30 31 </script> 32 </body> 33 </html>