Bug 254207

Summary: media/media-source/media-source-remove-readystate is a failure on GTK/WPE and media/media-source/media-source-monitor-playing-event.html timeouts on WPE
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: aboya, clopez
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Linux   
See Also: https://bugs.webkit.org/show_bug.cgi?id=254198
Attachments:
Description Flags
TestCase none

Description Jean-Yves Avenard [:jya] 2023-03-21 04:32:58 PDT
Created attachment 465538 [details]
TestCase

Test added in bug 254198 is a constant failure and I can't make much sense of it seeing that readyState calculations should occur in platform agnostic code.

The test calls `SourceBuffer.appendBuffer()` until there's over 10s of data added to the buffered range. Yet readyState stays at 1 (HAVE_METADATA)

```
--- /home/ews/worker/GTK-WK2-Tests-EWS/build/layout-test-results/media/media-source/media-source-remove-readystate-expected.txt
+++ /home/ews/worker/GTK-WK2-Tests-EWS/build/layout-test-results/media/media-source/media-source-remove-readystate-actual.txt
@@ -6,7 +6,7 @@
 RUN(sourceBuffer.appendBuffer(loader.initSegment()))
 EVENT(update)
 Appending 10s Data
-EXPECTED (video.readyState > '1') OK
+EXPECTED (video.readyState > '1'), OBSERVED '1' FAIL
 RUN(video.currentTime = 2.5)
 EVENT(seeked)
 RUN(source.endOfStream())
@@ -15,6 +15,6 @@
 RUN(sourceBuffer.remove(video.currentTime, video.currentTime + 5))
 EVENT(waiting)
 EVENT(update)
-EXPECTED (video.readyState == '1') OK
+EXPECTED (video.readyState == '1'), OBSERVED '2' FAIL
 END OF TEST
 ```
Comment 1 Jean-Yves Avenard [:jya] 2023-03-22 01:32:24 PDT
The test found in `LayoutTests/media/media-source/media-source-monitor-playing-event.html` is incorrect too.

There's a sleep(1s) right after `sourceBuffer.remove(0, 10)` to check the `readyState` but it should have been updated even before the `updateend` event got fired.

I have marked it as failed for now.
Comment 2 Carlos Alberto Lopez Perez 2023-08-31 10:43:01 PDT
(In reply to Jean-Yves Avenard [:jya] from comment #1)
> The test found in
> `LayoutTests/media/media-source/media-source-monitor-playing-event.html` is
> incorrect too.
> 
> There's a sleep(1s) right after `sourceBuffer.remove(0, 10)` to check the
> `readyState` but it should have been updated even before the `updateend`
> event got fired.
> 
> I have marked it as failed for now.

The test media/media-source/media-source-monitor-playing-event.html passes fine on GTK now, but on WPE timeouts 90% of the times.