| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <title>This tests that the controls' current time is updated after media is unlo
aded</title> |
| 4 <script src='../media-file.js'></script> |
| 5 <video controls></video> |
| 6 <script> |
| 7 if (window.testRunner) |
| 8 testRunner.waitUntilDone(); |
| 9 |
| 10 var video = document.querySelector('video'); |
| 11 video.src = findMediaFile('video', '../content/test'); |
| 12 |
| 13 // Get the video into a playing state at currentTime > 0. |
| 14 video.autoplay = true; |
| 15 video.addEventListener('playing', _ => { |
| 16 video.addEventListener('seeked', _ => { |
| 17 // Remove src and reload. The controls should reset and not show a playing |
| 18 // state or currentTime > 0. |
| 19 video.removeAttribute('src'); |
| 20 video.load(); |
| 21 |
| 22 video.addEventListener('emptied', _ => { |
| 23 video.addEventListener('timeupdate', _ => { |
| 24 if (window.testRunner) |
| 25 setTimeout(function() { |
| 26 testRunner.notifyDone(); |
| 27 }, 10); |
| 28 }); |
| 29 }); |
| 30 }); |
| 31 |
| 32 video.currentTime = 3; |
| 33 }, { once: true }); |
| 34 </script> |
| 35 </html> |
| OLD | NEW |