| Index: third_party/WebKit/LayoutTests/media/controls/time-update-after-unload.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/controls/time-update-after-unload.html b/third_party/WebKit/LayoutTests/media/controls/time-update-after-unload.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f1ec7d33edf6218d821a12b3e897300af70e06e6
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/media/controls/time-update-after-unload.html
|
| @@ -0,0 +1,35 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<title>This tests that the controls' current time is updated after media is unloaded</title>
|
| +<script src='../media-file.js'></script>
|
| +<video controls></video>
|
| +<script>
|
| + if (window.testRunner)
|
| + testRunner.waitUntilDone();
|
| +
|
| + var video = document.querySelector('video');
|
| + video.src = findMediaFile('video', '../content/test');
|
| +
|
| + // Get the video into a playing state at currentTime > 0.
|
| + video.autoplay = true;
|
| + video.addEventListener('playing', _ => {
|
| + video.addEventListener('seeked', _ => {
|
| + // Remove src and reload. The controls should reset and not show a playing
|
| + // state or currentTime > 0.
|
| + video.removeAttribute('src');
|
| + video.load();
|
| +
|
| + video.addEventListener('emptied', _ => {
|
| + video.addEventListener('timeupdate', _ => {
|
| + if (window.testRunner)
|
| + setTimeout(function() {
|
| + testRunner.notifyDone();
|
| + }, 10);
|
| + });
|
| + });
|
| + });
|
| +
|
| + video.currentTime = 3;
|
| + }, { once: true });
|
| +</script>
|
| +</html>
|
|
|