| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
src="/media/iamf_alternating_sine_waves_stereo.mp4"Doesn't this need to be fed through MSE?
assert_implements_optional(supported, type + ' unsupported');Have you confirmed that this is run and not skipped?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Doesn't this need to be fed through MSE?
Wow, I can't believe it passed (it actually ran it wasn't a skip) without it. I switched to MSE and it seems to pass/fail correctly.
assert_implements_optional(supported, type + ' unsupported');Have you confirmed that this is run and not skipped?
Okay, the default led to a precondition failed (I assume good?) and when I ran with the enabled flag I got it to pass: `/third_party/blink/tools/run_web_tests.py -t Default --additional-driver-flag=--enable-features=IamfAudioDecoding external/wpt/media-source/mediasource-iamf-playback.html`
I added the expected.txt, but is that how `assert_implements_optional` is used? It seems so according to https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/docs/writing-tests/testharness-api.md
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
audio.src = URL.createObjectURL(mediaSource);You can create an element through `let audio_element = document.createElement('audio')` instead of declaring one in the HTML.
const buffer = await response.arrayBuffer();assert `response.Ok` before getting the arrayBuffer.
assert_implements_optional(mediaSource.readyState === 'open', type + ' unsupported by media pipeline');Use a regular assert here.
audio.play().catch(e => {You might run into issues calling `play()` here, due to auto-play policies blocking this without user interaction first.
Here's how another test gets around this:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/preserves-pitch.html;l=110;drc=4ce886724455810f79bfb059684b2f56f84ba24d
assert_implements_optional(false, type + ' unsupported by media decoding pipeline');There should only be one `assert_implements_optional` to skip the test if unsupported.
Otherwise, this should be a test failure.
Gemini also thinkgs that wrapping everything in the try/catch is an anti-pattern? I think that if there is an exception, it should bubble up and fail the test correctly. You could verify this locally by throwing any exception and confirming that the test fails with the right messages.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
You can create an element through `let audio_element = document.createElement('audio')` instead of declaring one in the HTML.
Done
assert `response.Ok` before getting the arrayBuffer.
Done
assert_implements_optional(mediaSource.readyState === 'open', type + ' unsupported by media pipeline');Use a regular assert here.
Done
You might run into issues calling `play()` here, due to auto-play policies blocking this without user interaction first.
Here's how another test gets around this:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/preserves-pitch.html;l=110;drc=4ce886724455810f79bfb059684b2f56f84ba24d
Done
assert_implements_optional(false, type + ' unsupported by media decoding pipeline');There should only be one `assert_implements_optional` to skip the test if unsupported.
Otherwise, this should be a test failure.Gemini also thinkgs that wrapping everything in the try/catch is an anti-pattern? I think that if there is an exception, it should bubble up and fail the test correctly. You could verify this locally by throwing any exception and confirming that the test fails with the right messages.
Done. The only one is `assert_implements_optional(supported, type + ' unsupported');`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
const audio_element = document.createElement('audio');Gemini mentions that some browsers throttle out-of-dom audio elements.
Adding the following is its recommendation:
```
document.body.appendChild(audio_element);
t.add_cleanup(() => audio_element.remove());
```
audio_element.src = URL.createObjectURL(mediaSource);Make sure to cleanup the URL, or else it can cause a memory leak if we exit early due to an assert (although, it shouldn't be an issue really for WPTs).
```
const url = URL.createObjectURL(mediaSource);
t.add_cleanup(() => URL.revokeObjectURL(url));
```
audio_element.removeEventListener('timeupdate', onTimeUpdate);How long is the audio clip? There is a flakiness risk if `onended` fires before `timeupdate` does. The test would hang, as there would be no more `timeupdate` events fired afterwards.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
const audio_element = document.createElement('audio');Gemini mentions that some browsers throttle out-of-dom audio elements.
Adding the following is its recommendation:
```
document.body.appendChild(audio_element);
t.add_cleanup(() => audio_element.remove());
```
Done
audio_element.src = URL.createObjectURL(mediaSource);Make sure to cleanup the URL, or else it can cause a memory leak if we exit early due to an assert (although, it shouldn't be an issue really for WPTs).
```
const url = URL.createObjectURL(mediaSource);
t.add_cleanup(() => URL.revokeObjectURL(url));
```
Done
audio_element.removeEventListener('timeupdate', onTimeUpdate);How long is the audio clip? There is a flakiness risk if `onended` fires before `timeupdate` does. The test would hang, as there would be no more `timeupdate` events fired afterwards.
`third_party/blink/web_tests/external/wpt/media/iamf_alternating_sine_waves_stereo.mp4` is `6.01` seconds long. That should be good enough?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
audio_element.removeEventListener('timeupdate', onTimeUpdate);Syed AbuTalibHow long is the audio clip? There is a flakiness risk if `onended` fires before `timeupdate` does. The test would hang, as there would be no more `timeupdate` events fired afterwards.
`third_party/blink/web_tests/external/wpt/media/iamf_alternating_sine_waves_stereo.mp4` is `6.01` seconds long. That should be good enough?
It is long enough, but I still think it would be worth checking the `onended` event. These tests are meant to be run across browsers, on VMs, on old hardware, etc. I feel like we should make these as robust and resilient as possible, given that they are shared with the industry.
If this test starts flaking, this will rule out one possibility.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
audio_element.removeEventListener('timeupdate', onTimeUpdate);Syed AbuTalibHow long is the audio clip? There is a flakiness risk if `onended` fires before `timeupdate` does. The test would hang, as there would be no more `timeupdate` events fired afterwards.
Thomas Guilbert`third_party/blink/web_tests/external/wpt/media/iamf_alternating_sine_waves_stereo.mp4` is `6.01` seconds long. That should be good enough?
It is long enough, but I still think it would be worth checking the `onended` event. These tests are meant to be run across browsers, on VMs, on old hardware, etc. I feel like we should make these as robust and resilient as possible, given that they are shared with the industry.
If this test starts flaking, this will rule out one possibility.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (audio_element.currentTime > 0 || audio_element.ended) {If this ended but `currentTime == 0`, this should be a test error. Otherwise, it's a success.
I would use a seperate method for checking `ended`.
audio_element.removeEventListener('timeupdate', onTimeUpdate);Syed AbuTalibHow long is the audio clip? There is a flakiness risk if `onended` fires before `timeupdate` does. The test would hang, as there would be no more `timeupdate` events fired afterwards.
Thomas Guilbert`third_party/blink/web_tests/external/wpt/media/iamf_alternating_sine_waves_stereo.mp4` is `6.01` seconds long. That should be good enough?
Syed AbuTalibIt is long enough, but I still think it would be worth checking the `onended` event. These tests are meant to be run across browsers, on VMs, on old hardware, etc. I feel like we should make these as robust and resilient as possible, given that they are shared with the industry.
If this test starts flaking, this will rule out one possibility.
Added check for `ended` event.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (audio_element.currentTime > 0 || audio_element.ended) {If this ended but `currentTime == 0`, this should be a test error. Otherwise, it's a success.
I would use a seperate method for checking `ended`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM! Would you mind running the tests once more before submitting, and confirming that they are skipped when the kIAMF flag is off?
if (audio_element.currentTime > 0 || audio_element.ended) {Syed AbuTalibIf this ended but `currentTime == 0`, this should be a test error. Otherwise, it's a success.
I would use a seperate method for checking `ended`.
I splitted into two functions, checkProgress and onError.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
LGTM! Would you mind running the tests once more before submitting, and confirming that they are skipped when the kIAMF flag is off?
Just tested with on/off, got `[PRECONDITION FAILED]` in the off case and `PASS` in the enabled case.
assert_implements_optional(supported, type + ' unsupported');Have you confirmed that this is run and not skipped?
Okay, the default led to a precondition failed (I assume good?) and when I ran with the enabled flag I got it to pass: `/third_party/blink/tools/run_web_tests.py -t Default --additional-driver-flag=--enable-features=IamfAudioDecoding external/wpt/media-source/mediasource-iamf-playback.html`
I added the expected.txt, but is that how `assert_implements_optional` is used? It seems so according to https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/docs/writing-tests/testharness-api.md
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/61732.
When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.
WPT Export docs:
https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Create IAMF playback test
This CL introduces a basic test to ensure that iamf audio files can be
played. We confirm 'played' status by checking `timeupdate`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/61732
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |