Bug 254207 - 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
Summary: media/media-source/media-source-remove-readystate is a failure on GTK/WPE and...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-21 04:32 PDT by Jean-Yves Avenard [:jya]
Modified: 2023-08-31 10:43 PDT (History)
2 users (show)

See Also:


Attachments
TestCase (2.50 KB, text/html)
2023-03-21 04:32 PDT, Jean-Yves Avenard [:jya]
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.