Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: third_party/WebKit/LayoutTests/media/controls/time-update-after-unload.html

Issue 2499883002: Media Controls: handle 'timeupdate', 'play' and 'pause' via an EventListener. (Closed)
Patch Set: fix repaint test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698