Title: [284601] trunk/LayoutTests
Revision
284601
Author
[email protected]
Date
2021-10-21 05:28:57 -0700 (Thu, 21 Oct 2021)

Log Message

REGRESSION(r282059) [GStreamer] Test media/media-source/media-source-stalled-holds-sleep-assertion.html timeouts
https://bugs.webkit.org/show_bug.cgi?id=229979

Reviewed by Xabier Rodriguez-Calvar.

Detect stall by monitoring currentTime instead of listening to the 'stall' event. This is needed after
removing emission of 'stall' event in GStreamer ports after https://bugs.webkit.org/show_bug.cgi?id=226882

Also remove initial seek, which is irrelevant to the test purpose and causes troubles in GStreamer ports.

* media/media-source/media-source-stalled-holds-sleep-assertion-expected.txt: Updated expectations.
* media/media-source/media-source-stalled-holds-sleep-assertion.html: Monitor currentTime instead of stall event, remove initial seek.
* platform/glib/TestExpectations: Removed timeout expectation.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (284600 => 284601)


--- trunk/LayoutTests/ChangeLog	2021-10-21 11:51:12 UTC (rev 284600)
+++ trunk/LayoutTests/ChangeLog	2021-10-21 12:28:57 UTC (rev 284601)
@@ -1,3 +1,19 @@
+2021-10-21  Enrique Ocaña González  <[email protected]>
+
+        REGRESSION(r282059) [GStreamer] Test media/media-source/media-source-stalled-holds-sleep-assertion.html timeouts
+        https://bugs.webkit.org/show_bug.cgi?id=229979
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Detect stall by monitoring currentTime instead of listening to the 'stall' event. This is needed after
+        removing emission of 'stall' event in GStreamer ports after https://bugs.webkit.org/show_bug.cgi?id=226882
+
+        Also remove initial seek, which is irrelevant to the test purpose and causes troubles in GStreamer ports.
+
+        * media/media-source/media-source-stalled-holds-sleep-assertion-expected.txt: Updated expectations.
+        * media/media-source/media-source-stalled-holds-sleep-assertion.html: Monitor currentTime instead of stall event, remove initial seek.
+        * platform/glib/TestExpectations: Removed timeout expectation.
+
 2021-10-20  Antti Koivisto  <[email protected]>
 
         [ iOS ] fast/inline/inline-background-clip-text-multiline.html is image failing

Modified: trunk/LayoutTests/media/media-source/media-source-stalled-holds-sleep-assertion-expected.txt (284600 => 284601)


--- trunk/LayoutTests/media/media-source/media-source-stalled-holds-sleep-assertion-expected.txt	2021-10-21 11:51:12 UTC (rev 284600)
+++ trunk/LayoutTests/media/media-source/media-source-stalled-holds-sleep-assertion-expected.txt	2021-10-21 12:28:57 UTC (rev 284601)
@@ -7,9 +7,8 @@
 EVENT(update)
 RUN(sourceBuffer.appendBuffer(loader.mediaSegment(0)))
 EVENT(update)
-RUN(video.currentTime = video.buffered.end(0) - 0.1)
 RUN(video.play())
-EVENT(stalled)
+EXPECTED ((currentTime != initialCurrentTime && oldCurrentTime == currentTime) == 'true') OK
 EXPECTED (internals.elementIsBlockingDisplaySleep(video) == 'false') OK
 END OF TEST
 

Modified: trunk/LayoutTests/media/media-source/media-source-stalled-holds-sleep-assertion.html (284600 => 284601)


--- trunk/LayoutTests/media/media-source/media-source-stalled-holds-sleep-assertion.html	2021-10-21 11:51:12 UTC (rev 284600)
+++ trunk/LayoutTests/media/media-source/media-source-stalled-holds-sleep-assertion.html	2021-10-21 12:28:57 UTC (rev 284601)
@@ -8,6 +8,9 @@
     var loader;
     var source;
     var sourceBuffer;
+    var currentTime;
+    var oldCurrentTime;
+    var initialCurrentTime = null;
 
     function runTest() {
         findMediaElement();
@@ -39,13 +42,24 @@
         run('sourceBuffer.appendBuffer(loader.mediaSegment(0))');
     }
 
+    function checkStalled() {
+        oldCurrentTime = currentTime;
+        currentTime = video.currentTime;
+        if (initialCurrentTime == null)
+            initialCurrentTime = currentTime;
+        if (currentTime != initialCurrentTime && oldCurrentTime == currentTime)
+            stalled();
+        else
+            setTimeout(checkStalled, 300);
+    }
+
     function sourceUpdated() {
-        run('video.currentTime = video.buffered.end(0) - 0.1');
         run('video.play()');
-        waitForEvent('stalled', stalled);
+        checkStalled();
     }
 
     function stalled() {
+        testExpected('(currentTime != initialCurrentTime && oldCurrentTime == currentTime)', true);
         testExpected('internals.elementIsBlockingDisplaySleep(video)', false);
         endTest();
     }
@@ -54,4 +68,4 @@
 <body _onload_="runTest()">
     <video controls></video>
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: trunk/LayoutTests/platform/glib/TestExpectations (284600 => 284601)


--- trunk/LayoutTests/platform/glib/TestExpectations	2021-10-21 11:51:12 UTC (rev 284600)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2021-10-21 12:28:57 UTC (rev 284601)
@@ -2511,8 +2511,6 @@
 
 webkit.org/b/229764 animations/background-position.html [ ImageOnlyFailure Pass ]
 
-webkit.org/b/229979 media/media-source/media-source-stalled-holds-sleep-assertion.html [ Timeout ]
-
 webkit.org/b/230315 imported/w3c/web-platform-tests/mathml/presentation-markup/direction/direction-006.html [ ImageOnlyFailure ]
 
 webkit.org/b/231818 imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-sync-access-handle-lock.https.tentative.worker.html [ Failure ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to