OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src=../media-file.js></script> |
| 5 <script src=../media-controls.js></script> |
| 6 <script src=../video-test.js></script> |
| 7 |
| 8 <script> |
| 9 if (window.testRunner) |
| 10 { |
| 11 testRunner.dumpAsText(); |
| 12 testRunner.waitUntilDone(); |
| 13 } |
| 14 |
| 15 function startTest() |
| 16 { |
| 17 if (localStorage.testRuns) |
| 18 localStorage.testRuns = Number(localStorage.testRuns) + 1; |
| 19 else { |
| 20 localStorage.testRuns = 1; |
| 21 localStorage.totalRuns = 5; |
| 22 } |
| 23 |
| 24 document.getElementsByTagName('track')[0].track.mode = 'showing'; |
| 25 setTimeout(CFcrash, 100); |
| 26 } |
| 27 |
| 28 function forceGC() { |
| 29 gc(); |
| 30 |
| 31 // End the test only if it ran at least totalRuns. |
| 32 if (window.testRunner && localStorage.testRuns == localStorage.total
Runs) { |
| 33 consoleWrite("** No crash. Pass **"); |
| 34 testRunner.notifyDone(); |
| 35 } else |
| 36 window.location.reload(); |
| 37 } |
| 38 |
| 39 function CFcrash() |
| 40 { |
| 41 document1 = document.implementation.createDocument("", null); |
| 42 document1.appendChild(videoElement); |
| 43 delete document1; |
| 44 |
| 45 setTimeout(forceGC, 0); |
| 46 } |
| 47 |
| 48 document.addEventListener("DOMContentLoaded", startTest, false); |
| 49 </script> |
| 50 </head> |
| 51 |
| 52 <body> |
| 53 <p>Tests that appending events for dispatching doesn't crash</p> |
| 54 <video autoplay id="videoElement"> |
| 55 <source src="../content/test.ogv"> |
| 56 <source src="../content/test.mp4"> |
| 57 <track src="captions-webvtt/captions-fast.vtt" default> |
| 58 </video> |
| 59 </body> |
| 60 </html> |
OLD | NEW |