REGRESSION: media/remote-control-command-seek.html is timing out
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2017 20:37:59 +0000 (20:37 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2017 20:37:59 +0000 (20:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173615
<rdar://problem/32626498>

Reviewed by Eric Carlson.

This test assumes that we load metadata and video data that can be seeked through
at the same time, but this is incorrect. Using the "canplaythrough" event guarantees
that the video is seekable, so we switch to this event to make the test more robust.

* media/remote-control-command-seek-expected.txt:
* media/remote-control-command-seek.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218607 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/media/remote-control-command-seek-expected.txt
LayoutTests/media/remote-control-command-seek.html

index 18a864b..35eeada 100644 (file)
@@ -1,3 +1,18 @@
+2017-06-20  Antoine Quint  <graouts@apple.com>
+
+        REGRESSION: media/remote-control-command-seek.html is timing out
+        https://bugs.webkit.org/show_bug.cgi?id=173615
+        <rdar://problem/32626498>
+
+        Reviewed by Eric Carlson.
+
+        This test assumes that we load metadata and video data that can be seeked through
+        at the same time, but this is incorrect. Using the "canplaythrough" event guarantees
+        that the video is seekable, so we switch to this event to make the test more robust.
+
+        * media/remote-control-command-seek-expected.txt:
+        * media/remote-control-command-seek.html:
+
 2017-06-20  Matt Lewis  <jlewis3@apple.com>
 
         Added additional test expectations for media/video-buffered.html.
index 07ad99c..0341e6a 100644 (file)
@@ -2,7 +2,7 @@ Test that the "seekToPlaybackPosition" remote control command works.
 
 
 * set video.src
-EVENT(loadedmetadata)
+EVENT(canplaythrough)
 
 * Send a seek command.
 RUN(internals.postRemoteControlCommand('seekToPlaybackPosition', 1.6))
index 35be55d..4ed510d 100644 (file)
 
                 findMediaElement();
 
-                waitForEvent('loadedmetadata', loadedmetadata, false, true, document)
+                waitForEvent('canplaythrough', canplaythrough, false, true, document)
                 waitForEvent('timeupdate', seeked)
 
                 consoleWrite('* set video.src');
                 video.src = findMediaFile('video', 'content/test');
             }
 
-            function loadedmetadata()
+            function canplaythrough()
             {
                 consoleWrite('<br>* Send a seek command.');
                 run("internals.postRemoteControlCommand('seekToPlaybackPosition', 1.6)");