| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>video-ended-does-not-hold-sleep-assertion</title> |
| <script src="video-test.js"></script> |
| <script src="media-file.js"></script> |
| <script> |
| window.addEventListener('load', async event => { |
| findMediaElement(); |
| |
| run('video.src = findMediaFile("video", "content/test")'); |
| await waitFor(video, 'canplaythrough'); |
| |
| run('video.play()'); |
| await waitFor(video, 'playing'); |
| await waitFor(video, 'timeupdate'); |
| |
| testExpected('internals.elementIsBlockingDisplaySleep(video)', true); |
| run('video.currentTime = video.duration - 0.05'); |
| await waitFor(video, 'ended'); |
| |
| testExpected('internals.elementIsBlockingDisplaySleep(video)', false); |
| |
| endTest(); |
| }, {once: true}); |
| </script> |
| </head> |
| <body> |
| <video controls></video> |
| </body> |
| </html> |